Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_summary: Directly use input_token from llm response.
Aman Agrawalaceb79ba88ce
diff --git a/zerver/views/message_summary.py b/zerver/views/message_summary.pyindex 68aa0b988fa..fc3934d18ab 100644--- a/zerver/views/message_summary.py+++ b/zerver/views/message_summary.py@@ -173,7 +173,7 @@ def get_messages_summary(# Token counter is recommended by LiteLLM but mypy says it's not explicitly exported.# https://docs.litellm.ai/docs/completion/token_usage#3-token_counter- input_tokens = litellm.token_counter(model=model, messages=messages) # type: ignore[attr-defined] # Explained above+ # estimated_input_tokens = litellm.token_counter(model=model, messages=messages) # type: ignore[attr-defined] # Explained above# TODO when implementing user plans:# - Before querying the model, check whether we've enough tokens left using