forked from phoenix/litellm-mirror
bump: version 1.7.13 → 1.7.14
This commit is contained in:
parent
451851e6a4
commit
6c98715b94
3 changed files with 4 additions and 2 deletions
|
@ -1613,6 +1613,7 @@ def token_counter(model="", text=None, messages: Optional[List] = None):
|
|||
# use tiktoken, anthropic, cohere or llama2's tokenizer depending on the model
|
||||
if text == None:
|
||||
if messages is not None:
|
||||
print_verbose(f"token_counter messages received: {messages}")
|
||||
text = "".join([message["content"] for message in messages])
|
||||
else:
|
||||
raise ValueError("text and messages cannot both be None")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue