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 encountered a similar issue, and I solved it with the following approach:
agent:=agents.NewConversationalAgent(llm,
agentTools,
agents.WithMaxIterations(3),
agents.WithCallbacksHandler(CustomHandler{}))
executor:=agents.NewExecutor(agent)
question:="Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?"answer, err:=chains.Run(context.Background(), executor, question)
In my solution, I created a custom CallbacksHandler and implemented the HandleStreamingFunc inside it. This ensures that the streaming data is processed correctly.
package version: github.com/tmc/langchaingo v0.1.12
Regardless of using the chains run or call the streamingFunc defined is ignored.
The text was updated successfully, but these errors were encountered: