Fix: Missing token count for GPT-4o model. (bumps tiktoken-rs to v0.5.9) (#11893)

Fix: this makes sure we have token counts for the new GPT-4o model.

See: https://github.com/zurawiki/tiktoken-rs/releases/tag/v0.5.9 

Release Notes:

- Fix: Token count was missing for the new GPT-4o model.

(I believe this should go in a 0.136.x release)
This commit is contained in:
Toon Willems 2024-05-16 13:09:28 +02:00 committed by GitHub
parent 8c8c1769c7
commit 9969d6c702
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 20 deletions

View file

@ -204,9 +204,7 @@ pub fn count_open_ai_tokens(
.collect::<Vec<_>>();
match request.model {
LanguageModel::OpenAi(OpenAiModel::FourOmni)
| LanguageModel::ZedDotDev(ZedDotDevModel::Gpt4Omni)
| LanguageModel::Anthropic(_)
LanguageModel::Anthropic(_)
| LanguageModel::ZedDotDev(ZedDotDevModel::Claude3Opus)
| LanguageModel::ZedDotDev(ZedDotDevModel::Claude3Sonnet)
| LanguageModel::ZedDotDev(ZedDotDevModel::Claude3Haiku) => {