Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix variable name in AgentApplicationRunner (#1884)

waltcow61aaeff4134e
diff --git a/api/core/app_runner/agent_app_runner.py b/api/core/app_runner/agent_app_runner.py
index 02bdae900de..344a19d1b70 100644
--- a/api/core/app_runner/agent_app_runner.py
+++ b/api/core/app_runner/agent_app_runner.py
@@ -237,8 +237,8 @@ class AgentApplicationRunner(AppRunner):
all_message_tokens = 0
all_answer_tokens = 0
for agent_thought in agent_thoughts:
- all_message_tokens += agent_thought.message_tokens
- all_answer_tokens += agent_thought.answer_tokens
+ all_message_tokens += agent_thought.message_token
+ all_answer_tokens += agent_thought.answer_token
model_type_instance = model_config.provider_model_bundle.model_type_instance
model_type_instance = cast(LargeLanguageModel, model_type_instance)