mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-03 11:11:58 +00:00
Update usage.py
This commit is contained in:
1 parent
2b8afb8c10
commit
d554eef97f
1 file changed
+2
@@ -171,6 +171,8 @@ def _prefer_provider_usage(llm: Any, call_usage: Dict[str, int]) -> Dict[str, in
|
||||
try:
|
||||
llm._last_usage_claimed = True
|
||||
except AttributeError:
|
||||
# Slotted/immutable LLM stand-ins can't record the claim; this
|
||||
# call still gets the provider counts, which is correct for them.
|
||||
pass
|
||||
return {
|
||||
"prompt_tokens": int(prompt or 0),
|
||||
|
||||
Reference in new issue
Block a user