Skip to content

Commit

Permalink
fix: 修复AI编排中,指定回复的内容,不能在任务流程中传递 #726 (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 authored Jul 10, 2024
1 parent fd6aa4f commit c182311
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def execute(self, reply_type, stream, fields=None, content=None, **kwargs) -> No
else:
result = self.generate_reply_content(content)
if stream:
return NodeResult({'result': iter([AIMessageChunk(content=result)])}, {},
return NodeResult({'result': iter([AIMessageChunk(content=result)]), 'answer': result}, {},
_to_response=to_stream_response)
else:
return NodeResult({'result': AIMessage(content=result)}, {}, _to_response=to_response)
return NodeResult({'result': AIMessage(content=result), 'answer': result}, {}, _to_response=to_response)

def generate_reply_content(self, prompt):
return self.workflow_manage.generate_prompt(prompt)
Expand Down

0 comments on commit c182311

Please # to comment.