Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not cache fully empty completion responses or those with empty contents #465

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

caufieldjh
Copy link
Member

Caching empty responses can be an issue when we're running numerous documents.
This adds two cases where an error may be raised after prompt completion:

  • Fully empty response
  • Slot only, like result:

@caufieldjh caufieldjh linked an issue Oct 25, 2024 that may be closed by this pull request
@caufieldjh
Copy link
Member Author

Need a newer litellm version to be able to do more cache manipulation - see https://github.com/BerriAI/litellm/blob/81157aa13593a02e8d34ec1ef47a777f347a5b68/litellm/caching/caching.py#L722C15-L722C32

@caufieldjh caufieldjh changed the title Do not catch fully empty completion responses or those with empty contents Do not cache fully empty completion responses or those with empty contents Oct 25, 2024
@caufieldjh
Copy link
Member Author

This is being actively changed in litellm so I'm actually going to hold off on further updates to this PR
https://github.com/BerriAI/litellm/blame/main/litellm/caching/disk_cache.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not cache fully empty responses
1 participant