mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Hide/remove some JSON utility classes (#1039)
This commit is contained in:
committed by
GitHub
Unverified
parent
1ec98130d2
commit
498fc06fd6
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using System.Text.Json;
|
||||
using Microsoft.Agents.AI.Hosting;
|
||||
|
||||
namespace AgentWebChat.Web;
|
||||
|
||||
@@ -13,7 +12,7 @@ public class AgentDiscoveryClient(HttpClient httpClient, ILogger<AgentDiscoveryC
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
var json = await response.Content.ReadAsStringAsync(cancellationToken);
|
||||
var agents = JsonSerializer.Deserialize<List<AgentDiscoveryCard>>(json, AgentHostingJsonUtilities.DefaultOptions) ?? [];
|
||||
var agents = JsonSerializer.Deserialize<List<AgentDiscoveryCard>>(json) ?? [];
|
||||
|
||||
logger.LogInformation("Retrieved {AgentCount} agents from the API", agents.Count);
|
||||
return agents;
|
||||
|
||||
Reference in New Issue
Block a user