better debugging
This commit is contained in:
@@ -115,17 +115,16 @@ class Pipeline:
|
|||||||
if as_stream:
|
if as_stream:
|
||||||
for step in self.agent.stream(*inp, stream_mode="values"):
|
for step in self.agent.stream(*inp, stream_mode="values"):
|
||||||
step["messages"][-1].pretty_print()
|
step["messages"][-1].pretty_print()
|
||||||
|
out = step
|
||||||
return
|
else:
|
||||||
|
|
||||||
out = self.invoke(*inp)
|
out = self.invoke(*inp)
|
||||||
|
|
||||||
return out['messages'][-1].content
|
return out['messages'][-1].content
|
||||||
|
|
||||||
|
|
||||||
# if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# pipeline:Pipeline = PipelineConfig().setup()
|
pipeline:Pipeline = PipelineConfig().setup()
|
||||||
|
|
||||||
# print(pipeline.chat("I'm steve"))
|
u = pipeline.chat("use the calculator tool to calculate what is 900 * 321", as_stream=True)
|
||||||
# print(pipeline.chat("what is my name?"))
|
print("================out")
|
||||||
|
print(u)
|
||||||
# pipeline.chat("use the calculator tool to calculate what is 900 * 321", as_stream=True)
|
|
||||||
Reference in New Issue
Block a user