sync of changes

This commit is contained in:
Steve Dudenhoeffer 2024-11-09 19:50:14 -05:00
parent 37939088ed
commit cd4ad59a38
4 changed files with 3 additions and 4 deletions

View File

@ -87,7 +87,7 @@ func (a anthropic) requestToAnthropicRequest(req Request) anth.MessagesRequest {
}
}
for _, tool := range req.Toolbox {
for _, tool := range req.Toolbox.funcs {
res.Tools = append(res.Tools, anth.ToolDefinition{
Name: tool.Name,
Description: tool.Description,

View File

@ -30,7 +30,7 @@ func (g google) requestToGoogleRequest(in Request, model *genai.GenerativeModel)
res = append(res, genai.Text(c.Text))
}
for _, tool := range in.Toolbox {
for _, tool := range in.Toolbox.funcs {
panic("google ToolBox is todo" + tool.Name)
/*

1
llm.go
View File

@ -50,7 +50,6 @@ type Response struct {
type ChatCompletion interface {
ChatComplete(ctx context.Context, req Request) (Response, error)
SplitLongString(ctx context.Context, input string) ([]string, error)
}
type LLM interface {

View File

@ -57,7 +57,7 @@ func (o openaiImpl) requestToOpenAIRequest(request Request) oai.ChatCompletionRe
res.Messages = append(res.Messages, m)
}
for _, tool := range request.Toolbox {
for _, tool := range request.Toolbox.funcs {
res.Tools = append(res.Tools, oai.Tool{
Type: "function",
Function: &oai.FunctionDefinition{