Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: set output for Message template (#8064)

Stephen Hu640fca7dc956
diff --git a/agent/component/message.py b/agent/component/message.py
index a193dd122b..c60d4d307c 100644
--- a/agent/component/message.py
+++ b/agent/component/message.py
@@ -40,7 +40,9 @@ class Message(ComponentBase, ABC):
if kwargs.get("stream"):
return partial(self.stream_output)
- return Message.be_output(random.choice(self._param.messages))
+ res = Message.be_output(random.choice(self._param.messages))
+ self.set_output(res)
+ return res
def stream_output(self):
res = None