mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Disable special token restriction for claude ai
This commit is contained in:
parent
b283588eb8
commit
14a19fc601
1 changed files with 2 additions and 2 deletions
|
|
@ -200,10 +200,10 @@ def completion(
|
|||
|
||||
## CALCULATING USAGE
|
||||
prompt_tokens = len(
|
||||
encoding.encode(prompt)
|
||||
encoding.encode(prompt,disallowed_special=())
|
||||
) ##[TODO] use the anthropic tokenizer here
|
||||
completion_tokens = len(
|
||||
encoding.encode(model_response["choices"][0]["message"].get("content", ""))
|
||||
encoding.encode(model_response["choices"][0]["message"].get("content", ""),disallowed_special=())
|
||||
) ##[TODO] use the anthropic tokenizer here
|
||||
|
||||
model_response["created"] = int(time.time())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue