fix: empty usage (#2168)

pull/2170/head
Yeuoly 2 years ago committed by GitHub
parent d42df4ed04
commit 6c614f0c1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -298,7 +298,7 @@ class AssistantCotApplicationRunner(BaseAssistantApplicationRunner):
message=AssistantPromptMessage(
content=final_answer
),
usage=llm_usage['usage'],
usage=llm_usage['usage'] if llm_usage['usage'] else LLMUsage.empty_usage(),
system_fingerprint=''
), PublishFrom.APPLICATION_MANAGER)

@ -276,7 +276,7 @@ class AssistantFunctionCallApplicationRunner(BaseAssistantApplicationRunner):
message=AssistantPromptMessage(
content=final_answer,
),
usage=llm_usage['usage'],
usage=llm_usage['usage'] if llm_usage['usage'] else LLMUsage.empty_usage(),
system_fingerprint=''
), PublishFrom.APPLICATION_MANAGER)

Loading…
Cancel
Save