- ChatManager:
- 引入 System.Text.Json,用于将 agent thread 序列化与反序列化(示例:thread.Serialize(...) -> JsonSerializer.Deserialize -> agent.DeserializeThread)。
- 增加示例:创建 OpenAIClient、初始化 agent、运行流式响应并处理更新。
- 小幅格式和空行调整。
- AiChatService:
- 为 Agent 发送接口 PostAgentSendAsync 增加注释与路由标记 HttpPost("ai-chat/agent/send")。
注意:提交中出现了硬编码的 API Key,请尽快改为从配置或机密管理中读取以防泄露。