mirror of https://github.com/langgenius/dify.git
fix: no content write back to plugin
This commit is contained in:
parent
95330162a4
commit
1b6520efdd
|
|
@ -187,7 +187,8 @@ class FunctionCallAgentRunner(BaseAgentRunner):
|
|||
),
|
||||
)
|
||||
|
||||
assistant_message = AssistantPromptMessage(content="", tool_calls=[])
|
||||
assistant_message = AssistantPromptMessage(content=response, tool_calls=[])
|
||||
|
||||
if tool_calls:
|
||||
assistant_message.tool_calls = [
|
||||
AssistantPromptMessage.ToolCall(
|
||||
|
|
@ -199,8 +200,8 @@ class FunctionCallAgentRunner(BaseAgentRunner):
|
|||
)
|
||||
for tool_call in tool_calls
|
||||
]
|
||||
else:
|
||||
assistant_message.content = response
|
||||
|
||||
logger.debug(f"FunctionCallAgentRunner: assistant_message: {assistant_message.model_dump()}")
|
||||
|
||||
self._current_thoughts.append(assistant_message)
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class AssistantPromptMessage(PromptMessage):
|
|||
|
||||
:return: True if prompt message is empty, False otherwise
|
||||
"""
|
||||
if not super().is_empty() and not self.tool_calls:
|
||||
if not super().is_empty() or self.tool_calls:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in New Issue