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

Add LotusUsageLimitException #129

Merged
merged 5 commits into from
Feb 21, 2025
Merged

Add LotusUsageLimitException #129

merged 5 commits into from
Feb 21, 2025

Conversation

sidjha1
Copy link
Collaborator

@sidjha1 sidjha1 commented Feb 21, 2025

We can set usage_limit to be sure that we do not exceed a token limit. Raises LotusUsageLimitException if exceeded.

@sidjha1 sidjha1 requested review from dhruviyer, StanChan03 and liana313 and removed request for dhruviyer February 21, 2025 04:58
Comment on lines -75 to +101
if lotus.settings.enable_cache:
# Add new responses to cache
for resp, (_, hash) in zip(uncached_responses, uncached_data):

# Add new responses to cache and update stats
for resp, (_, hash) in zip(uncached_responses, uncached_data):
self._update_stats(resp)
if lotus.settings.enable_cache:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix from #74

@sidjha1 sidjha1 merged commit 877dff1 into main Feb 21, 2025
7 checks passed
@sidjha1 sidjha1 deleted the sid/token-limit branch February 21, 2025 05:54
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.

2 participants