Type Alias IChatGptSchema

Type schema info of the ChatGPT.

IChatGptSchema is a type schema info of the ChatGPT function calling.

IChatGptSchema basically follows the JSON schema definition of the OpenAPI v3.1 speciifcation; OpenApiV3_1.IJsonSchema.

However, the IChatGptSchema does not follow the entire specification of the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the list of how IChatGptSchema is different with the OpenAPI v3.1 JSON schema.

If compare with the OpenApi.IJsonSchema, the emended JSON schema specification,

For reference, if you've composed the IChatGptSchema type with the IChatGptSchema.IConfig.reference false option (default is false), only the recursived named types would be archived into the IChatGptSchema.IParameters.$defs, and the others would be ecaped from the IChatGptSchema.IReference type.

Also, OpenAI has banned below constraint properties. Instead, IChatGptSchema fills the IChatGptSchema.__IAttribute.description property with the comment text like "@format uuid".

Additionally, OpenAI cannot define the description property to the IChatGptSchema.IReference type, and even does not understand the capsulization to the IChatGptSchema.IAnyOf type. Therefore, the description is written to the parent object type, not the reference type.

{
"type": "object",
"description": "### Description of {@link something} property.\n\n> Hello?",
"properties": {
"something": {
"$ref": "#/$defs/SomeObject"
}
}
}

Specified not only by the official documentation, but also by my experiments. Therefore, its definitions can be inaccurate or be changed in the future. If you find any wrong or outdated definitions, please let me know by issue.

Jeongho Nam - https://github.com/samchon