From 177c143be7c373a9b5d33e6c7c64ad3e6670a32c Mon Sep 17 00:00:00 2001 From: Rick Date: Sat, 1 Jul 2023 06:38:22 +0800 Subject: [PATCH] Fix OpenAI error when properties is empty in function call : object schema missing properties (#419) Co-authored-by: Rick --- jsonschema/json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonschema/json.go b/jsonschema/json.go index 24af858..c02d250 100644 --- a/jsonschema/json.go +++ b/jsonschema/json.go @@ -27,7 +27,7 @@ type Definition struct { // one element, where each element is unique. You will probably only use this with strings. Enum []string `json:"enum,omitempty"` // Properties describes the properties of an object, if the schema type is Object. - Properties map[string]Definition `json:"properties,omitempty"` + Properties map[string]Definition `json:"properties"` // Required specifies which properties are required, if the schema type is Object. Required []string `json:"required,omitempty"` // Items specifies which data type an array contains, if the schema type is Array.