SAP / project-kb

Home page of project "KB"
https://sap.github.io/project-kb/
Apache License 2.0
114 stars 74 forks source link

Prompts exceed LLM token limit #393

Closed lauraschauer closed 1 month ago

lauraschauer commented 4 months ago

If the references of an advisory are too long, prospector crashes because the LLM token limit gets exceeded.

In some cases, a prompt sent to the LLM might exceed its token limit. For example, in the following cases:

  1. When inferring the repository URL: an advisory has a very long description, or (too) many references attached to it.
  2. When using the commit classification rule: a diff is too long.

In SAP models, the _call method returns an HTTPError, which must be caught in the function in llm_service.py that invokes the _call method. Currently, this isn't implemented for getting the repository URL.