@agentica/core 0.29.4 → 0.29.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@ const StreamUtil_1 = require("../utils/StreamUtil");
58
58
  const FUNCTION = {
59
59
  model: "chatgpt",
60
60
  options: {
61
- reference: false,
61
+ reference: true,
62
62
  strict: false,
63
63
  separate: null
64
64
  },
@@ -72,6 +72,170 @@ const FUNCTION = {
72
72
  required: [],
73
73
  additionalProperties: false,
74
74
  $defs: {
75
+ IHttpLlmFunctionchatgpt: {
76
+ description: "LLM function calling schema from HTTP (OpenAPI) operation.\n\n`IHttpLlmFunction` is a data structure representing a function converted from\nthe {@link OpenApi.IOperation OpenAPI operation}, used for the LLM (Large\nLanguage Model) function calling. It's a typical RPC (Remote Procedure Call)\nstructure containing the function {@link name}, {@link parameters}, and\n{@link output return type}.\n\nIf you provide this `IHttpLlmFunction` data to the LLM provider like\n\"OpenAI\", the \"OpenAI\" will compose a function arguments by analyzing\nconversations with the user. With the LLM composed arguments, you can execute\nthe function through {@link LlmFetcher.execute} and get the result.\n\nFor reference, different between `IHttpLlmFunction` and its origin source\n{@link OpenApi.IOperation} is, `IHttpLlmFunction` has converted every type\nschema information from {@link OpenApi.IJsonSchema} to {@link ILlmSchemaV3} to\nescape {@link OpenApi.IJsonSchema.IReference reference types}, and downgrade\nthe version of the JSON schema to OpenAPI 3.0. It's because LLM function call\nfeature cannot understand both reference types and OpenAPI 3.1\nspecification.\n\nAdditionally, the properties' rule is:\n\n- `pathParameters`: Path parameters of {@link OpenApi.IOperation.parameters}\n- `query`: Query parameter of {@link IHttpMigrateRoute.query}\n- `body`: Body parameter of {@link IHttpMigrateRoute.body}\n\n```typescript\n{\n ...pathParameters,\n query,\n body,\n}\n```\n\n### Description of {@link parameters} property:\n\n> List of parameter types.\n> \n> If you've configured {@link IHttpLlmApplication.IOptions.keyword} as `true`,\n> number of {@link IHttpLlmFunction.parameters} are always 1 and the first\n> parameter's type is always {@link ILlmSchemaV3.IObject}. The properties'\n> rule is:\n> \n> - `pathParameters`: Path parameters of {@link IHttpMigrateRoute.parameters}\n> - `query`: Query parameter of {@link IHttpMigrateRoute.query}\n> - `body`: Body parameter of {@link IHttpMigrateRoute.body}\n> \n> ```typescript\n> {\n> ...pathParameters,\n> query,\n> body,\n> }\n> ```\n> \n> Otherwise, the parameters would be multiple, and the sequence of the\n> parameters are following below rules:\n> \n> ```typescript\n> [\n> ...pathParameters,\n> ...(query ? [query] : []),\n> ...(body ? [body] : []),\n> ];\n> ```\n\n### Description of {@link separated} property:\n\n> Collection of separated parameters.\n> \n> Filled only when {@link IHttpLlmApplication.IOptions.separate} is\n> configured.",
77
+ type: "object",
78
+ properties: {
79
+ method: {
80
+ title: "HTTP method of the endpoint",
81
+ description: "HTTP method of the endpoint.",
82
+ type: "string",
83
+ "enum": [
84
+ "get",
85
+ "post",
86
+ "patch",
87
+ "put",
88
+ "delete"
89
+ ]
90
+ },
91
+ path: {
92
+ title: "Path of the endpoint",
93
+ description: "Path of the endpoint.",
94
+ type: "string"
95
+ },
96
+ name: {
97
+ title: "Representative name of the function",
98
+ description: "Representative name of the function.\n\nThe `name` is a repsentative name identifying the function in the\n{@link IHttpLlmApplication}. The `name` value is just composed by joining\nthe {@link IHttpMigrateRoute.accessor} by underscore `_` character.\n\nHere is the composition rule of the {@link IHttpMigrateRoute.accessor}:\n\n> The `accessor` is composed with the following rules. At first, namespaces\n> are composed by static directory names in the {@link path}. Parametric\n> symbols represented by `:param` or `{param}` cannot be a part of the\n> namespace.\n\n> Instead, they would be a part of the function name. The function name is\n> composed with the {@link method HTTP method} and parametric symbols like\n> `getByParam` or `postByParam`. If there are multiple path parameters, they\n> would be concatenated by `And` like `getByParam1AndParam2`.\n\n> For refefence, if the {@link operation}'s {@link method} is `delete`, the\n> function name would be replaced to `erase` instead of `delete`. It is the\n> reason why the `delete` is a reserved keyword in many programming\n> languages.\n\n> - Example 1\n\n> - Path: `POST /shopping/sellers/sales`\n> - Accessor: `shopping.sellers.sales.post`\n> - Example 2\n\n> - Endpoint: `GET\n> /shoppings/sellers/sales/:saleId/reviews/:reviewId/comments/:id\n> - Accessor:\n> `shoppings.sellers.sales.reviews.getBySaleIdAndReviewIdAndCommentId`\n\n\n@maxLength 64",
99
+ type: "string"
100
+ },
101
+ parameters: {
102
+ title: "List of parameter types",
103
+ $ref: "#/$defs/IChatGptSchema.IParameters"
104
+ },
105
+ separated: {
106
+ title: "Collection of separated parameters",
107
+ $ref: "#/$defs/IHttpLlmFunction.ISeparatedchatgpt"
108
+ },
109
+ output: {
110
+ title: "Expected return type",
111
+ description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output` would be\n`undefined`.",
112
+ anyOf: [
113
+ {
114
+ $ref: "#/$defs/IChatGptSchema.IString"
115
+ },
116
+ {
117
+ $ref: "#/$defs/IChatGptSchema.INumber"
118
+ },
119
+ {
120
+ $ref: "#/$defs/IChatGptSchema.IInteger"
121
+ },
122
+ {
123
+ $ref: "#/$defs/IChatGptSchema.IBoolean"
124
+ },
125
+ {
126
+ $ref: "#/$defs/IChatGptSchema.IArray"
127
+ },
128
+ {
129
+ $ref: "#/$defs/IChatGptSchema.IObject"
130
+ },
131
+ {
132
+ $ref: "#/$defs/IChatGptSchema.IReference"
133
+ },
134
+ {
135
+ $ref: "#/$defs/IChatGptSchema.IAnyOf"
136
+ },
137
+ {
138
+ $ref: "#/$defs/IChatGptSchema.IUnknown"
139
+ },
140
+ {
141
+ $ref: "#/$defs/IChatGptSchema.INull"
142
+ }
143
+ ]
144
+ },
145
+ description: {
146
+ title: "Description of the function",
147
+ description: "Description of the function.\n\n`IHttpLlmFunction.description` is composed by below rule:\n\n1. Starts from the {@link OpenApi.IOperation.summary} paragraph.\n2. The next paragraphs are filled with the\n {@link OpenApi.IOperation.description}. By the way, if the first\n paragraph of {@link OpenApi.IOperation.description} is same with the\n {@link OpenApi.IOperation.summary}, it would not be duplicated.\n3. Parameters' descriptions are added with `@param` tag.\n4. {@link OpenApi.IOperation.security Security requirements} are added with\n `@security` tag.\n5. Tag names are added with `@tag` tag.\n6. If {@link OpenApi.IOperation.deprecated}, `@deprecated` tag is added.\n\nFor reference, the `description` is very important property to teach the\npurpose of the function to the LLM (Language Large Model), and LLM actually\ndetermines which function to call by the description.\n\nAlso, when the LLM conversates with the user, the `description` is used to\nexplain the function to the user. Therefore, the `description` property has\nthe highest priority, and you have to consider it.",
148
+ type: "string"
149
+ },
150
+ deprecated: {
151
+ title: "Whether the function is deprecated or not",
152
+ description: "Whether the function is deprecated or not.\n\nIf the `deprecated` is `true`, the function is not recommended to use.\n\nLLM (Large Language Model) may not use the deprecated function.",
153
+ type: "boolean"
154
+ },
155
+ tags: {
156
+ title: "Category tags for the function",
157
+ description: "Category tags for the function.\n\nSame with {@link OpenApi.IOperation.tags} indicating the category of the\nfunction.",
158
+ type: "array",
159
+ items: {
160
+ type: "string"
161
+ }
162
+ }
163
+ },
164
+ required: [
165
+ "method",
166
+ "path",
167
+ "name",
168
+ "parameters"
169
+ ]
170
+ },
171
+ "IChatGptSchema.IParameters": {
172
+ description: "Type of the function parameters.\n\n`IChatGptSchema.IParameters` is a type defining a function's parameters as\na keyworded object type.\n\nIt also can be utilized for the structured output metadata.\n\n### Description of {@link $defs} property:\n\n> Collection of the named types.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's regular\n> properties. The key is the name of the regular property, and the value is\n> the type schema info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
173
+ type: "object",
174
+ properties: {
175
+ $defs: {
176
+ title: "Collection of the named types",
177
+ $ref: "#/$defs/RecordstringIChatGptSchema"
178
+ },
179
+ additionalProperties: {
180
+ title: "Additional properties' info",
181
+ description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, it is not allowed in the parameters level.",
182
+ type: "boolean",
183
+ "enum": [
184
+ false
185
+ ]
186
+ },
187
+ type: {
188
+ title: "Discriminator value of the type",
189
+ description: "Discriminator value of the type.",
190
+ type: "string",
191
+ "enum": [
192
+ "object"
193
+ ]
194
+ },
195
+ properties: {
196
+ title: "Properties of the object",
197
+ $ref: "#/$defs/RecordstringIChatGptSchema"
198
+ },
199
+ required: {
200
+ title: "List of key values of the required properties",
201
+ description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be\nfilled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
202
+ type: "array",
203
+ items: {
204
+ type: "string"
205
+ }
206
+ },
207
+ title: {
208
+ title: "Title of the schema",
209
+ description: "Title of the schema.",
210
+ type: "string"
211
+ },
212
+ description: {
213
+ title: "Detailed description of the schema",
214
+ description: "Detailed description of the schema.",
215
+ type: "string"
216
+ },
217
+ deprecated: {
218
+ title: "Whether the type is deprecated or not",
219
+ description: "Whether the type is deprecated or not.",
220
+ type: "boolean"
221
+ },
222
+ example: {
223
+ title: "Example value",
224
+ description: "Example value."
225
+ },
226
+ examples: {
227
+ title: "List of example values as key-value pairs",
228
+ $ref: "#/$defs/Recordstringany"
229
+ }
230
+ },
231
+ required: [
232
+ "$defs",
233
+ "additionalProperties",
234
+ "type",
235
+ "properties",
236
+ "required"
237
+ ]
238
+ },
75
239
  RecordstringIChatGptSchema: {
76
240
  description: "Construct a type with a set of properties K of type T",
77
241
  type: "object",
@@ -83,211 +247,19 @@ const FUNCTION = {
83
247
  },
84
248
  IChatGptSchema: {
85
249
  title: "Type schema info of the ChatGPT",
86
- description: "Type schema info of the ChatGPT.\n\n`IChatGptSchema` is a type schema info of the ChatGPT function calling.\n\n`IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\nspeciifcation; {@link OpenApiV3_1.IJsonSchema}.\n\nHowever, the `IChatGptSchema` does not follow the entire specification of\nthe OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\nlist of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n- Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n- Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n- When {@link IChatGptSchema.IConfig.strict} mode\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nIf compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n\n- {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n- {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n- {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n- {@link IChatGptSchema.additionalProperties} is fixed to `false`\n- No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n- When {@link IChatGptSchema.IConfig.strict} mode\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nFor reference, if you've composed the `IChatGptSchema` type with the\n{@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\nonly the recursived named types would be archived into the\n{@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n{@link IChatGptSchema.IReference} type.\n\nAlso, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\nfills the {@link IChatGptSchema.__IAttribute.description} property with\nthe comment text like `\"@format uuid\"`.\n\n- {@link OpenApi.IJsonSchema.INumber.minimum}\n- {@link OpenApi.IJsonSchema.INumber.maximum}\n- {@link OpenApi.IJsonSchema.INumber.multipleOf}\n- {@link OpenApi.IJsonSchema.IString.minLength}\n- {@link OpenApi.IJsonSchema.IString.maxLength}\n- {@link OpenApi.IJsonSchema.IString.format}\n- {@link OpenApi.IJsonSchema.IString.pattern}\n- {@link OpenApi.IJsonSchema.IString.contentMediaType}\n- {@link OpenApi.IJsonSchema.IString.default}\n- {@link OpenApi.IJsonSchema.IArray.minItems}\n- {@link OpenApi.IJsonSchema.IArray.maxItems}\n- {@link OpenApi.IJsonSchema.IArray.unique}\n\nAdditionally, OpenAI cannot define the `description` property to the\n{@link IChatGptSchema.IReference} type, and even does not understand\nthe capsulization to the {@link IChatGptSchema.IAnyOf} type.\nTherefore, the `description` is written to the parent object type,\nnot the reference type.\n\n```json\n{\n \"type\": \"object\",\n \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n \"properties\": {\n \"something\": {\n \"$ref\": \"#/$defs/SomeObject\"\n }\n }\n}\n```",
250
+ description: "Type schema info of the ChatGPT.\n\n`IChatGptSchema` is a type schema info of the ChatGPT function calling.\n\n`IChatGptSchema` basically follows the JSON schema definition of the OpenAPI\nv3.1 speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n\nHowever, the `IChatGptSchema` does not follow the entire specification of the\nOpenAPI v3.1. It has own specific restrictions and definitions. Here is the\nlist of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property:\n {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n- Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n- Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to\n {@link IChatGptSchema.IReference}\n- When {@link IChatGptSchema.IConfig.strict} mode\n\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nIf compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema\nspecification,\n\n- {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n- {@link IChatGptSchema.IParameters.$defs} instead of the\n {@link OpenApi.IJsonSchema.IComponents.schemas}\n- {@link IChatGptSchema.IString.enum} instead of the\n {@link OpenApi.IJsonSchema.IConstant}\n- {@link IChatGptSchema.additionalProperties} is fixed to `false`\n- No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n- When {@link IChatGptSchema.IConfig.strict} mode\n\n - Every object properties must be required\n - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n\nFor reference, if you've composed the `IChatGptSchema` type with the\n{@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\nonly the recursived named types would be archived into the\n{@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from\nthe {@link IChatGptSchema.IReference} type.\n\nAlso, OpenAI has banned below constraint properties. Instead,\n`IChatGptSchema` fills the {@link IChatGptSchema.__IAttribute.description}\nproperty with the comment text like `\"@format uuid\"`.\n\n- {@link OpenApi.IJsonSchema.INumber.minimum}\n- {@link OpenApi.IJsonSchema.INumber.maximum}\n- {@link OpenApi.IJsonSchema.INumber.multipleOf}\n- {@link OpenApi.IJsonSchema.IString.minLength}\n- {@link OpenApi.IJsonSchema.IString.maxLength}\n- {@link OpenApi.IJsonSchema.IString.format}\n- {@link OpenApi.IJsonSchema.IString.pattern}\n- {@link OpenApi.IJsonSchema.IString.contentMediaType}\n- {@link OpenApi.IJsonSchema.IString.default}\n- {@link OpenApi.IJsonSchema.IArray.minItems}\n- {@link OpenApi.IJsonSchema.IArray.maxItems}\n- {@link OpenApi.IJsonSchema.IArray.unique}\n\nAdditionally, OpenAI cannot define the `description` property to the\n{@link IChatGptSchema.IReference} type, and even does not understand the\ncapsulization to the {@link IChatGptSchema.IAnyOf} type. Therefore, the\n`description` is written to the parent object type, not the reference type.\n\n```json\n{\n \"type\": \"object\",\n \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n \"properties\": {\n \"something\": {\n \"$ref\": \"#/$defs/SomeObject\"\n }\n }\n}\n```",
87
251
  anyOf: [
88
252
  {
89
- type: "object",
90
- properties: {
91
- "enum": {
92
- title: "Enumeration values",
93
- description: "Enumeration values.",
94
- type: "array",
95
- items: {
96
- type: "boolean"
97
- }
98
- },
99
- type: {
100
- title: "Discriminator value of the type",
101
- description: "Discriminator value of the type.",
102
- type: "string",
103
- "enum": [
104
- "boolean"
105
- ]
106
- },
107
- title: {
108
- title: "Title of the schema",
109
- description: "Title of the schema.",
110
- type: "string"
111
- },
112
- description: {
113
- title: "Detailed description of the schema",
114
- description: "Detailed description of the schema.",
115
- type: "string"
116
- },
117
- deprecated: {
118
- title: "Whether the type is deprecated or not",
119
- description: "Whether the type is deprecated or not.",
120
- type: "boolean"
121
- },
122
- example: {
123
- title: "Example value",
124
- description: "Example value."
125
- },
126
- examples: {
127
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
128
- type: "object",
129
- properties: {},
130
- required: [],
131
- additionalProperties: {}
132
- }
133
- },
134
- required: [
135
- "type"
136
- ],
137
- description: "Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
253
+ $ref: "#/$defs/IChatGptSchema.IBoolean"
138
254
  },
139
255
  {
140
- type: "object",
141
- properties: {
142
- "enum": {
143
- title: "Enumeration values",
144
- description: "Enumeration values.",
145
- type: "array",
146
- items: {
147
- type: "number"
148
- }
149
- },
150
- type: {
151
- title: "Discriminator value of the type",
152
- description: "Discriminator value of the type.",
153
- type: "string",
154
- "enum": [
155
- "integer"
156
- ]
157
- },
158
- title: {
159
- title: "Title of the schema",
160
- description: "Title of the schema.",
161
- type: "string"
162
- },
163
- description: {
164
- title: "Detailed description of the schema",
165
- description: "Detailed description of the schema.",
166
- type: "string"
167
- },
168
- deprecated: {
169
- title: "Whether the type is deprecated or not",
170
- description: "Whether the type is deprecated or not.",
171
- type: "boolean"
172
- },
173
- example: {
174
- title: "Example value",
175
- description: "Example value."
176
- },
177
- examples: {
178
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
179
- type: "object",
180
- properties: {},
181
- required: [],
182
- additionalProperties: {}
183
- }
184
- },
185
- required: [
186
- "type"
187
- ],
188
- description: "Description of the current {@link IChatGptSchema.IInteger} type:\n\n> Integer type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
256
+ $ref: "#/$defs/IChatGptSchema.IInteger"
189
257
  },
190
258
  {
191
- type: "object",
192
- properties: {
193
- "enum": {
194
- title: "Enumeration values",
195
- description: "Enumeration values.",
196
- type: "array",
197
- items: {
198
- type: "number"
199
- }
200
- },
201
- type: {
202
- title: "Discriminator value of the type",
203
- description: "Discriminator value of the type.",
204
- type: "string",
205
- "enum": [
206
- "number"
207
- ]
208
- },
209
- title: {
210
- title: "Title of the schema",
211
- description: "Title of the schema.",
212
- type: "string"
213
- },
214
- description: {
215
- title: "Detailed description of the schema",
216
- description: "Detailed description of the schema.",
217
- type: "string"
218
- },
219
- deprecated: {
220
- title: "Whether the type is deprecated or not",
221
- description: "Whether the type is deprecated or not.",
222
- type: "boolean"
223
- },
224
- example: {
225
- title: "Example value",
226
- description: "Example value."
227
- },
228
- examples: {
229
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
230
- type: "object",
231
- properties: {},
232
- required: [],
233
- additionalProperties: {}
234
- }
235
- },
236
- required: [
237
- "type"
238
- ],
239
- description: "Description of the current {@link IChatGptSchema.INumber} type:\n\n> Number (double) type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
259
+ $ref: "#/$defs/IChatGptSchema.INumber"
240
260
  },
241
261
  {
242
- type: "object",
243
- properties: {
244
- "enum": {
245
- title: "Enumeration values",
246
- description: "Enumeration values.",
247
- type: "array",
248
- items: {
249
- type: "string"
250
- }
251
- },
252
- type: {
253
- title: "Discriminator value of the type",
254
- description: "Discriminator value of the type.",
255
- type: "string",
256
- "enum": [
257
- "string"
258
- ]
259
- },
260
- title: {
261
- title: "Title of the schema",
262
- description: "Title of the schema.",
263
- type: "string"
264
- },
265
- description: {
266
- title: "Detailed description of the schema",
267
- description: "Detailed description of the schema.",
268
- type: "string"
269
- },
270
- deprecated: {
271
- title: "Whether the type is deprecated or not",
272
- description: "Whether the type is deprecated or not.",
273
- type: "boolean"
274
- },
275
- example: {
276
- title: "Example value",
277
- description: "Example value."
278
- },
279
- examples: {
280
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
281
- type: "object",
282
- properties: {},
283
- required: [],
284
- additionalProperties: {}
285
- }
286
- },
287
- required: [
288
- "type"
289
- ],
290
- description: "Description of the current {@link IChatGptSchema.IString} type:\n\n> String type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
262
+ $ref: "#/$defs/IChatGptSchema.IString"
291
263
  },
292
264
  {
293
265
  $ref: "#/$defs/IChatGptSchema.IArray"
@@ -296,128 +268,220 @@ const FUNCTION = {
296
268
  $ref: "#/$defs/IChatGptSchema.IObject"
297
269
  },
298
270
  {
299
- type: "object",
300
- properties: {
301
- $ref: {
302
- title: "Reference to the named schema",
303
- description: "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/$defs/` which means the type is stored in\nthe {@link IChatGptSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`",
304
- type: "string"
305
- },
306
- title: {
307
- title: "Title of the schema",
308
- description: "Title of the schema.",
309
- type: "string"
310
- },
311
- description: {
312
- title: "Detailed description of the schema",
313
- description: "Detailed description of the schema.",
314
- type: "string"
315
- },
316
- deprecated: {
317
- title: "Whether the type is deprecated or not",
318
- description: "Whether the type is deprecated or not.",
319
- type: "boolean"
320
- },
321
- example: {
322
- title: "Example value",
323
- description: "Example value."
324
- },
325
- examples: {
326
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
327
- type: "object",
328
- properties: {},
329
- required: [],
330
- additionalProperties: {}
331
- }
332
- },
333
- required: [
334
- "$ref"
335
- ],
336
- description: "Description of the current {@link IChatGptSchema.IReference} type:\n\n> Reference type directing named schema.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
271
+ $ref: "#/$defs/IChatGptSchema.IReference"
272
+ },
273
+ {
274
+ $ref: "#/$defs/IChatGptSchema.IAnyOf"
275
+ },
276
+ {
277
+ $ref: "#/$defs/IChatGptSchema.INull"
278
+ },
279
+ {
280
+ $ref: "#/$defs/IChatGptSchema.IUnknown"
281
+ }
282
+ ]
283
+ },
284
+ "IChatGptSchema.IBoolean": {
285
+ description: "Boolean type info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
286
+ type: "object",
287
+ properties: {
288
+ "enum": {
289
+ title: "Enumeration values",
290
+ description: "Enumeration values.",
291
+ type: "array",
292
+ items: {
293
+ type: "boolean"
294
+ }
295
+ },
296
+ type: {
297
+ title: "Discriminator value of the type",
298
+ description: "Discriminator value of the type.",
299
+ type: "string",
300
+ "enum": [
301
+ "boolean"
302
+ ]
303
+ },
304
+ title: {
305
+ title: "Title of the schema",
306
+ description: "Title of the schema.",
307
+ type: "string"
308
+ },
309
+ description: {
310
+ title: "Detailed description of the schema",
311
+ description: "Detailed description of the schema.",
312
+ type: "string"
313
+ },
314
+ deprecated: {
315
+ title: "Whether the type is deprecated or not",
316
+ description: "Whether the type is deprecated or not.",
317
+ type: "boolean"
318
+ },
319
+ example: {
320
+ title: "Example value",
321
+ description: "Example value."
322
+ },
323
+ examples: {
324
+ title: "List of example values as key-value pairs",
325
+ $ref: "#/$defs/Recordstringany"
326
+ }
327
+ },
328
+ required: [
329
+ "type"
330
+ ]
331
+ },
332
+ Recordstringany: {
333
+ description: "Construct a type with a set of properties K of type T",
334
+ type: "object",
335
+ properties: {},
336
+ required: [],
337
+ additionalProperties: {}
338
+ },
339
+ "IChatGptSchema.IInteger": {
340
+ description: "Integer type info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
341
+ type: "object",
342
+ properties: {
343
+ "enum": {
344
+ title: "Enumeration values",
345
+ description: "Enumeration values.",
346
+ type: "array",
347
+ items: {
348
+ type: "number"
349
+ }
350
+ },
351
+ type: {
352
+ title: "Discriminator value of the type",
353
+ description: "Discriminator value of the type.",
354
+ type: "string",
355
+ "enum": [
356
+ "integer"
357
+ ]
358
+ },
359
+ title: {
360
+ title: "Title of the schema",
361
+ description: "Title of the schema.",
362
+ type: "string"
363
+ },
364
+ description: {
365
+ title: "Detailed description of the schema",
366
+ description: "Detailed description of the schema.",
367
+ type: "string"
368
+ },
369
+ deprecated: {
370
+ title: "Whether the type is deprecated or not",
371
+ description: "Whether the type is deprecated or not.",
372
+ type: "boolean"
373
+ },
374
+ example: {
375
+ title: "Example value",
376
+ description: "Example value."
377
+ },
378
+ examples: {
379
+ title: "List of example values as key-value pairs",
380
+ $ref: "#/$defs/Recordstringany"
381
+ }
382
+ },
383
+ required: [
384
+ "type"
385
+ ]
386
+ },
387
+ "IChatGptSchema.INumber": {
388
+ description: "Number (double) type info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
389
+ type: "object",
390
+ properties: {
391
+ "enum": {
392
+ title: "Enumeration values",
393
+ description: "Enumeration values.",
394
+ type: "array",
395
+ items: {
396
+ type: "number"
397
+ }
398
+ },
399
+ type: {
400
+ title: "Discriminator value of the type",
401
+ description: "Discriminator value of the type.",
402
+ type: "string",
403
+ "enum": [
404
+ "number"
405
+ ]
406
+ },
407
+ title: {
408
+ title: "Title of the schema",
409
+ description: "Title of the schema.",
410
+ type: "string"
411
+ },
412
+ description: {
413
+ title: "Detailed description of the schema",
414
+ description: "Detailed description of the schema.",
415
+ type: "string"
416
+ },
417
+ deprecated: {
418
+ title: "Whether the type is deprecated or not",
419
+ description: "Whether the type is deprecated or not.",
420
+ type: "boolean"
421
+ },
422
+ example: {
423
+ title: "Example value",
424
+ description: "Example value."
425
+ },
426
+ examples: {
427
+ title: "List of example values as key-value pairs",
428
+ $ref: "#/$defs/Recordstringany"
429
+ }
430
+ },
431
+ required: [
432
+ "type"
433
+ ]
434
+ },
435
+ "IChatGptSchema.IString": {
436
+ description: "String type info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
437
+ type: "object",
438
+ properties: {
439
+ "enum": {
440
+ title: "Enumeration values",
441
+ description: "Enumeration values.",
442
+ type: "array",
443
+ items: {
444
+ type: "string"
445
+ }
446
+ },
447
+ type: {
448
+ title: "Discriminator value of the type",
449
+ description: "Discriminator value of the type.",
450
+ type: "string",
451
+ "enum": [
452
+ "string"
453
+ ]
454
+ },
455
+ title: {
456
+ title: "Title of the schema",
457
+ description: "Title of the schema.",
458
+ type: "string"
337
459
  },
338
- {
339
- $ref: "#/$defs/IChatGptSchema.IAnyOf"
460
+ description: {
461
+ title: "Detailed description of the schema",
462
+ description: "Detailed description of the schema.",
463
+ type: "string"
340
464
  },
341
- {
342
- type: "object",
343
- properties: {
344
- type: {
345
- title: "Discriminator value of the type",
346
- description: "Discriminator value of the type.",
347
- type: "string",
348
- "enum": [
349
- "null"
350
- ]
351
- },
352
- title: {
353
- title: "Title of the schema",
354
- description: "Title of the schema.",
355
- type: "string"
356
- },
357
- description: {
358
- title: "Detailed description of the schema",
359
- description: "Detailed description of the schema.",
360
- type: "string"
361
- },
362
- deprecated: {
363
- title: "Whether the type is deprecated or not",
364
- description: "Whether the type is deprecated or not.",
365
- type: "boolean"
366
- },
367
- example: {
368
- title: "Example value",
369
- description: "Example value."
370
- },
371
- examples: {
372
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
373
- type: "object",
374
- properties: {},
375
- required: [],
376
- additionalProperties: {}
377
- }
378
- },
379
- required: [
380
- "type"
381
- ],
382
- description: "Description of the current {@link IChatGptSchema.INull} type:\n\n> Null type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
465
+ deprecated: {
466
+ title: "Whether the type is deprecated or not",
467
+ description: "Whether the type is deprecated or not.",
468
+ type: "boolean"
383
469
  },
384
- {
385
- type: "object",
386
- properties: {
387
- title: {
388
- title: "Title of the schema",
389
- description: "Title of the schema.",
390
- type: "string"
391
- },
392
- description: {
393
- title: "Detailed description of the schema",
394
- description: "Detailed description of the schema.",
395
- type: "string"
396
- },
397
- deprecated: {
398
- title: "Whether the type is deprecated or not",
399
- description: "Whether the type is deprecated or not.",
400
- type: "boolean"
401
- },
402
- example: {
403
- title: "Example value",
404
- description: "Example value."
405
- },
406
- examples: {
407
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
408
- type: "object",
409
- properties: {},
410
- required: [],
411
- additionalProperties: {}
412
- }
413
- },
414
- required: [],
415
- description: "Description of the current {@link IChatGptSchema.IUnknown} type:\n\n> Unknown, the `any` type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
470
+ example: {
471
+ title: "Example value",
472
+ description: "Example value."
473
+ },
474
+ examples: {
475
+ title: "List of example values as key-value pairs",
476
+ $ref: "#/$defs/Recordstringany"
416
477
  }
478
+ },
479
+ required: [
480
+ "type"
417
481
  ]
418
482
  },
419
483
  "IChatGptSchema.IArray": {
420
- description: "Array type info.\n\n### Description of {@link items} property:\n\n> Items type info.\n> \n> The `items` means the type of the array elements. In other words, it is\n> the type schema info of the `T` in the TypeScript array type `Array<T>`.",
484
+ description: "Array type info.\n\n### Description of {@link items} property:\n\n> Items type info.\n> \n> The `items` means the type of the array elements. In other words, it is\n> the type schema info of the `T` in the TypeScript array type `Array<T>`.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
421
485
  type: "object",
422
486
  properties: {
423
487
  items: {
@@ -452,11 +516,8 @@ const FUNCTION = {
452
516
  description: "Example value."
453
517
  },
454
518
  examples: {
455
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
456
- type: "object",
457
- properties: {},
458
- required: [],
459
- additionalProperties: {}
519
+ title: "List of example values as key-value pairs",
520
+ $ref: "#/$defs/Recordstringany"
460
521
  }
461
522
  },
462
523
  required: [
@@ -465,7 +526,7 @@ const FUNCTION = {
465
526
  ]
466
527
  },
467
528
  "IChatGptSchema.IObject": {
468
- description: "Object type info.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property,\n> and the value is the type schema info.",
529
+ description: "Object type info.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's regular\n> properties. The key is the name of the regular property, and the value is\n> the type schema info.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
469
530
  type: "object",
470
531
  properties: {
471
532
  properties: {
@@ -474,214 +535,22 @@ const FUNCTION = {
474
535
  },
475
536
  additionalProperties: {
476
537
  title: "Additional properties' info",
477
- description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, if you've configured {@link IChatGptSchema.IConfig.strict} as `true`,\nChatGPT function calling does not support such dynamic key typed properties, so\nthe `additionalProperties` becomes always `false`.",
538
+ description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, if you've configured {@link IChatGptSchema.IConfig.strict} as\n`true`, ChatGPT function calling does not support such dynamic key typed\nproperties, so the `additionalProperties` becomes always `false`.",
478
539
  anyOf: [
479
540
  {
480
541
  type: "boolean"
481
542
  },
482
543
  {
483
- type: "object",
484
- properties: {
485
- "enum": {
486
- title: "Enumeration values",
487
- description: "Enumeration values.",
488
- type: "array",
489
- items: {
490
- type: "string"
491
- }
492
- },
493
- type: {
494
- title: "Discriminator value of the type",
495
- description: "Discriminator value of the type.",
496
- type: "string",
497
- "enum": [
498
- "string"
499
- ]
500
- },
501
- title: {
502
- title: "Title of the schema",
503
- description: "Title of the schema.",
504
- type: "string"
505
- },
506
- description: {
507
- title: "Detailed description of the schema",
508
- description: "Detailed description of the schema.",
509
- type: "string"
510
- },
511
- deprecated: {
512
- title: "Whether the type is deprecated or not",
513
- description: "Whether the type is deprecated or not.",
514
- type: "boolean"
515
- },
516
- example: {
517
- title: "Example value",
518
- description: "Example value."
519
- },
520
- examples: {
521
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
522
- type: "object",
523
- properties: {},
524
- required: [],
525
- additionalProperties: {}
526
- }
527
- },
528
- required: [
529
- "type"
530
- ],
531
- description: "Description of the current {@link IChatGptSchema.IString} type:\n\n> String type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
544
+ $ref: "#/$defs/IChatGptSchema.IString"
532
545
  },
533
546
  {
534
- type: "object",
535
- properties: {
536
- "enum": {
537
- title: "Enumeration values",
538
- description: "Enumeration values.",
539
- type: "array",
540
- items: {
541
- type: "number"
542
- }
543
- },
544
- type: {
545
- title: "Discriminator value of the type",
546
- description: "Discriminator value of the type.",
547
- type: "string",
548
- "enum": [
549
- "number"
550
- ]
551
- },
552
- title: {
553
- title: "Title of the schema",
554
- description: "Title of the schema.",
555
- type: "string"
556
- },
557
- description: {
558
- title: "Detailed description of the schema",
559
- description: "Detailed description of the schema.",
560
- type: "string"
561
- },
562
- deprecated: {
563
- title: "Whether the type is deprecated or not",
564
- description: "Whether the type is deprecated or not.",
565
- type: "boolean"
566
- },
567
- example: {
568
- title: "Example value",
569
- description: "Example value."
570
- },
571
- examples: {
572
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
573
- type: "object",
574
- properties: {},
575
- required: [],
576
- additionalProperties: {}
577
- }
578
- },
579
- required: [
580
- "type"
581
- ],
582
- description: "Description of the current {@link IChatGptSchema.INumber} type:\n\n> Number (double) type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
547
+ $ref: "#/$defs/IChatGptSchema.INumber"
583
548
  },
584
549
  {
585
- type: "object",
586
- properties: {
587
- "enum": {
588
- title: "Enumeration values",
589
- description: "Enumeration values.",
590
- type: "array",
591
- items: {
592
- type: "number"
593
- }
594
- },
595
- type: {
596
- title: "Discriminator value of the type",
597
- description: "Discriminator value of the type.",
598
- type: "string",
599
- "enum": [
600
- "integer"
601
- ]
602
- },
603
- title: {
604
- title: "Title of the schema",
605
- description: "Title of the schema.",
606
- type: "string"
607
- },
608
- description: {
609
- title: "Detailed description of the schema",
610
- description: "Detailed description of the schema.",
611
- type: "string"
612
- },
613
- deprecated: {
614
- title: "Whether the type is deprecated or not",
615
- description: "Whether the type is deprecated or not.",
616
- type: "boolean"
617
- },
618
- example: {
619
- title: "Example value",
620
- description: "Example value."
621
- },
622
- examples: {
623
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
624
- type: "object",
625
- properties: {},
626
- required: [],
627
- additionalProperties: {}
628
- }
629
- },
630
- required: [
631
- "type"
632
- ],
633
- description: "Description of the current {@link IChatGptSchema.IInteger} type:\n\n> Integer type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
550
+ $ref: "#/$defs/IChatGptSchema.IInteger"
634
551
  },
635
552
  {
636
- type: "object",
637
- properties: {
638
- "enum": {
639
- title: "Enumeration values",
640
- description: "Enumeration values.",
641
- type: "array",
642
- items: {
643
- type: "boolean"
644
- }
645
- },
646
- type: {
647
- title: "Discriminator value of the type",
648
- description: "Discriminator value of the type.",
649
- type: "string",
650
- "enum": [
651
- "boolean"
652
- ]
653
- },
654
- title: {
655
- title: "Title of the schema",
656
- description: "Title of the schema.",
657
- type: "string"
658
- },
659
- description: {
660
- title: "Detailed description of the schema",
661
- description: "Detailed description of the schema.",
662
- type: "string"
663
- },
664
- deprecated: {
665
- title: "Whether the type is deprecated or not",
666
- description: "Whether the type is deprecated or not.",
667
- type: "boolean"
668
- },
669
- example: {
670
- title: "Example value",
671
- description: "Example value."
672
- },
673
- examples: {
674
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
675
- type: "object",
676
- properties: {},
677
- required: [],
678
- additionalProperties: {}
679
- }
680
- },
681
- required: [
682
- "type"
683
- ],
684
- description: "Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
553
+ $ref: "#/$defs/IChatGptSchema.IBoolean"
685
554
  },
686
555
  {
687
556
  $ref: "#/$defs/IChatGptSchema.IArray"
@@ -690,129 +559,22 @@ const FUNCTION = {
690
559
  $ref: "#/$defs/IChatGptSchema.IObject"
691
560
  },
692
561
  {
693
- type: "object",
694
- properties: {
695
- $ref: {
696
- title: "Reference to the named schema",
697
- description: "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/$defs/` which means the type is stored in\nthe {@link IChatGptSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`",
698
- type: "string"
699
- },
700
- title: {
701
- title: "Title of the schema",
702
- description: "Title of the schema.",
703
- type: "string"
704
- },
705
- description: {
706
- title: "Detailed description of the schema",
707
- description: "Detailed description of the schema.",
708
- type: "string"
709
- },
710
- deprecated: {
711
- title: "Whether the type is deprecated or not",
712
- description: "Whether the type is deprecated or not.",
713
- type: "boolean"
714
- },
715
- example: {
716
- title: "Example value",
717
- description: "Example value."
718
- },
719
- examples: {
720
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
721
- type: "object",
722
- properties: {},
723
- required: [],
724
- additionalProperties: {}
725
- }
726
- },
727
- required: [
728
- "$ref"
729
- ],
730
- description: "Description of the current {@link IChatGptSchema.IReference} type:\n\n> Reference type directing named schema.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
562
+ $ref: "#/$defs/IChatGptSchema.IReference"
731
563
  },
732
564
  {
733
565
  $ref: "#/$defs/IChatGptSchema.IAnyOf"
734
566
  },
735
567
  {
736
- type: "object",
737
- properties: {
738
- title: {
739
- title: "Title of the schema",
740
- description: "Title of the schema.",
741
- type: "string"
742
- },
743
- description: {
744
- title: "Detailed description of the schema",
745
- description: "Detailed description of the schema.",
746
- type: "string"
747
- },
748
- deprecated: {
749
- title: "Whether the type is deprecated or not",
750
- description: "Whether the type is deprecated or not.",
751
- type: "boolean"
752
- },
753
- example: {
754
- title: "Example value",
755
- description: "Example value."
756
- },
757
- examples: {
758
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
759
- type: "object",
760
- properties: {},
761
- required: [],
762
- additionalProperties: {}
763
- }
764
- },
765
- required: [],
766
- description: "Description of the current {@link IChatGptSchema.IUnknown} type:\n\n> Unknown, the `any` type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
568
+ $ref: "#/$defs/IChatGptSchema.IUnknown"
767
569
  },
768
570
  {
769
- type: "object",
770
- properties: {
771
- type: {
772
- title: "Discriminator value of the type",
773
- description: "Discriminator value of the type.",
774
- type: "string",
775
- "enum": [
776
- "null"
777
- ]
778
- },
779
- title: {
780
- title: "Title of the schema",
781
- description: "Title of the schema.",
782
- type: "string"
783
- },
784
- description: {
785
- title: "Detailed description of the schema",
786
- description: "Detailed description of the schema.",
787
- type: "string"
788
- },
789
- deprecated: {
790
- title: "Whether the type is deprecated or not",
791
- description: "Whether the type is deprecated or not.",
792
- type: "boolean"
793
- },
794
- example: {
795
- title: "Example value",
796
- description: "Example value."
797
- },
798
- examples: {
799
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
800
- type: "object",
801
- properties: {},
802
- required: [],
803
- additionalProperties: {}
804
- }
805
- },
806
- required: [
807
- "type"
808
- ],
809
- description: "Description of the current {@link IChatGptSchema.INull} type:\n\n> Null type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
571
+ $ref: "#/$defs/IChatGptSchema.INull"
810
572
  }
811
573
  ]
812
574
  },
813
575
  required: {
814
576
  title: "List of key values of the required properties",
815
- description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
577
+ description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be\nfilled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
816
578
  type: "array",
817
579
  items: {
818
580
  type: "string"
@@ -846,11 +608,8 @@ const FUNCTION = {
846
608
  description: "Example value."
847
609
  },
848
610
  examples: {
849
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
850
- type: "object",
851
- properties: {},
852
- required: [],
853
- additionalProperties: {}
611
+ title: "List of example values as key-value pairs",
612
+ $ref: "#/$defs/Recordstringany"
854
613
  }
855
614
  },
856
615
  required: [
@@ -859,8 +618,45 @@ const FUNCTION = {
859
618
  "type"
860
619
  ]
861
620
  },
621
+ "IChatGptSchema.IReference": {
622
+ description: "Reference type directing named schema.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
623
+ type: "object",
624
+ properties: {
625
+ $ref: {
626
+ title: "Reference to the named schema",
627
+ description: "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/$defs/` which means the type is stored in the\n{@link IChatGptSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`",
628
+ type: "string"
629
+ },
630
+ title: {
631
+ title: "Title of the schema",
632
+ description: "Title of the schema.",
633
+ type: "string"
634
+ },
635
+ description: {
636
+ title: "Detailed description of the schema",
637
+ description: "Detailed description of the schema.",
638
+ type: "string"
639
+ },
640
+ deprecated: {
641
+ title: "Whether the type is deprecated or not",
642
+ description: "Whether the type is deprecated or not.",
643
+ type: "boolean"
644
+ },
645
+ example: {
646
+ title: "Example value",
647
+ description: "Example value."
648
+ },
649
+ examples: {
650
+ title: "List of example values as key-value pairs",
651
+ $ref: "#/$defs/Recordstringany"
652
+ }
653
+ },
654
+ required: [
655
+ "$ref"
656
+ ]
657
+ },
862
658
  "IChatGptSchema.IAnyOf": {
863
- description: "Union type.\n\n`IOneOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has\ndefined `anyOf` instead of the `oneOf`, {@link IChatGptSchema} forcibly\nconverts it to `oneOf` type.",
659
+ description: "Union type.\n\n`IAnyOf` represents an union type of the TypeScript (`A | B | C`).\n\nFor reference, even though your Swagger (or OpenAPI) document has defined\n`anyOf` instead of the `oneOf`, {@link IChatGptSchema} forcibly converts it\nto `oneOf` type.\n\n### Description of {@link \"x-discriminator\"} property:\n\n> Discriminator info of the union type.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
864
660
  type: "object",
865
661
  properties: {
866
662
  anyOf: {
@@ -870,208 +666,16 @@ const FUNCTION = {
870
666
  items: {
871
667
  anyOf: [
872
668
  {
873
- type: "object",
874
- properties: {
875
- "enum": {
876
- title: "Enumeration values",
877
- description: "Enumeration values.",
878
- type: "array",
879
- items: {
880
- type: "string"
881
- }
882
- },
883
- type: {
884
- title: "Discriminator value of the type",
885
- description: "Discriminator value of the type.",
886
- type: "string",
887
- "enum": [
888
- "string"
889
- ]
890
- },
891
- title: {
892
- title: "Title of the schema",
893
- description: "Title of the schema.",
894
- type: "string"
895
- },
896
- description: {
897
- title: "Detailed description of the schema",
898
- description: "Detailed description of the schema.",
899
- type: "string"
900
- },
901
- deprecated: {
902
- title: "Whether the type is deprecated or not",
903
- description: "Whether the type is deprecated or not.",
904
- type: "boolean"
905
- },
906
- example: {
907
- title: "Example value",
908
- description: "Example value."
909
- },
910
- examples: {
911
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
912
- type: "object",
913
- properties: {},
914
- required: [],
915
- additionalProperties: {}
916
- }
917
- },
918
- required: [
919
- "type"
920
- ],
921
- description: "Description of the current {@link IChatGptSchema.IString} type:\n\n> String type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
669
+ $ref: "#/$defs/IChatGptSchema.IString"
922
670
  },
923
671
  {
924
- type: "object",
925
- properties: {
926
- "enum": {
927
- title: "Enumeration values",
928
- description: "Enumeration values.",
929
- type: "array",
930
- items: {
931
- type: "number"
932
- }
933
- },
934
- type: {
935
- title: "Discriminator value of the type",
936
- description: "Discriminator value of the type.",
937
- type: "string",
938
- "enum": [
939
- "number"
940
- ]
941
- },
942
- title: {
943
- title: "Title of the schema",
944
- description: "Title of the schema.",
945
- type: "string"
946
- },
947
- description: {
948
- title: "Detailed description of the schema",
949
- description: "Detailed description of the schema.",
950
- type: "string"
951
- },
952
- deprecated: {
953
- title: "Whether the type is deprecated or not",
954
- description: "Whether the type is deprecated or not.",
955
- type: "boolean"
956
- },
957
- example: {
958
- title: "Example value",
959
- description: "Example value."
960
- },
961
- examples: {
962
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
963
- type: "object",
964
- properties: {},
965
- required: [],
966
- additionalProperties: {}
967
- }
968
- },
969
- required: [
970
- "type"
971
- ],
972
- description: "Description of the current {@link IChatGptSchema.INumber} type:\n\n> Number (double) type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
672
+ $ref: "#/$defs/IChatGptSchema.INumber"
973
673
  },
974
674
  {
975
- type: "object",
976
- properties: {
977
- "enum": {
978
- title: "Enumeration values",
979
- description: "Enumeration values.",
980
- type: "array",
981
- items: {
982
- type: "number"
983
- }
984
- },
985
- type: {
986
- title: "Discriminator value of the type",
987
- description: "Discriminator value of the type.",
988
- type: "string",
989
- "enum": [
990
- "integer"
991
- ]
992
- },
993
- title: {
994
- title: "Title of the schema",
995
- description: "Title of the schema.",
996
- type: "string"
997
- },
998
- description: {
999
- title: "Detailed description of the schema",
1000
- description: "Detailed description of the schema.",
1001
- type: "string"
1002
- },
1003
- deprecated: {
1004
- title: "Whether the type is deprecated or not",
1005
- description: "Whether the type is deprecated or not.",
1006
- type: "boolean"
1007
- },
1008
- example: {
1009
- title: "Example value",
1010
- description: "Example value."
1011
- },
1012
- examples: {
1013
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1014
- type: "object",
1015
- properties: {},
1016
- required: [],
1017
- additionalProperties: {}
1018
- }
1019
- },
1020
- required: [
1021
- "type"
1022
- ],
1023
- description: "Description of the current {@link IChatGptSchema.IInteger} type:\n\n> Integer type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
675
+ $ref: "#/$defs/IChatGptSchema.IInteger"
1024
676
  },
1025
677
  {
1026
- type: "object",
1027
- properties: {
1028
- "enum": {
1029
- title: "Enumeration values",
1030
- description: "Enumeration values.",
1031
- type: "array",
1032
- items: {
1033
- type: "boolean"
1034
- }
1035
- },
1036
- type: {
1037
- title: "Discriminator value of the type",
1038
- description: "Discriminator value of the type.",
1039
- type: "string",
1040
- "enum": [
1041
- "boolean"
1042
- ]
1043
- },
1044
- title: {
1045
- title: "Title of the schema",
1046
- description: "Title of the schema.",
1047
- type: "string"
1048
- },
1049
- description: {
1050
- title: "Detailed description of the schema",
1051
- description: "Detailed description of the schema.",
1052
- type: "string"
1053
- },
1054
- deprecated: {
1055
- title: "Whether the type is deprecated or not",
1056
- description: "Whether the type is deprecated or not.",
1057
- type: "boolean"
1058
- },
1059
- example: {
1060
- title: "Example value",
1061
- description: "Example value."
1062
- },
1063
- examples: {
1064
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1065
- type: "object",
1066
- properties: {},
1067
- required: [],
1068
- additionalProperties: {}
1069
- }
1070
- },
1071
- required: [
1072
- "type"
1073
- ],
1074
- description: "Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
678
+ $ref: "#/$defs/IChatGptSchema.IBoolean"
1075
679
  },
1076
680
  {
1077
681
  $ref: "#/$defs/IChatGptSchema.IArray"
@@ -1080,124 +684,21 @@ const FUNCTION = {
1080
684
  $ref: "#/$defs/IChatGptSchema.IObject"
1081
685
  },
1082
686
  {
1083
- type: "object",
1084
- properties: {
1085
- $ref: {
1086
- title: "Reference to the named schema",
1087
- description: "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/$defs/` which means the type is stored in\nthe {@link IChatGptSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`",
1088
- type: "string"
1089
- },
1090
- title: {
1091
- title: "Title of the schema",
1092
- description: "Title of the schema.",
1093
- type: "string"
1094
- },
1095
- description: {
1096
- title: "Detailed description of the schema",
1097
- description: "Detailed description of the schema.",
1098
- type: "string"
1099
- },
1100
- deprecated: {
1101
- title: "Whether the type is deprecated or not",
1102
- description: "Whether the type is deprecated or not.",
1103
- type: "boolean"
1104
- },
1105
- example: {
1106
- title: "Example value",
1107
- description: "Example value."
1108
- },
1109
- examples: {
1110
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1111
- type: "object",
1112
- properties: {},
1113
- required: [],
1114
- additionalProperties: {}
1115
- }
1116
- },
1117
- required: [
1118
- "$ref"
1119
- ],
1120
- description: "Description of the current {@link IChatGptSchema.IReference} type:\n\n> Reference type directing named schema.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
687
+ $ref: "#/$defs/IChatGptSchema.IReference"
1121
688
  },
1122
689
  {
1123
- type: "object",
1124
- properties: {
1125
- title: {
1126
- title: "Title of the schema",
1127
- description: "Title of the schema.",
1128
- type: "string"
1129
- },
1130
- description: {
1131
- title: "Detailed description of the schema",
1132
- description: "Detailed description of the schema.",
1133
- type: "string"
1134
- },
1135
- deprecated: {
1136
- title: "Whether the type is deprecated or not",
1137
- description: "Whether the type is deprecated or not.",
1138
- type: "boolean"
1139
- },
1140
- example: {
1141
- title: "Example value",
1142
- description: "Example value."
1143
- },
1144
- examples: {
1145
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1146
- type: "object",
1147
- properties: {},
1148
- required: [],
1149
- additionalProperties: {}
1150
- }
1151
- },
1152
- required: [],
1153
- description: "Description of the current {@link IChatGptSchema.IUnknown} type:\n\n> Unknown, the `any` type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
690
+ $ref: "#/$defs/IChatGptSchema.IUnknown"
1154
691
  },
1155
692
  {
1156
- type: "object",
1157
- properties: {
1158
- type: {
1159
- title: "Discriminator value of the type",
1160
- description: "Discriminator value of the type.",
1161
- type: "string",
1162
- "enum": [
1163
- "null"
1164
- ]
1165
- },
1166
- title: {
1167
- title: "Title of the schema",
1168
- description: "Title of the schema.",
1169
- type: "string"
1170
- },
1171
- description: {
1172
- title: "Detailed description of the schema",
1173
- description: "Detailed description of the schema.",
1174
- type: "string"
1175
- },
1176
- deprecated: {
1177
- title: "Whether the type is deprecated or not",
1178
- description: "Whether the type is deprecated or not.",
1179
- type: "boolean"
1180
- },
1181
- example: {
1182
- title: "Example value",
1183
- description: "Example value."
1184
- },
1185
- examples: {
1186
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1187
- type: "object",
1188
- properties: {},
1189
- required: [],
1190
- additionalProperties: {}
1191
- }
1192
- },
1193
- required: [
1194
- "type"
1195
- ],
1196
- description: "Description of the current {@link IChatGptSchema.INull} type:\n\n> Null type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
693
+ $ref: "#/$defs/IChatGptSchema.INull"
1197
694
  }
1198
695
  ]
1199
696
  }
1200
697
  },
698
+ "x-discriminator": {
699
+ title: "Discriminator info of the union type",
700
+ $ref: "#/$defs/IChatGptSchema.IAnyOf.IDiscriminator"
701
+ },
1201
702
  title: {
1202
703
  title: "Title of the schema",
1203
704
  description: "Title of the schema.",
@@ -1218,639 +719,143 @@ const FUNCTION = {
1218
719
  description: "Example value."
1219
720
  },
1220
721
  examples: {
1221
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1222
- type: "object",
1223
- properties: {},
1224
- required: [],
1225
- additionalProperties: {}
722
+ title: "List of example values as key-value pairs",
723
+ $ref: "#/$defs/Recordstringany"
1226
724
  }
1227
725
  },
1228
726
  required: [
1229
727
  "anyOf"
1230
728
  ]
1231
- }
1232
- }
1233
- },
1234
- output: {
1235
- type: "array",
1236
- items: {
1237
- description: "Description of the current {@link IHttpLlmFunctionchatgpt} type:\n\n> LLM function calling schema from HTTP (OpenAPI) operation.\n> \n> `IHttpLlmFunction` is a data structure representing a function converted\n> from the {@link OpenApi.IOperation OpenAPI operation}, used for the LLM\n> (Large Language Model) function calling. It's a typical RPC (Remote Procedure Call)\n> structure containing the function {@link name}, {@link parameters}, and\n> {@link output return type}.\n> \n> If you provide this `IHttpLlmFunction` data to the LLM provider like \"OpenAI\",\n> the \"OpenAI\" will compose a function arguments by analyzing conversations with\n> the user. With the LLM composed arguments, you can execute the function through\n> {@link LlmFetcher.execute} and get the result.\n> \n> For reference, different between `IHttpLlmFunction` and its origin source\n> {@link OpenApi.IOperation} is, `IHttpLlmFunction` has converted every type schema\n> information from {@link OpenApi.IJsonSchema} to {@link ILlmSchemaV3} to escape\n> {@link OpenApi.IJsonSchema.IReference reference types}, and downgrade the version\n> of the JSON schema to OpenAPI 3.0. It's because LLM function call feature cannot\n> understand both reference types and OpenAPI 3.1 specification.\n> \n> Additionally, the properties' rule is:\n> \n> - `pathParameters`: Path parameters of {@link OpenApi.IOperation.parameters}\n> - `query`: Query parameter of {@link IHttpMigrateRoute.query}\n> - `body`: Body parameter of {@link IHttpMigrateRoute.body}\n> \n> ```typescript\n> {\n> ...pathParameters,\n> query,\n> body,\n> }\n> ```",
1238
- type: "object",
1239
- properties: {
1240
- method: {
1241
- title: "HTTP method of the endpoint",
1242
- description: "HTTP method of the endpoint.",
1243
- type: "string",
1244
- "enum": [
1245
- "get",
1246
- "post",
1247
- "patch",
1248
- "put",
1249
- "delete"
1250
- ]
1251
- },
1252
- path: {
1253
- title: "Path of the endpoint",
1254
- description: "Path of the endpoint.",
1255
- type: "string"
1256
- },
1257
- name: {
1258
- title: "Representative name of the function",
1259
- description: "Representative name of the function.\n\nThe `name` is a repsentative name identifying the function in the\n{@link IHttpLlmApplication}. The `name` value is just composed by joining the\n{@link IHttpMigrateRoute.accessor} by underscore `_` character.\n\nHere is the composition rule of the {@link IHttpMigrateRoute.accessor}:\n\n> The `accessor` is composed with the following rules. At first,\n> namespaces are composed by static directory names in the {@link path}.\n> Parametric symbols represented by `:param` or `{param}` cannot be\n> a part of the namespace.\n>\n> Instead, they would be a part of the function name. The function\n> name is composed with the {@link method HTTP method} and parametric\n> symbols like `getByParam` or `postByParam`. If there are multiple\n> path parameters, they would be concatenated by `And` like\n> `getByParam1AndParam2`.\n>\n> For refefence, if the {@link operation}'s {@link method} is `delete`,\n> the function name would be replaced to `erase` instead of `delete`.\n> It is the reason why the `delete` is a reserved keyword in many\n> programming languages.\n>\n> - Example 1\n> - path: `POST /shopping/sellers/sales`\n> - accessor: `shopping.sellers.sales.post`\n> - Example 2\n> - endpoint: `GET /shoppings/sellers/sales/:saleId/reviews/:reviewId/comments/:id\n> - accessor: `shoppings.sellers.sales.reviews.getBySaleIdAndReviewIdAndCommentId`\n\n\n@maxLength 64",
1260
- type: "string"
1261
- },
1262
- parameters: {
1263
- description: "List of parameter types.\n\nIf you've configured {@link IHttpLlmApplication.IOptions.keyword} as `true`,\nnumber of {@link IHttpLlmFunction.parameters} are always 1 and the first\nparameter's type is always {@link ILlmSchemaV3.IObject}. The\nproperties' rule is:\n\n- `pathParameters`: Path parameters of {@link IHttpMigrateRoute.parameters}\n- `query`: Query parameter of {@link IHttpMigrateRoute.query}\n- `body`: Body parameter of {@link IHttpMigrateRoute.body}\n\n```typescript\n{\n ...pathParameters,\n query,\n body,\n}\n```\n\nOtherwise, the parameters would be multiple, and the sequence of the\nparameters are following below rules:\n\n```typescript\n[\n ...pathParameters,\n ...(query ? [query] : []),\n ...(body ? [body] : []),\n]\n```\n\n------------------------------\n\nDescription of the current {@link IChatGptSchema.IParameters} type:\n\n> Type of the function parameters.\n> \n> `IChatGptSchema.IParameters` is a type defining a function's parameters\n> as a keyworded object type.\n> \n> It also can be utilized for the structured output metadata.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```\n\n### Description of {@link $defs} property:\n\n> Collection of the named types.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property,\n> and the value is the type schema info.",
1264
- type: "object",
1265
- properties: {
1266
- $defs: {
1267
- title: "Collection of the named types",
1268
- $ref: "#/$defs/RecordstringIChatGptSchema"
1269
- },
1270
- additionalProperties: {
1271
- title: "Additional properties' info",
1272
- description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, it is not allowed in the parameters level.",
1273
- type: "boolean",
1274
- "enum": [
1275
- false
1276
- ]
1277
- },
1278
- type: {
1279
- title: "Discriminator value of the type",
1280
- description: "Discriminator value of the type.",
1281
- type: "string",
1282
- "enum": [
1283
- "object"
1284
- ]
1285
- },
1286
- properties: {
1287
- title: "Properties of the object",
1288
- $ref: "#/$defs/RecordstringIChatGptSchema"
1289
- },
1290
- required: {
1291
- title: "List of key values of the required properties",
1292
- description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
1293
- type: "array",
1294
- items: {
1295
- type: "string"
1296
- }
1297
- },
1298
- title: {
1299
- title: "Title of the schema",
1300
- description: "Title of the schema.",
1301
- type: "string"
1302
- },
1303
- description: {
1304
- title: "Detailed description of the schema",
1305
- description: "Detailed description of the schema.",
1306
- type: "string"
1307
- },
1308
- deprecated: {
1309
- title: "Whether the type is deprecated or not",
1310
- description: "Whether the type is deprecated or not.",
1311
- type: "boolean"
1312
- },
1313
- example: {
1314
- title: "Example value",
1315
- description: "Example value."
1316
- },
1317
- examples: {
1318
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1319
- type: "object",
1320
- properties: {},
1321
- required: [],
1322
- additionalProperties: {}
1323
- }
729
+ },
730
+ "IChatGptSchema.IUnknown": {
731
+ description: "Unknown, the `any` type.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
732
+ type: "object",
733
+ properties: {
734
+ title: {
735
+ title: "Title of the schema",
736
+ description: "Title of the schema.",
737
+ type: "string"
1324
738
  },
1325
- required: [
1326
- "$defs",
1327
- "additionalProperties",
1328
- "type",
1329
- "properties",
1330
- "required"
1331
- ]
1332
- },
1333
- separated: {
1334
- description: "Collection of separated parameters.\n\nFilled only when {@link IHttpLlmApplication.IOptions.separate} is configured.\n\n------------------------------\n\nDescription of the current {@link IHttpLlmFunction.ISeparatedchatgpt} type:\n\n> Collection of separated parameters.",
1335
- type: "object",
1336
- properties: {
1337
- llm: {
1338
- description: "Parameters that would be composed by the LLM.\n\nEven though no property exists in the LLM side, the `llm` property\nwould have at least empty object type.\n\n------------------------------\n\nDescription of the current {@link IChatGptSchema.IParameters} type:\n\n> Type of the function parameters.\n> \n> `IChatGptSchema.IParameters` is a type defining a function's parameters\n> as a keyworded object type.\n> \n> It also can be utilized for the structured output metadata.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```\n\n### Description of {@link $defs} property:\n\n> Collection of the named types.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property,\n> and the value is the type schema info.",
1339
- type: "object",
1340
- properties: {
1341
- $defs: {
1342
- title: "Collection of the named types",
1343
- $ref: "#/$defs/RecordstringIChatGptSchema"
1344
- },
1345
- additionalProperties: {
1346
- title: "Additional properties' info",
1347
- description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, it is not allowed in the parameters level.",
1348
- type: "boolean",
1349
- "enum": [
1350
- false
1351
- ]
1352
- },
1353
- type: {
1354
- title: "Discriminator value of the type",
1355
- description: "Discriminator value of the type.",
1356
- type: "string",
1357
- "enum": [
1358
- "object"
1359
- ]
1360
- },
1361
- properties: {
1362
- title: "Properties of the object",
1363
- $ref: "#/$defs/RecordstringIChatGptSchema"
1364
- },
1365
- required: {
1366
- title: "List of key values of the required properties",
1367
- description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
1368
- type: "array",
1369
- items: {
1370
- type: "string"
1371
- }
1372
- },
1373
- title: {
1374
- title: "Title of the schema",
1375
- description: "Title of the schema.",
1376
- type: "string"
1377
- },
1378
- description: {
1379
- title: "Detailed description of the schema",
1380
- description: "Detailed description of the schema.",
1381
- type: "string"
1382
- },
1383
- deprecated: {
1384
- title: "Whether the type is deprecated or not",
1385
- description: "Whether the type is deprecated or not.",
1386
- type: "boolean"
1387
- },
1388
- example: {
1389
- title: "Example value",
1390
- description: "Example value."
1391
- },
1392
- examples: {
1393
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1394
- type: "object",
1395
- properties: {},
1396
- required: [],
1397
- additionalProperties: {}
1398
- }
1399
- },
1400
- required: [
1401
- "$defs",
1402
- "additionalProperties",
1403
- "type",
1404
- "properties",
1405
- "required"
1406
- ]
1407
- },
1408
- human: {
1409
- title: "Parameters that would be composed by the human",
1410
- description: "Parameters that would be composed by the human.",
1411
- anyOf: [
1412
- {
1413
- type: "null"
1414
- },
1415
- {
1416
- type: "object",
1417
- properties: {
1418
- $defs: {
1419
- title: "Collection of the named types",
1420
- $ref: "#/$defs/RecordstringIChatGptSchema"
1421
- },
1422
- additionalProperties: {
1423
- title: "Additional properties' info",
1424
- description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, it is not allowed in the parameters level.",
1425
- type: "boolean",
1426
- "enum": [
1427
- false
1428
- ]
1429
- },
1430
- type: {
1431
- title: "Discriminator value of the type",
1432
- description: "Discriminator value of the type.",
1433
- type: "string",
1434
- "enum": [
1435
- "object"
1436
- ]
1437
- },
1438
- properties: {
1439
- title: "Properties of the object",
1440
- $ref: "#/$defs/RecordstringIChatGptSchema"
1441
- },
1442
- required: {
1443
- title: "List of key values of the required properties",
1444
- description: "List of key values of the required properties.\n\nThe `required` means a list of the key values of the required\n{@link properties}. If some property key is not listed in the `required`\nlist, it means that property is optional. Otherwise some property key\nexists in the `required` list, it means that the property must be filled.\n\nBelow is an example of the {@link properties} and `required`.\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso that they are listed in the `required` list.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```",
1445
- type: "array",
1446
- items: {
1447
- type: "string"
1448
- }
1449
- },
1450
- title: {
1451
- title: "Title of the schema",
1452
- description: "Title of the schema.",
1453
- type: "string"
1454
- },
1455
- description: {
1456
- title: "Detailed description of the schema",
1457
- description: "Detailed description of the schema.",
1458
- type: "string"
1459
- },
1460
- deprecated: {
1461
- title: "Whether the type is deprecated or not",
1462
- description: "Whether the type is deprecated or not.",
1463
- type: "boolean"
1464
- },
1465
- example: {
1466
- title: "Example value",
1467
- description: "Example value."
1468
- },
1469
- examples: {
1470
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1471
- type: "object",
1472
- properties: {},
1473
- required: [],
1474
- additionalProperties: {}
1475
- }
1476
- },
1477
- required: [
1478
- "$defs",
1479
- "additionalProperties",
1480
- "type",
1481
- "properties",
1482
- "required"
1483
- ],
1484
- description: "Description of the current {@link IChatGptSchema.IParameters} type:\n\n> Type of the function parameters.\n> \n> `IChatGptSchema.IParameters` is a type defining a function's parameters\n> as a keyworded object type.\n> \n> It also can be utilized for the structured output metadata.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```\n\n### Description of {@link $defs} property:\n\n> Collection of the named types.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property,\n> and the value is the type schema info."
1485
- }
1486
- ]
1487
- }
739
+ description: {
740
+ title: "Detailed description of the schema",
741
+ description: "Detailed description of the schema.",
742
+ type: "string"
1488
743
  },
1489
- required: [
1490
- "llm",
1491
- "human"
1492
- ]
1493
- },
1494
- output: {
1495
- title: "Expected return type",
1496
- description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output`\nwould be `undefined`.",
1497
- anyOf: [
1498
- {
1499
- type: "object",
1500
- properties: {
1501
- "enum": {
1502
- title: "Enumeration values",
1503
- description: "Enumeration values.",
1504
- type: "array",
1505
- items: {
1506
- type: "string"
1507
- }
1508
- },
1509
- type: {
1510
- title: "Discriminator value of the type",
1511
- description: "Discriminator value of the type.",
1512
- type: "string",
1513
- "enum": [
1514
- "string"
1515
- ]
1516
- },
1517
- title: {
1518
- title: "Title of the schema",
1519
- description: "Title of the schema.",
1520
- type: "string"
1521
- },
1522
- description: {
1523
- title: "Detailed description of the schema",
1524
- description: "Detailed description of the schema.",
1525
- type: "string"
1526
- },
1527
- deprecated: {
1528
- title: "Whether the type is deprecated or not",
1529
- description: "Whether the type is deprecated or not.",
1530
- type: "boolean"
1531
- },
1532
- example: {
1533
- title: "Example value",
1534
- description: "Example value."
1535
- },
1536
- examples: {
1537
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1538
- type: "object",
1539
- properties: {},
1540
- required: [],
1541
- additionalProperties: {}
1542
- }
1543
- },
1544
- required: [
1545
- "type"
1546
- ],
1547
- description: "Description of the current {@link IChatGptSchema.IString} type:\n\n> String type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1548
- },
1549
- {
1550
- type: "object",
1551
- properties: {
1552
- "enum": {
1553
- title: "Enumeration values",
1554
- description: "Enumeration values.",
1555
- type: "array",
1556
- items: {
1557
- type: "number"
1558
- }
1559
- },
1560
- type: {
1561
- title: "Discriminator value of the type",
1562
- description: "Discriminator value of the type.",
1563
- type: "string",
1564
- "enum": [
1565
- "number"
1566
- ]
1567
- },
1568
- title: {
1569
- title: "Title of the schema",
1570
- description: "Title of the schema.",
1571
- type: "string"
1572
- },
1573
- description: {
1574
- title: "Detailed description of the schema",
1575
- description: "Detailed description of the schema.",
1576
- type: "string"
1577
- },
1578
- deprecated: {
1579
- title: "Whether the type is deprecated or not",
1580
- description: "Whether the type is deprecated or not.",
1581
- type: "boolean"
1582
- },
1583
- example: {
1584
- title: "Example value",
1585
- description: "Example value."
1586
- },
1587
- examples: {
1588
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1589
- type: "object",
1590
- properties: {},
1591
- required: [],
1592
- additionalProperties: {}
1593
- }
1594
- },
1595
- required: [
1596
- "type"
1597
- ],
1598
- description: "Description of the current {@link IChatGptSchema.INumber} type:\n\n> Number (double) type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1599
- },
1600
- {
1601
- type: "object",
1602
- properties: {
1603
- "enum": {
1604
- title: "Enumeration values",
1605
- description: "Enumeration values.",
1606
- type: "array",
1607
- items: {
1608
- type: "number"
1609
- }
1610
- },
1611
- type: {
1612
- title: "Discriminator value of the type",
1613
- description: "Discriminator value of the type.",
1614
- type: "string",
1615
- "enum": [
1616
- "integer"
1617
- ]
1618
- },
1619
- title: {
1620
- title: "Title of the schema",
1621
- description: "Title of the schema.",
1622
- type: "string"
1623
- },
1624
- description: {
1625
- title: "Detailed description of the schema",
1626
- description: "Detailed description of the schema.",
1627
- type: "string"
1628
- },
1629
- deprecated: {
1630
- title: "Whether the type is deprecated or not",
1631
- description: "Whether the type is deprecated or not.",
1632
- type: "boolean"
1633
- },
1634
- example: {
1635
- title: "Example value",
1636
- description: "Example value."
1637
- },
1638
- examples: {
1639
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1640
- type: "object",
1641
- properties: {},
1642
- required: [],
1643
- additionalProperties: {}
1644
- }
1645
- },
1646
- required: [
1647
- "type"
1648
- ],
1649
- description: "Description of the current {@link IChatGptSchema.IInteger} type:\n\n> Integer type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1650
- },
1651
- {
1652
- type: "object",
1653
- properties: {
1654
- "enum": {
1655
- title: "Enumeration values",
1656
- description: "Enumeration values.",
1657
- type: "array",
1658
- items: {
1659
- type: "boolean"
1660
- }
1661
- },
1662
- type: {
1663
- title: "Discriminator value of the type",
1664
- description: "Discriminator value of the type.",
1665
- type: "string",
1666
- "enum": [
1667
- "boolean"
1668
- ]
1669
- },
1670
- title: {
1671
- title: "Title of the schema",
1672
- description: "Title of the schema.",
1673
- type: "string"
1674
- },
1675
- description: {
1676
- title: "Detailed description of the schema",
1677
- description: "Detailed description of the schema.",
1678
- type: "string"
1679
- },
1680
- deprecated: {
1681
- title: "Whether the type is deprecated or not",
1682
- description: "Whether the type is deprecated or not.",
1683
- type: "boolean"
1684
- },
1685
- example: {
1686
- title: "Example value",
1687
- description: "Example value."
1688
- },
1689
- examples: {
1690
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1691
- type: "object",
1692
- properties: {},
1693
- required: [],
1694
- additionalProperties: {}
1695
- }
1696
- },
1697
- required: [
1698
- "type"
1699
- ],
1700
- description: "Description of the current {@link IChatGptSchema.IBoolean} type:\n\n> Boolean type info.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1701
- },
1702
- {
1703
- $ref: "#/$defs/IChatGptSchema.IArray"
1704
- },
1705
- {
1706
- $ref: "#/$defs/IChatGptSchema.IObject"
1707
- },
1708
- {
1709
- type: "object",
1710
- properties: {
1711
- $ref: {
1712
- title: "Reference to the named schema",
1713
- description: "Reference to the named schema.\n\nThe `ref` is a reference to the named schema. Format of the `$ref` is\nfollowing the JSON Pointer specification. In the OpenAPI, the `$ref`\nstarts with `#/$defs/` which means the type is stored in\nthe {@link IChatGptSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`",
1714
- type: "string"
1715
- },
1716
- title: {
1717
- title: "Title of the schema",
1718
- description: "Title of the schema.",
1719
- type: "string"
1720
- },
1721
- description: {
1722
- title: "Detailed description of the schema",
1723
- description: "Detailed description of the schema.",
1724
- type: "string"
1725
- },
1726
- deprecated: {
1727
- title: "Whether the type is deprecated or not",
1728
- description: "Whether the type is deprecated or not.",
1729
- type: "boolean"
1730
- },
1731
- example: {
1732
- title: "Example value",
1733
- description: "Example value."
1734
- },
1735
- examples: {
1736
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1737
- type: "object",
1738
- properties: {},
1739
- required: [],
1740
- additionalProperties: {}
1741
- }
1742
- },
1743
- required: [
1744
- "$ref"
1745
- ],
1746
- description: "Description of the current {@link IChatGptSchema.IReference} type:\n\n> Reference type directing named schema.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1747
- },
1748
- {
1749
- $ref: "#/$defs/IChatGptSchema.IAnyOf"
1750
- },
1751
- {
1752
- type: "object",
1753
- properties: {
1754
- title: {
1755
- title: "Title of the schema",
1756
- description: "Title of the schema.",
1757
- type: "string"
1758
- },
1759
- description: {
1760
- title: "Detailed description of the schema",
1761
- description: "Detailed description of the schema.",
1762
- type: "string"
1763
- },
1764
- deprecated: {
1765
- title: "Whether the type is deprecated or not",
1766
- description: "Whether the type is deprecated or not.",
1767
- type: "boolean"
1768
- },
1769
- example: {
1770
- title: "Example value",
1771
- description: "Example value."
1772
- },
1773
- examples: {
1774
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1775
- type: "object",
1776
- properties: {},
1777
- required: [],
1778
- additionalProperties: {}
1779
- }
1780
- },
1781
- required: [],
1782
- description: "Description of the current {@link IChatGptSchema.IUnknown} type:\n\n> Unknown, the `any` type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1783
- },
1784
- {
1785
- type: "object",
1786
- properties: {
1787
- type: {
1788
- title: "Discriminator value of the type",
1789
- description: "Discriminator value of the type.",
1790
- type: "string",
1791
- "enum": [
1792
- "null"
1793
- ]
1794
- },
1795
- title: {
1796
- title: "Title of the schema",
1797
- description: "Title of the schema.",
1798
- type: "string"
1799
- },
1800
- description: {
1801
- title: "Detailed description of the schema",
1802
- description: "Detailed description of the schema.",
1803
- type: "string"
1804
- },
1805
- deprecated: {
1806
- title: "Whether the type is deprecated or not",
1807
- description: "Whether the type is deprecated or not.",
1808
- type: "boolean"
1809
- },
1810
- example: {
1811
- title: "Example value",
1812
- description: "Example value."
1813
- },
1814
- examples: {
1815
- description: "List of example values as key-value pairs.\n\n------------------------------\n\nDescription of the current {@link Recordstringany} type:\n\n> Construct a type with a set of properties K of type T",
1816
- type: "object",
1817
- properties: {},
1818
- required: [],
1819
- additionalProperties: {}
1820
- }
1821
- },
1822
- required: [
1823
- "type"
1824
- ],
1825
- description: "Description of the current {@link IChatGptSchema.INull} type:\n\n> Null type.\n\n------------------------------\n\nDescription of the parent {@link IChatGptSchema} type:\n\n> Type schema info of the ChatGPT.\n> \n> `IChatGptSchema` is a type schema info of the ChatGPT function calling.\n> \n> `IChatGptSchema` basically follows the JSON schema definition of the OpenAPI v3.1\n> speciifcation; {@link OpenApiV3_1.IJsonSchema}.\n> \n> However, the `IChatGptSchema` does not follow the entire specification of\n> the OpenAPI v3.1. It has own specific restrictions and definitions. Here is the\n> list of how `IChatGptSchema` is different with the OpenAPI v3.1 JSON schema.\n> \n> - Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n> - Resolve nullable property: {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n> - Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n> - Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link IChatGptSchema.IAnOf}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link IChatGptSchema.IObject}\n> - Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to {@link IChatGptSchema.IReference}\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> If compare with the {@link OpenApi.IJsonSchema}, the emended JSON schema specification,\n> \n> - {@link IChatGptSchema.IAnyOf} instead of the {@link OpenApi.IJsonSchema.IOneOf}\n> - {@link IChatGptSchema.IParameters.$defs} instead of the {@link OpenApi.IJsonSchema.IComponents.schemas}\n> - {@link IChatGptSchema.IString.enum} instead of the {@link OpenApi.IJsonSchema.IConstant}\n> - {@link IChatGptSchema.additionalProperties} is fixed to `false`\n> - No tuple type {@link OpenApi.IJsonSchema.ITuple} support\n> - When {@link IChatGptSchema.IConfig.strict} mode\n> - Every object properties must be required\n> - Do not allow {@link IChatGptSchema.IObject.additionalProperties}\n> \n> For reference, if you've composed the `IChatGptSchema` type with the\n> {@link IChatGptSchema.IConfig.reference} `false` option (default is `false`),\n> only the recursived named types would be archived into the\n> {@link IChatGptSchema.IParameters.$defs}, and the others would be ecaped from the\n> {@link IChatGptSchema.IReference} type.\n> \n> Also, OpenAI has banned below constraint properties. Instead, `IChatGptSchema`\n> fills the {@link IChatGptSchema.__IAttribute.description} property with\n> the comment text like `\"@format uuid\"`.\n> \n> - {@link OpenApi.IJsonSchema.INumber.minimum}\n> - {@link OpenApi.IJsonSchema.INumber.maximum}\n> - {@link OpenApi.IJsonSchema.INumber.multipleOf}\n> - {@link OpenApi.IJsonSchema.IString.minLength}\n> - {@link OpenApi.IJsonSchema.IString.maxLength}\n> - {@link OpenApi.IJsonSchema.IString.format}\n> - {@link OpenApi.IJsonSchema.IString.pattern}\n> - {@link OpenApi.IJsonSchema.IString.contentMediaType}\n> - {@link OpenApi.IJsonSchema.IString.default}\n> - {@link OpenApi.IJsonSchema.IArray.minItems}\n> - {@link OpenApi.IJsonSchema.IArray.maxItems}\n> - {@link OpenApi.IJsonSchema.IArray.unique}\n> \n> Additionally, OpenAI cannot define the `description` property to the\n> {@link IChatGptSchema.IReference} type, and even does not understand\n> the capsulization to the {@link IChatGptSchema.IAnyOf} type.\n> Therefore, the `description` is written to the parent object type,\n> not the reference type.\n> \n> ```json\n> {\n> \"type\": \"object\",\n> \"description\": \"### Description of {@link something} property.\\n\\n> Hello?\",\n> \"properties\": {\n> \"something\": {\n> \"$ref\": \"#/$defs/SomeObject\"\n> }\n> }\n> }\n> ```"
1826
- }
1827
- ]
1828
- },
1829
- description: {
1830
- title: "Description of the function",
1831
- description: "Description of the function.\n\n`IHttpLlmFunction.description` is composed by below rule:\n\n1. Starts from the {@link OpenApi.IOperation.summary} paragraph.\n2. The next paragraphs are filled with the\n {@link OpenApi.IOperation.description}. By the way, if the first\n paragraph of {@link OpenApi.IOperation.description} is same with the\n {@link OpenApi.IOperation.summary}, it would not be duplicated.\n3. Parameters' descriptions are added with `@param` tag.\n4. {@link OpenApi.IOperation.security Security requirements} are added\n with `@security` tag.\n5. Tag names are added with `@tag` tag.\n6. If {@link OpenApi.IOperation.deprecated}, `@deprecated` tag is added.\n\nFor reference, the `description` is very important property to teach\nthe purpose of the function to the LLM (Language Large Model), and\nLLM actually determines which function to call by the description.\n\nAlso, when the LLM conversates with the user, the `description` is\nused to explain the function to the user. Therefore, the `description`\nproperty has the highest priority, and you have to consider it.",
1832
- type: "string"
744
+ deprecated: {
745
+ title: "Whether the type is deprecated or not",
746
+ description: "Whether the type is deprecated or not.",
747
+ type: "boolean"
748
+ },
749
+ example: {
750
+ title: "Example value",
751
+ description: "Example value."
752
+ },
753
+ examples: {
754
+ title: "List of example values as key-value pairs",
755
+ $ref: "#/$defs/Recordstringany"
756
+ }
1833
757
  },
1834
- deprecated: {
1835
- title: "Whether the function is deprecated or not",
1836
- description: "Whether the function is deprecated or not.\n\nIf the `deprecated` is `true`, the function is not recommended to use.\n\nLLM (Large Language Model) may not use the deprecated function.",
1837
- type: "boolean"
758
+ required: []
759
+ },
760
+ "IChatGptSchema.INull": {
761
+ description: "Null type.\n\n### Description of {@link examples} property:\n\n> List of example values as key-value pairs.",
762
+ type: "object",
763
+ properties: {
764
+ type: {
765
+ title: "Discriminator value of the type",
766
+ description: "Discriminator value of the type.",
767
+ type: "string",
768
+ "enum": [
769
+ "null"
770
+ ]
771
+ },
772
+ title: {
773
+ title: "Title of the schema",
774
+ description: "Title of the schema.",
775
+ type: "string"
776
+ },
777
+ description: {
778
+ title: "Detailed description of the schema",
779
+ description: "Detailed description of the schema.",
780
+ type: "string"
781
+ },
782
+ deprecated: {
783
+ title: "Whether the type is deprecated or not",
784
+ description: "Whether the type is deprecated or not.",
785
+ type: "boolean"
786
+ },
787
+ example: {
788
+ title: "Example value",
789
+ description: "Example value."
790
+ },
791
+ examples: {
792
+ title: "List of example values as key-value pairs",
793
+ $ref: "#/$defs/Recordstringany"
794
+ }
1838
795
  },
1839
- tags: {
1840
- title: "Category tags for the function",
1841
- description: "Category tags for the function.\n\nSame with {@link OpenApi.IOperation.tags} indicating the category of the function.",
1842
- type: "array",
1843
- items: {
796
+ required: [
797
+ "type"
798
+ ]
799
+ },
800
+ "IChatGptSchema.IAnyOf.IDiscriminator": {
801
+ description: "Discriminator info of the union type.\n\n### Description of {@link mapping} property:\n\n> Mapping of the discriminator value to the schema name.\n> \n> This property is valid only for {@link IReference} typed\n> {@link IAnyOf.oneof} elements. Therefore, `key` of `mapping` is the\n> discriminator value, and `value` of `mapping` is the schema name like\n> `#/components/schemas/SomeObject`.",
802
+ type: "object",
803
+ properties: {
804
+ propertyName: {
805
+ title: "Property name for the discriminator",
806
+ description: "Property name for the discriminator.",
1844
807
  type: "string"
808
+ },
809
+ mapping: {
810
+ title: "Mapping of the discriminator value to the schema name",
811
+ $ref: "#/$defs/Recordstringstring"
1845
812
  }
813
+ },
814
+ required: [
815
+ "propertyName"
816
+ ]
817
+ },
818
+ Recordstringstring: {
819
+ description: "Construct a type with a set of properties K of type T",
820
+ type: "object",
821
+ properties: {},
822
+ required: [],
823
+ additionalProperties: {
824
+ type: "string"
1846
825
  }
1847
826
  },
1848
- required: [
1849
- "method",
1850
- "path",
1851
- "name",
1852
- "parameters"
1853
- ]
827
+ "IHttpLlmFunction.ISeparatedchatgpt": {
828
+ description: "Collection of separated parameters.\n\n### Description of {@link llm} property:\n\n> Parameters that would be composed by the LLM.\n> \n> Even though no property exists in the LLM side, the `llm` property would\n> have at least empty object type.",
829
+ type: "object",
830
+ properties: {
831
+ llm: {
832
+ title: "Parameters that would be composed by the LLM",
833
+ $ref: "#/$defs/IChatGptSchema.IParameters"
834
+ },
835
+ human: {
836
+ title: "Parameters that would be composed by the human",
837
+ description: "Parameters that would be composed by the human.",
838
+ anyOf: [
839
+ {
840
+ type: "null"
841
+ },
842
+ {
843
+ $ref: "#/$defs/IChatGptSchema.IParameters"
844
+ }
845
+ ]
846
+ }
847
+ },
848
+ required: [
849
+ "llm",
850
+ "human"
851
+ ]
852
+ }
853
+ }
854
+ },
855
+ output: {
856
+ type: "array",
857
+ items: {
858
+ $ref: "#/$defs/IHttpLlmFunctionchatgpt"
1854
859
  }
1855
860
  },
1856
861
  description: "Get list of API functions.\n\nIf user seems like to request some function calling except this one,\ncall this `getApiFunctions()` to get the list of candidate API functions\nprovided from this application.\n\nAlso, user just wants to list up every remote API functions that can be\ncalled from the backend server, utilize this function too.",