Collection of the named types.
Additional properties' info.
The additionalProperties
means the type schema info of the additional
properties that are not listed in the properties.
By the way, it is not allowed in the parameters level.
Optional
deprecatedWhether the type is deprecated or not.
Optional
descriptionDetailed description of the schema.
Optional
exampleExample value.
Optional
examplesList of example values as key-value pairs.
Properties of the object.
The properties
means a list of key-value pairs of the object's
regular properties. The key is the name of the regular property,
and the value is the type schema info.
List of key values of the required properties.
The required
means a list of the key values of the required
properties. If some property key is not listed in the required
list, it means that property is optional. Otherwise some property key
exists in the required
list, it means that the property must be filled.
Below is an example of the properties and required
.
interface SomeObject {
id: string;
email: string;
name?: string;
}
As you can see, id
and email
properties are required,
so that they are listed in the required
list.
{
"type": "object",
"properties": {
"id": { "type": "string" },
"email": { "type": "string" },
"name": { "type": "string" }
},
"required": ["id", "email"]
}
Optional
titleTitle of the schema.
Discriminator value of the type.
Type of the function parameters.
IChatGptSchema.IParameters
is a type defining a function's parameters as a keyworded object type.It also can be utilized for the structured output metadata.
Reference
https://platform.openai.com/docs/guides/structured-outputs