Refactor toolbox and function handling to support synthetic fields and improve type definitions

This commit is contained in:
2025-04-12 02:20:40 -04:00
parent 2ae583e9f3
commit 3093b988f8
13 changed files with 288 additions and 160 deletions

View File

@@ -134,15 +134,16 @@ func (a anthropic) requestToAnthropicRequest(req Request) anth.MessagesRequest {
}
}
if req.Toolbox != nil {
for _, tool := range req.Toolbox.funcs {
/*
for _, tool := range req.Toolbox.functions {
res.Tools = append(res.Tools, anth.ToolDefinition{
Name: tool.Name,
Description: tool.Description,
InputSchema: tool.Parameters,
InputSchema: tool.Parameters.OpenAIParameters(),
})
}
}
*/
res.Messages = msgs