Skip to content

Commit

Permalink
removes unnecessary llm config object
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraschauer committed Jun 11, 2024
1 parent f155788 commit 040fa79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions prospector/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def main(argv): # noqa: C901
logger.debug("Vulnerability ID: " + config.vuln_id)

if not config.repository:
config.repository = llm.get_repository_url(
model=model, llm_config=config.llm_service, vuln_id=config.vuln_id
)
config.repository = llm.get_repository_url(model=model, vuln_id=config.vuln_id)

results, advisory_record = prospector(
vulnerability_id=config.vuln_id,
Expand Down
7 changes: 2 additions & 5 deletions prospector/llm/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
from log.logger import logger


def get_repository_url(model: LLM, llm_config: Dict, vuln_id: str):
def get_repository_url(model: LLM, vuln_id: str):
"""Ask an LLM to obtain the repository URL given the advisory description and references.
Args:
llm_config (dict): A dictionary containing the configuration for the LLM. Expected keys are:
- 'type' (str): Method for accessing the LLM API ('sap' for SAP's AI Core, 'third_party' for
external providers).
- 'model_name' (str): Which model to use, e.g. gpt-4.
model (LLM): The instantiated model (instantiated with create_model_instance())
vuln_id: The ID of the advisory, e.g. CVE-2020-1925.
Returns:
Expand Down

0 comments on commit 040fa79

Please sign in to comment.