From ac25f318ba29e1461ceec19f40bf5fd7765b7225 Mon Sep 17 00:00:00 2001 From: Alex Wormuth Date: Fri, 16 Jun 2023 08:11:50 -0500 Subject: [PATCH] add items, which is required for array type (#373) * add items, which is required for array type * use JSONSchemaDefine directly --- chat.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chat.go b/chat.go index c8cff31..4764e36 100644 --- a/chat.go +++ b/chat.go @@ -95,6 +95,8 @@ type JSONSchemaDefine struct { Properties map[string]*JSONSchemaDefine `json:"properties,omitempty"` // Required is a required of JSON Schema. It used if Type is JSONSchemaTypeObject. Required []string `json:"required,omitempty"` + // Items is a property of JSON Schema. It used if Type is JSONSchemaTypeArray. + Items *JSONSchemaDefine `json:"items,omitempty"` } type FinishReason string