mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Avoid double responses when streaming (#365)
* Avoid double responses when streaming. * Fix tests.
This commit is contained in:
@@ -105,13 +105,6 @@ public sealed class AgentProxy : AIAgent
|
||||
|
||||
if (update.Status is RequestStatus.Completed)
|
||||
{
|
||||
var responseTypeInfo = AgentAbstractionsJsonUtilities.DefaultOptions.GetTypeInfo(typeof(AgentRunResponse));
|
||||
var runResponse = (AgentRunResponse)update.Data.Deserialize(responseTypeInfo)!;
|
||||
foreach (var item in runResponse.ToAgentRunResponseUpdates())
|
||||
{
|
||||
yield return item;
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user