sync of changes
This commit is contained in:
parent
37939088ed
commit
cd4ad59a38
@ -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{
|
res.Tools = append(res.Tools, anth.ToolDefinition{
|
||||||
Name: tool.Name,
|
Name: tool.Name,
|
||||||
Description: tool.Description,
|
Description: tool.Description,
|
||||||
|
@ -30,7 +30,7 @@ func (g google) requestToGoogleRequest(in Request, model *genai.GenerativeModel)
|
|||||||
res = append(res, genai.Text(c.Text))
|
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)
|
panic("google ToolBox is todo" + tool.Name)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1
llm.go
1
llm.go
@ -50,7 +50,6 @@ type Response struct {
|
|||||||
|
|
||||||
type ChatCompletion interface {
|
type ChatCompletion interface {
|
||||||
ChatComplete(ctx context.Context, req Request) (Response, error)
|
ChatComplete(ctx context.Context, req Request) (Response, error)
|
||||||
SplitLongString(ctx context.Context, input string) ([]string, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type LLM interface {
|
type LLM interface {
|
||||||
|
@ -57,7 +57,7 @@ func (o openaiImpl) requestToOpenAIRequest(request Request) oai.ChatCompletionRe
|
|||||||
res.Messages = append(res.Messages, m)
|
res.Messages = append(res.Messages, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tool := range request.Toolbox {
|
for _, tool := range request.Toolbox.funcs {
|
||||||
res.Tools = append(res.Tools, oai.Tool{
|
res.Tools = append(res.Tools, oai.Tool{
|
||||||
Type: "function",
|
Type: "function",
|
||||||
Function: &oai.FunctionDefinition{
|
Function: &oai.FunctionDefinition{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user