From 6439e1fcc93fc5175accf5d51358e45fa5ea9099 Mon Sep 17 00:00:00 2001 From: Tyler Gannon Date: Wed, 7 Aug 2024 12:40:45 -0700 Subject: [PATCH] Make reponse format JSONSchema optional (#820) --- chat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat.go b/chat.go index 8bfe558b5..31fa887d6 100644 --- a/chat.go +++ b/chat.go @@ -182,8 +182,8 @@ const ( ) type ChatCompletionResponseFormat struct { - Type ChatCompletionResponseFormatType `json:"type,omitempty"` - JSONSchema ChatCompletionResponseFormatJSONSchema `json:"json_schema,omitempty"` + Type ChatCompletionResponseFormatType `json:"type,omitempty"` + JSONSchema *ChatCompletionResponseFormatJSONSchema `json:"json_schema,omitempty"` } type ChatCompletionResponseFormatJSONSchema struct {