Files
Cyrene/backend/tool-engine/internal/model/tool.go
T
AskaEth 78e3f450c2 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
2026-05-18 20:05:14 +08:00

38 lines
996 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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"`
}