Skip to content

Commit

Permalink
sets default enabled rules to phase 1 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraschauer committed Jul 4, 2024
1 parent c7cb7ea commit ed90104
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions prospector/core/prospector.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from git.version_to_tag import get_possible_tags
from llm.llm_service import LLMService
from log.logger import get_level, logger, pretty_log
from rules.rules import apply_rules
from rules.rules import RULES_PHASE_1, apply_rules
from stats.execution import (
Counter,
ExecutionTimer,
Expand Down Expand Up @@ -66,7 +66,7 @@ def prospector( # noqa: C901
use_backend: str = USE_BACKEND_ALWAYS,
git_cache: str = "/tmp/git_cache",
limit_candidates: int = MAX_CANDIDATES,
enabled_rules: List[str] = [],
enabled_rules: List[str] = [rule.id for rule in RULES_PHASE_1],
tag_commits: bool = True,
silent: bool = False,
use_llm_repository_url: bool = False,
Expand Down
1 change: 1 addition & 0 deletions prospector/llm/models/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _call(

try:
response = requests.post(endpoint, headers=headers, json=data)
response.raise_for_status()
return self.parse(response.json())
except requests.exceptions.HTTPError as http_error:
logger.error(
Expand Down
1 change: 1 addition & 0 deletions prospector/llm/models/mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def _call(

try:
response = requests.post(endpoint, headers=headers, json=data)
response.raise_for_status()
return self.parse(response.json())
except requests.exceptions.HTTPError as http_error:
logger.error(
Expand Down
4 changes: 2 additions & 2 deletions prospector/llm/models/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def _identifying_params(self) -> Dict[str, Any]:
def _call(
self, prompt: str, stop: Optional[List[str]] = None, **kwargs: Any
) -> str:
# endpoint = f"{self.deployment_url}/chat/completions?api-version=2023-05-15"
endpoint = f"{self.deployment_url}/chat/cpletions?api-version=2023-05-15"
endpoint = f"{self.deployment_url}/chat/completions?api-version=2023-05-15"
headers = instantiation.get_headers(self.ai_core_sk_filepath)
data = {
"messages": [
Expand All @@ -45,6 +44,7 @@ def _call(

try:
response = requests.post(endpoint, headers=headers, json=data)
response.raise_for_status()
return self.parse(response.json())
except requests.exceptions.HTTPError as http_error:
logger.error(
Expand Down

0 comments on commit ed90104

Please sign in to comment.