(fix) counting streaming prompt tokens - azure

This commit is contained in:
ishaan-jaff 2023-12-29 16:13:52 +05:30
parent d1049c8922
commit e6a7212d10
2 changed files with 2 additions and 2 deletions

View file

@ -2505,7 +2505,7 @@ def token_counter(model="", text=None, messages: Optional[List] = None):
int: The number of tokens in the text.
"""
# use tiktoken, anthropic, cohere or llama2's tokenizer depending on the model
is_tool_call = True
is_tool_call = False
if text == None:
if messages is not None:
print_verbose(f"token_counter messages received: {messages}")