File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ func (g *geminiClient) convertMessages(messages []message.Message) []*genai.Cont
132
132
}
133
133
134
134
func (g * geminiClient ) convertTools (tools []tools.BaseTool ) []* genai.Tool {
135
- geminiTools := make ([]* genai.Tool , 0 , len (tools ))
135
+ geminiTool := & genai.Tool {}
136
+ geminiTool .FunctionDeclarations = make ([]* genai.FunctionDeclaration , 0 , len (tools ))
136
137
137
138
for _ , tool := range tools {
138
139
info := tool .Info ()
@@ -146,12 +147,10 @@ func (g *geminiClient) convertTools(tools []tools.BaseTool) []*genai.Tool {
146
147
},
147
148
}
148
149
149
- geminiTools = append (geminiTools , & genai.Tool {
150
- FunctionDeclarations : []* genai.FunctionDeclaration {declaration },
151
- })
150
+ geminiTool .FunctionDeclarations = append (geminiTool .FunctionDeclarations , declaration )
152
151
}
153
152
154
- return geminiTools
153
+ return [] * genai. Tool { geminiTool }
155
154
}
156
155
157
156
func (g * geminiClient ) finishReason (reason genai.FinishReason ) message.FinishReason {
You can’t perform that action at this time.
0 commit comments