Clean up usage of JsonSerializerContext (#229)

* Clean up usage of JsonSerializerContext

* review feedback
This commit is contained in:
Reuben Bond
2025-07-23 12:34:54 -07:00
committed by GitHub
Unverified
parent e6aeb9a5db
commit 5e9b24e532
12 changed files with 60 additions and 123 deletions
@@ -1,6 +1,5 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Text.Json;
using Microsoft.Agents.Orchestration;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI.Agents;
@@ -32,7 +31,6 @@ public static class HostApplicationBuilderAgentExtensions
new ActorType(agentKey),
(sp, ctx) => new ChatClientAgentActor(
sp.GetRequiredKeyedService<AIAgent>(agentKey),
sp.GetService<JsonSerializerOptions>() ?? JsonSerializerOptions.Web,
ctx,
sp.GetRequiredService<ILogger<ChatClientAgentActor>>()));