Revert tokenizer for custom OpenAI models (#17660)
Fix for custom openai models tokenizer settings.
This commit is contained in:
parent
a23e381096
commit
bd1ff476b9
1 changed files with 5 additions and 1 deletions
|
@ -370,7 +370,11 @@ pub fn count_open_ai_tokens(
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
|
||||
if let open_ai::Model::Custom { .. } = model {
|
||||
tiktoken_rs::num_tokens_from_messages("gpt-4", &messages)
|
||||
} else {
|
||||
tiktoken_rs::num_tokens_from_messages(model.id(), &messages)
|
||||
}
|
||||
})
|
||||
.boxed()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue