make streamable tags a thing

This commit is contained in:
2026-01-05 20:50:29 +08:00
parent 2814b3dabc
commit cdc30c3c32

View File

@@ -65,10 +65,11 @@ class RoutingGraph(GraphBase):
self._build_modules()
self.workflow = self._build_graph()
self.streamable_tags:List[List[str]] = self.tool_node.get_streamable_tags() + [["route_chat_llm"]]
def _stream_result(self, *nargs, **kwargs):
streamable_tags = self.tool_node.get_streamable_tags() + [["route_chat_llm"]]
def text_iterator():
for chunk, metadata in self.workflow.stream({"inp": nargs},
@@ -79,7 +80,7 @@ class RoutingGraph(GraphBase):
chunk, metadata = metadata
tags = metadata.get("tags")
if not (tags in streamable_tags):
if not (tags in self.streamable_tags):
continue
if isinstance(chunk, (BaseMessageChunk, BaseMessage)) and getattr(chunk, "content", None):