added anthropic tool support i think

This commit is contained in:
2025-04-12 03:41:48 -04:00
parent 3093b988f8
commit 916f07be18
7 changed files with 79 additions and 27 deletions

View File

@@ -31,6 +31,14 @@ func (a array) GoogleParameters() *genai.Schema {
}
}
func (a array) AnthropicInputSchema() map[string]any {
return map[string]any{
"type": "array",
"description": a.Description(),
"items": a.items.AnthropicInputSchema(),
}
}
func (a array) FromAny(val any) (reflect.Value, error) {
v := reflect.ValueOf(val)