mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 16:14:16 +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:
|
try:
|
||||||
llm._last_usage_claimed = True
|
llm._last_usage_claimed = True
|
||||||
except AttributeError:
|
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
|
pass
|
||||||
return {
|
return {
|
||||||
"prompt_tokens": int(prompt or 0),
|
"prompt_tokens": int(prompt or 0),
|
||||||
|
|||||||
Reference in new issue
Block a user