From 0c89f8cac224a209d373ed17bd6033f1a63fa77e Mon Sep 17 00:00:00 2001 From: goulustis Date: Fri, 24 Oct 2025 16:14:45 +0800 Subject: [PATCH] get as_raw --- lang_agent/pipeline.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lang_agent/pipeline.py b/lang_agent/pipeline.py index 12c72bc..566ba88 100644 --- a/lang_agent/pipeline.py +++ b/lang_agent/pipeline.py @@ -77,6 +77,10 @@ class Pipeline: def invoke(self, *nargs, **kwargs)->str: out = self.graph.invoke(*nargs, **kwargs) + + if kwargs.get("as_raw"): + return out + if isinstance(out, SystemMessage) or isinstance(out, HumanMessage): return out.content