Skip to content

Commit 5f5d8af

Browse files
bug: include type for params
1 parent a0916b9 commit 5f5d8af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/openai/client.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ func (c *Client) Call(ctx context.Context, messageRequest types.CompletionReques
332332
for _, tool := range messageRequest.Tools {
333333
params := tool.Function.Parameters
334334
if params == nil {
335-
params = &openapi3.Schema{}
335+
params = &openapi3.Schema{
336+
Type: "object",
337+
Properties: openapi3.Schemas{},
338+
}
336339
}
337340

338341
request.Tools = append(request.Tools, openai.Tool{

0 commit comments

Comments
 (0)