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

fix(ollama_chat.py): use tiktoken as backup for prompt token counting #1495

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

puffo
Copy link
Contributor

@puffo puffo commented Jan 18, 2024

The fix for ollama completions on already applied this previous commit but is also required for ollama_chat.py.

Making a repeated request to the ollama chat endpoint produces a similar issue as before.

This is likely due to the optional presence of these keys in the response (see the ollama types definition)

Copy link

vercel bot commented Jan 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 4:58pm

@krrishdholakia krrishdholakia merged commit 658fd4d into BerriAI:main Jan 18, 2024
2 checks passed
@krrishdholakia
Copy link
Contributor

Good work!

@puffo
Copy link
Contributor Author

puffo commented Jan 18, 2024

Apologies @krrishdholakia , I've found a problem with this solution after digging deeper into the ollama documentation. I'll push up a fix shortly.

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.

3 participants