You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a chatbot which is distributed across multiple files, and is then exposed with an API endpoint.
I am using RunTree to trace the calls, I am not using Langchain for my agent. RunTree provides the best way to do that considering my code structure.
My question is, how do I pass a generator object to the RunTree object as follows:
def agent_run():
# Chatbot agent code
......
# Patch the generator output to the pipeline
self.pipeline.end(outputs={"post_content": generator})
self.pipeline.patch()
# Generator is sent to API endpoint
return generator
I want to trace the output from the generator, and then also return the generator to the API endpoint so that I can stream it on the front end.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
I have a chatbot which is distributed across multiple files, and is then exposed with an API endpoint.
I am using RunTree to trace the calls, I am not using Langchain for my agent. RunTree provides the best way to do that considering my code structure.
My question is, how do I pass a generator object to the RunTree object as follows:
I want to trace the output from the generator, and then also return the generator to the API endpoint so that I can stream it on the front end.
Any pointers as to how to do it?
Beta Was this translation helpful? Give feedback.
All reactions