Refactor toolbox and function handling to support synthetic fields and improve type definitions
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user