fix: empty usage (#2168)

This commit is contained in:
Yeuoly
2024-01-24 15:34:17 +08:00
committed by GitHub
parent d42df4ed04
commit 6c614f0c1f
2 changed files with 2 additions and 2 deletions

View File

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

View File

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