Description
looks like streaming invocation of agent ignores session.
- Tell me a joke about a pirate. -> any joke
- repeat last joke -> It seems I haven't told a joke yet...
see code sample for details
Code Sample
IChatClient chatClient = this.ServiceProvider.GetRequiredKeyedService<IChatClient>("default");
var agent = chatClient.AsAIAgent(instructions: "You are good at telling jokes.", name: "Joker");
AgentSession session = await agent.CreateSessionAsync();
// Invoke the agent and output the text result.
AgentResponse response = await agent.RunAsync("Tell me a joke about a pirate.",session: session);
this.Output.WriteLine(response.ToString());
StringBuilder sb = new();
// Invoke the agent with streaming support.
await foreach (var update in agent.RunStreamingAsync("repeat last joke", session: session))
{
sb.Append(update);
}
this.Output.WriteLine(sb.ToString());
Error Messages / Stack Traces
Package Versions
1.0.0-preview.260209.1
.NET Version
.NET 10
Additional Context
No response