From bcb9ead2fb6a1183779fb5d2075cd60f5bf2c28c Mon Sep 17 00:00:00 2001 From: goulustis Date: Wed, 15 Oct 2025 20:51:23 +0800 Subject: [PATCH] better debugging --- lang_agent/pipeline.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lang_agent/pipeline.py b/lang_agent/pipeline.py index c6e84d1..93b0ce0 100644 --- a/lang_agent/pipeline.py +++ b/lang_agent/pipeline.py @@ -115,17 +115,16 @@ class Pipeline: if as_stream: for step in self.agent.stream(*inp, stream_mode="values"): step["messages"][-1].pretty_print() - - return + out = step + else: + out = self.invoke(*inp) - out = self.invoke(*inp) return out['messages'][-1].content -# if __name__ == "__main__": -# pipeline:Pipeline = PipelineConfig().setup() - - # print(pipeline.chat("I'm steve")) - # print(pipeline.chat("what is my name?")) +if __name__ == "__main__": + pipeline:Pipeline = PipelineConfig().setup() - # pipeline.chat("use the calculator tool to calculate what is 900 * 321", as_stream=True) \ No newline at end of file + u = pipeline.chat("use the calculator tool to calculate what is 900 * 321", as_stream=True) + print("================out") + print(u) \ No newline at end of file