docs: 更新 README.md 整合完整项目说明
- 整合所有核心功能说明(定价、MCP、TodoWrite、伪流式) - 添加完整的技术架构图和系统架构说明 - 提供详细的快速开始指南和使用示例 - 包含三个核心场景的完整演示 - 添加工具和 Skills 的详细说明 - 提供完整的文档导航和学习资源 - 包含项目统计、性能指标和常见问题 fix: 修复 StreamingStepAdvisor 类型转换错误 - 添加 instanceof 检查避免类型转换异常 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
55c9f8edf9
commit
85a3231574
2 files changed
+474
-116
No files matched your search
@@ -70,14 +70,16 @@ public class StreamingStepAdvisor implements BaseAdvisor {
|
||||
|
||||
// 捕获工具响应
|
||||
if (message.getMessageType() == org.springframework.ai.chat.messages.MessageType.TOOL) {
|
||||
var toolResponseMessage = (org.springframework.ai.chat.messages.ToolResponseMessage) message;
|
||||
for (var toolResponse : toolResponseMessage.getResponses()) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
event.put("type", "tool_response");
|
||||
event.put("tool_name", toolResponse.name());
|
||||
event.put("tool_id", toolResponse.id());
|
||||
event.put("response", truncate(toolResponse.responseData(), 500));
|
||||
emitEvent(event);
|
||||
if (message instanceof org.springframework.ai.chat.messages.ToolResponseMessage) {
|
||||
var toolResponseMessage = (org.springframework.ai.chat.messages.ToolResponseMessage) message;
|
||||
for (var toolResponse : toolResponseMessage.getResponses()) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
event.put("type", "tool_response");
|
||||
event.put("tool_name", toolResponse.name());
|
||||
event.put("tool_id", toolResponse.id());
|
||||
event.put("response", truncate(toolResponse.responseData(), 500));
|
||||
emitEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user