Initial commit for ClawGo

This commit is contained in:
DBT
2026-02-12 02:57:27 +00:00
commit 4956b1a014
60 changed files with 9991 additions and 0 deletions

21
pkg/tools/base.go Normal file
View File

@@ -0,0 +1,21 @@
package tools
import "context"
type Tool interface {
Name() string
Description() string
Parameters() map[string]interface{}
Execute(ctx context.Context, args map[string]interface{}) (string, error)
}
func ToolToSchema(tool Tool) map[string]interface{} {
return map[string]interface{}{
"type": "function",
"function": map[string]interface{}{
"name": tool.Name(),
"description": tool.Description(),
"parameters": tool.Parameters(),
},
}
}