Skip to content

Commit 33e0b5c

Browse files
bug: include type for params
1 parent a0916b9 commit 33e0b5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/openai/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ 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+
}
336338
}
337339

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

0 commit comments

Comments
 (0)