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 recently changed from using handoffs to agents as tools and previously I was getting updates in chunk (using AgentRunUpdateEvent).
However, after converting to agents as tools, I get one big chunk of text after small delay and then it continues to produce small updates as previously.
var agentList = new List<AITool>();
// I create multiple agents and add them to the list as AsAIFunction()
var entryPointAgent = _chatClient.CreateAIAgent(
name: routingAgentName,
description: routingAgentDescription,
instructions: TroutingAgentInstructions,
tools: agentList);
Workflow workflow = AgentWorkflowBuilder.BuildSequential(entryPointAgent);
Then I call run and wait for streaming updates
var messages = new[]
{
new ChatMessage(ChatRole.User, input)
};
StreamingRun run = await InProcessExecution.StreamAsync(_workflow, messages);
await run.TrySendMessageAsync(new TurnToken(emitEvents: true));
await foreach (WorkflowEvent evt in run.WatchStreamAsync().ConfigureAwait(false))
I get couple of sentences immediately, then updates start coming through.
Is there something I am doing wrong? Or is this intended behavior?
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
Uh oh!
There was an error while loading. Please reload this page.
-
I recently changed from using handoffs to agents as tools and previously I was getting updates in chunk (using AgentRunUpdateEvent).
However, after converting to agents as tools, I get one big chunk of text after small delay and then it continues to produce small updates as previously.
Then I call run and wait for streaming updates
I get couple of sentences immediately, then updates start coming through.
Is there something I am doing wrong? Or is this intended behavior?
Beta Was this translation helpful? Give feedback.
All reactions