mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-18 12:13:46 +00:00
fix: more test fixes
This commit is contained in:
1 parent
132a2de3bf
commit
c5d2329a61
3 files changed
+39
-8
No files matched your search
@@ -383,10 +383,9 @@ class AnthropicLLM(BaseLLM):
|
||||
return
|
||||
try:
|
||||
output = int(getattr(usage, "output_tokens", 0) or 0)
|
||||
if output_only:
|
||||
# Input counts come from the message_start record below.
|
||||
base_input = created = cached = 0
|
||||
else:
|
||||
# On a message_delta the input bins are absent; the counts kept at
|
||||
# message_start are reused below instead.
|
||||
if not output_only:
|
||||
base_input = int(getattr(usage, "input_tokens", 0) or 0)
|
||||
created = int(getattr(usage, "cache_creation_input_tokens", 0) or 0)
|
||||
cached = int(getattr(usage, "cache_read_input_tokens", 0) or 0)
|
||||
|
||||
Reference in new issue
Block a user