Skip to content

Conversation

@gaya3-zipstack
Copy link
Contributor

What

Token counter was broken aftre latest llama-index upgrade.

Why

Llama index has overhauled the token counting objects internally causing us to make compatible changes.. The same was pushed with SDK 0.41.0. However, that had some regressions where in it was failing for non OpenAI models.

How

Changed the token counting functions in accordance with latest class attributes and functions.

Relevant Docs

Related Issues or PRs

Dependencies Versions / Env Variables

Notes on Testing

Tested for a bunch of models of Open AI, VertexAI, Anthropic, Mistral.
Ollama was not tested due to some setup issues and lack of time.
AnyScal also is not tested as the set up is no longer working. Need to migrate to the latest AnyScale infra

Screenshots

From token_usage table

Checklist

I have read and understood the Contribution Guidelines.

@gaya3-zipstack gaya3-zipstack requested review from a team, Deepak-Kesavan, chandrasekharan-zipstack and jaseemjaskp and removed request for a team August 6, 2024 09:04
@gaya3-zipstack gaya3-zipstack merged commit e2a2595 into main Aug 6, 2024
@gaya3-zipstack gaya3-zipstack deleted the feature/llama-index-upgrade branch August 6, 2024 10:57
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.

5 participants