Fix OpenAI error when properties is empty in function call : object schema missing properties (#419)

Co-authored-by: Rick <medivhzhan@icloud.com>
This commit is contained in:
Rick
2023-07-01 06:38:22 +08:00
committed by GitHub
parent 1efcf2d23d
commit 177c143be7

View File

@@ -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.