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 (e enum) GoogleParameters() *genai.Schema {
}
}
func (e enum) AnthropicInputSchema() map[string]any {
return map[string]any{
"type": "string",
"description": e.Description(),
"enum": e.values,
}
}
func (e enum) FromAny(val any) (reflect.Value, error) {
v := reflect.ValueOf(val)
if v.Kind() != reflect.String {