feat: Round 5 - Memory Service, Tool Engine, Call Records, Thinking Logs
- Fix: Session history flash (race condition + WS guard) - Fix: Chat background overlay + sidebar transparency - Fix: IoT device control (Chinese action names, status field) - Feat: Independent memory-service (port 8091, 13 endpoints) - Feat: Independent tool-engine service (port 8092, 13 tools) - Feat: Tool call logs with paginated DevTools panel - Feat: Thinking log records with DevTools panel - Feat: Future development roadmap document - Chore: Updated .gitignore, go.work, DevTools config - Chore: 5-service health check, project review docs
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package model
|
||||
|
||||
// ToolDefinition 工具定义(用于 LLM function calling)
|
||||
type ToolDefinition struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Parameters map[string]interface{} `json:"parameters"`
|
||||
}
|
||||
|
||||
// ToolCall 工具调用请求
|
||||
type ToolCall struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Arguments map[string]interface{} `json:"arguments"`
|
||||
}
|
||||
|
||||
// ToolResult 工具执行结果
|
||||
type ToolResult struct {
|
||||
ID string `json:"id"`
|
||||
Output string `json:"output"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// ExecuteRequest 单个工具执行请求
|
||||
type ExecuteRequest struct {
|
||||
Arguments map[string]interface{} `json:"arguments"`
|
||||
}
|
||||
|
||||
// BatchExecuteRequest 批量执行请求
|
||||
type BatchExecuteRequest struct {
|
||||
Calls []ToolCall `json:"calls"`
|
||||
}
|
||||
|
||||
// BatchExecuteResponse 批量执行响应
|
||||
type BatchExecuteResponse struct {
|
||||
Results []ToolResult `json:"results"`
|
||||
}
|
||||
Reference in New Issue
Block a user