@xyd-js/uniform 0.0.0-build-099b7bb-20250918135344 → 0.0.0-build-9f87f13-20250930210637
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.
- package/CHANGELOG.md +2 -2
- package/dist/index.cjs +156 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +154 -1
- package/dist/index.js.map +1 -1
- package/dist/markdown.d.cts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/{types-DiQsFerK.d.cts → types-DcJGRAj1.d.cts} +3 -2
- package/dist/{types-DiQsFerK.d.ts → types-DcJGRAj1.d.ts} +3 -2
- package/index.ts +1 -1
- package/output.json +617 -0
- package/package.json +2 -2
- package/src/__fixtures__/1.basic/input.json +1369 -0
- package/src/__fixtures__/1.basic/output.json +44 -0
- package/src/__fixtures__/2.advanced/input.json +1530 -0
- package/src/__fixtures__/2.advanced/output.json +323 -0
- package/src/__fixtures__/2.advanced.livesession/input.json +7079 -0
- package/src/__fixtures__/2.advanced.livesession/output.json +1448 -0
- package/src/converters.test.ts +74 -0
- package/src/converters.ts +215 -0
- package/src/index.ts +5 -0
- package/src/types.ts +3 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "$rest.request.body",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"model": {
|
|
6
|
+
"description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.\n",
|
|
7
|
+
"anyOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": ""
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": [
|
|
16
|
+
"gpt-4.1",
|
|
17
|
+
"gpt-4.1-mini",
|
|
18
|
+
"gpt-4.1-nano",
|
|
19
|
+
"gpt-4.1-2025-04-14",
|
|
20
|
+
"gpt-4.1-mini-2025-04-14",
|
|
21
|
+
"gpt-4.1-nano-2025-04-14",
|
|
22
|
+
"o3-mini",
|
|
23
|
+
"o3-mini-2025-01-31",
|
|
24
|
+
"o1",
|
|
25
|
+
"o1-2024-12-17",
|
|
26
|
+
"gpt-4o",
|
|
27
|
+
"gpt-4o-2024-11-20",
|
|
28
|
+
"gpt-4o-2024-08-06",
|
|
29
|
+
"gpt-4o-2024-05-13",
|
|
30
|
+
"gpt-4o-mini",
|
|
31
|
+
"gpt-4o-mini-2024-07-18",
|
|
32
|
+
"gpt-4.5-preview",
|
|
33
|
+
"gpt-4.5-preview-2025-02-27",
|
|
34
|
+
"gpt-4-turbo",
|
|
35
|
+
"gpt-4-turbo-2024-04-09",
|
|
36
|
+
"gpt-4-0125-preview",
|
|
37
|
+
"gpt-4-turbo-preview",
|
|
38
|
+
"gpt-4-1106-preview",
|
|
39
|
+
"gpt-4-vision-preview",
|
|
40
|
+
"gpt-4",
|
|
41
|
+
"gpt-4-0314",
|
|
42
|
+
"gpt-4-0613",
|
|
43
|
+
"gpt-4-32k",
|
|
44
|
+
"gpt-4-32k-0314",
|
|
45
|
+
"gpt-4-32k-0613",
|
|
46
|
+
"gpt-3.5-turbo",
|
|
47
|
+
"gpt-3.5-turbo-16k",
|
|
48
|
+
"gpt-3.5-turbo-0613",
|
|
49
|
+
"gpt-3.5-turbo-1106",
|
|
50
|
+
"gpt-3.5-turbo-0125",
|
|
51
|
+
"gpt-3.5-turbo-16k-0613"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "The name of the assistant. The maximum length is 256 characters.\n"
|
|
59
|
+
},
|
|
60
|
+
"description": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The description of the assistant. The maximum length is 512 characters.\n"
|
|
63
|
+
},
|
|
64
|
+
"instructions": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.\n"
|
|
67
|
+
},
|
|
68
|
+
"reasoning_effort": {
|
|
69
|
+
"description": "**o-series models only** \n\nConstrains effort on reasoning for \n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `low`, `medium`, and `high`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"low",
|
|
73
|
+
"medium",
|
|
74
|
+
"high"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"tools": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n",
|
|
80
|
+
"items": {
|
|
81
|
+
"description": "",
|
|
82
|
+
"oneOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "object",
|
|
85
|
+
"description": "",
|
|
86
|
+
"properties": {
|
|
87
|
+
"type": {
|
|
88
|
+
"description": "The type of tool being defined: `code_interpreter`",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": [
|
|
91
|
+
"code_interpreter"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"type"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "",
|
|
102
|
+
"properties": {
|
|
103
|
+
"type": {
|
|
104
|
+
"description": "The type of tool being defined: `file_search`",
|
|
105
|
+
"type": "string",
|
|
106
|
+
"enum": [
|
|
107
|
+
"file_search"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"file_search": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"description": "Overrides for the file search tool.",
|
|
113
|
+
"properties": {
|
|
114
|
+
"max_num_results": {
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"description": "The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n"
|
|
117
|
+
},
|
|
118
|
+
"ranking_options": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"description": "The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.\n\nSee the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n",
|
|
121
|
+
"properties": {
|
|
122
|
+
"ranker": {
|
|
123
|
+
"description": "The ranker to use for the file search. If not specified will use the `auto` ranker.",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"enum": [
|
|
126
|
+
"auto",
|
|
127
|
+
"default_2024_08_21"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"score_threshold": {
|
|
131
|
+
"type": "number",
|
|
132
|
+
"description": "The score threshold for the file search. All values must be a floating point number between 0 and 1."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"score_threshold"
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"type"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "",
|
|
149
|
+
"properties": {
|
|
150
|
+
"type": {
|
|
151
|
+
"description": "The type of tool being defined: `function`",
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": [
|
|
154
|
+
"function"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"function": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"description": "",
|
|
160
|
+
"properties": {
|
|
161
|
+
"description": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "A description of what the function does, used by the model to choose when and how to call the function."
|
|
164
|
+
},
|
|
165
|
+
"name": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."
|
|
168
|
+
},
|
|
169
|
+
"parameters": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list."
|
|
172
|
+
},
|
|
173
|
+
"strict": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling)."
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": [
|
|
179
|
+
"name"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"type",
|
|
185
|
+
"function"
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"tool_resources": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n",
|
|
194
|
+
"properties": {
|
|
195
|
+
"code_interpreter": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"description": "",
|
|
198
|
+
"properties": {
|
|
199
|
+
"file_ids": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"description": "A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n",
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": ""
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"file_search": {
|
|
210
|
+
"description": "",
|
|
211
|
+
"oneOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "object",
|
|
214
|
+
"description": ""
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "object",
|
|
218
|
+
"description": ""
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"metadata": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. \n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n"
|
|
227
|
+
},
|
|
228
|
+
"temperature": {
|
|
229
|
+
"type": "number",
|
|
230
|
+
"description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n"
|
|
231
|
+
},
|
|
232
|
+
"top_p": {
|
|
233
|
+
"type": "number",
|
|
234
|
+
"description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n"
|
|
235
|
+
},
|
|
236
|
+
"response_format": {
|
|
237
|
+
"description": "Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n",
|
|
238
|
+
"oneOf": [
|
|
239
|
+
{
|
|
240
|
+
"description": "`auto` is the default value\n",
|
|
241
|
+
"type": "string",
|
|
242
|
+
"enum": [
|
|
243
|
+
"auto"
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "object",
|
|
248
|
+
"description": "Default response format. Used to generate text responses.\n",
|
|
249
|
+
"properties": {
|
|
250
|
+
"type": {
|
|
251
|
+
"description": "The type of response format being defined. Always `text`.",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": [
|
|
254
|
+
"text"
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"type"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "object",
|
|
264
|
+
"description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n",
|
|
265
|
+
"properties": {
|
|
266
|
+
"type": {
|
|
267
|
+
"description": "The type of response format being defined. Always `json_object`.",
|
|
268
|
+
"type": "string",
|
|
269
|
+
"enum": [
|
|
270
|
+
"json_object"
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": [
|
|
275
|
+
"type"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "object",
|
|
280
|
+
"description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).\n",
|
|
281
|
+
"properties": {
|
|
282
|
+
"type": {
|
|
283
|
+
"description": "The type of response format being defined. Always `json_schema`.",
|
|
284
|
+
"type": "string",
|
|
285
|
+
"enum": [
|
|
286
|
+
"json_schema"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
"json_schema": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"description": "Structured Outputs configuration options, including a JSON Schema.\n",
|
|
292
|
+
"properties": {
|
|
293
|
+
"description": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"
|
|
296
|
+
},
|
|
297
|
+
"name": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"
|
|
300
|
+
},
|
|
301
|
+
"schema": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"description": "The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n"
|
|
304
|
+
},
|
|
305
|
+
"strict": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"description": "Whether to enable strict schema adherence when generating the output.\nIf set to true, the model will always follow the exact schema defined\nin the `schema` field. Only a subset of JSON Schema is supported when\n`strict` is `true`. To learn more, read the [Structured Outputs\nguide](/docs/guides/structured-outputs).\n"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"required": [
|
|
311
|
+
"name"
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"required": [
|
|
316
|
+
"type",
|
|
317
|
+
"json_schema"
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|