Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agents StreamingFunc is ignored #1131

Open
pkrauss-prot opened this issue Feb 4, 2025 · 0 comments
Open

Agents StreamingFunc is ignored #1131

pkrauss-prot opened this issue Feb 4, 2025 · 0 comments

Comments

@pkrauss-prot
Copy link

pkrauss-prot commented Feb 4, 2025

package version: github.com/tmc/langchaingo v0.1.12

Regardless of using the chains run or call the streamingFunc defined is ignored.

agent := agents.NewConversationalAgent(llm,
		agentTools,
		agents.WithMaxIterations(3),
	)
executor := agents.NewExecutor(agent)

question := "what is the answer for 1000092 / 23999 * 1000000? break it down into steps"
answer, err := chains.Run(context.Background(), executor, question, chains.WithStreamingFunc(func(ctx context.Context, chunk []byte) error {
	fmt.Printf("streaming: %s\n", string(chunk))
	return nil
}))
@pkrauss-prot pkrauss-prot changed the title agents StreamingFunc is ignored Agents StreamingFunc is ignored Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant