feat: add weather tools to legacy and Eino chat

This commit is contained in:
loveuer committed 2026-11-16 19:08:18 +08:00
1 parent 6e6171f481
commit 86e86bc9fa
18 files changed
+926 -77

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package model
// ToolDefinition 描述可供模型调用的工具。
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
// ToolFunctionDefinition 包含工具名称、用途和参数的 JSON Schema。
type ToolFunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters map[string]any `json:"parameters"`
}
// WeatherArguments 指定要查询当前天气的地点。
type WeatherArguments struct {
Location string `json:"location"`
}