1# Chat Completions streaming events1# Chat Completions streaming events
2 2
3> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.
4
3Stream Chat Completions in real time. Receive chunks of completions5Stream Chat Completions in real time. Receive chunks of completions
4returned from the model using server-sent events.6returned from the model using server-sent events.
5[Learn more](https://developers.openai.com/docs/guides/streaming-responses?api-mode=chat).7[Learn more](https://developers.openai.com/docs/guides/streaming-responses?api-mode=chat).
19 "(resource) chat.completions > (model) chat_completion_chunk > (schema)": {21 "(resource) chat.completions > (model) chat_completion_chunk > (schema)": {
20 "kind": "HttpDeclTypeAlias",22 "kind": "HttpDeclTypeAlias",
21 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse",23 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse",
24 "docstring": "Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n[Learn more](/docs/guides/streaming-responses).\n",
22 "ident": "ChatCompletionChunk",25 "ident": "ChatCompletionChunk",
23 "type": {26 "type": {
24 "kind": "HttpTypeObject",27 "kind": "HttpTypeObject",
52 }55 }
53 ]56 ]
54 },57 },
55 "docstring": "Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n[Learn more](/docs/guides/streaming-responses).\n",
56 "childrenParentSchema": "object",58 "childrenParentSchema": "object",
57 "children": [59 "children": [
58 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) id",60 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) id",
68 },70 },
69 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) id": {71 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) id": {
70 "kind": "HttpDeclProperty",72 "kind": "HttpDeclProperty",
71 "docstring": "A unique identifier for the chat completion. Each chunk has the same ID.",73 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/id",
74 "deprecated": false,
72 "key": "id",75 "key": "id",
73 "optional": false,76 "docstring": "A unique identifier for the chat completion. Each chunk has the same ID.",
74 "nullable": false,
75 "type": {77 "type": {
76 "kind": "HttpTypeString"78 "kind": "HttpTypeString"
77 },79 },
78 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/id",80 "optional": false,
79 "deprecated": false,81 "nullable": false,
80 "schemaType": "string",82 "schemaType": "string",
81 "children": []83 "children": []
82 },84 },
83 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices": {85 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices": {
84 "kind": "HttpDeclProperty",86 "kind": "HttpDeclProperty",
85 "docstring": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.\n",87 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices",
88 "deprecated": false,
86 "key": "choices",89 "key": "choices",
87 "optional": false,90 "docstring": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\nlast chunk if you set `stream_options: {\"include_usage\": true}`.\n",
88 "nullable": false,
89 "type": {91 "type": {
90 "kind": "HttpTypeArray",92 "kind": "HttpTypeArray",
93 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices",
91 "elementType": {94 "elementType": {
92 "kind": "HttpTypeObject",95 "kind": "HttpTypeObject",
93 "members": [96 "members": [
104 "ident": "logprobs"107 "ident": "logprobs"
105 }108 }
106 ]109 ]
110 }
107 },111 },
108 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices"112 "optional": false,
109 },113 "nullable": false,
110 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices",
111 "deprecated": false,
112 "schemaType": "array",114 "schemaType": "array",
113 "childrenParentSchema": "object",115 "childrenParentSchema": "object",
114 "children": [116 "children": [
120 },122 },
121 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) created": {123 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) created": {
122 "kind": "HttpDeclProperty",124 "kind": "HttpDeclProperty",
123 "docstring": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.",125 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/created",
126 "deprecated": false,
124 "key": "created",127 "key": "created",
125 "optional": false,128 "docstring": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.",
126 "nullable": false,
127 "type": {129 "type": {
128 "kind": "HttpTypeNumber"130 "kind": "HttpTypeNumber"
129 },131 },
130 "constraints": {132 "constraints": {
131 "format": "unixtime"133 "format": "unixtime"
132 },134 },
133 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/created",135 "optional": false,
134 "deprecated": false,136 "nullable": false,
135 "schemaType": "integer",137 "schemaType": "integer",
136 "children": []138 "children": []
137 },139 },
138 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) model": {140 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) model": {
139 "kind": "HttpDeclProperty",141 "kind": "HttpDeclProperty",
140 "docstring": "The model to generate the completion.",142 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/model",
143 "deprecated": false,
141 "key": "model",144 "key": "model",
142 "optional": false,145 "docstring": "The model to generate the completion.",
143 "nullable": false,
144 "type": {146 "type": {
145 "kind": "HttpTypeString"147 "kind": "HttpTypeString"
146 },148 },
147 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/model",149 "optional": false,
148 "deprecated": false,150 "nullable": false,
149 "schemaType": "string",151 "schemaType": "string",
150 "children": []152 "children": []
151 },153 },
152 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) object": {154 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) object": {
153 "kind": "HttpDeclProperty",155 "kind": "HttpDeclProperty",
154 "docstring": "The object type, which is always `chat.completion.chunk`.",156 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/object",
157 "deprecated": false,
155 "key": "object",158 "key": "object",
156 "optional": false,159 "docstring": "The object type, which is always `chat.completion.chunk`.",
157 "nullable": false,
158 "type": {160 "type": {
159 "kind": "HttpTypeUnion",161 "kind": "HttpTypeUnion",
162 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/object",
160 "types": [163 "types": [
161 {164 {
162 "kind": "HttpTypeLiteral",165 "kind": "HttpTypeLiteral",
163 "literal": "chat.completion.chunk"166 "literal": "chat.completion.chunk"
164 }167 }
165 ],168 ]
166 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/object"
167 },169 },
168 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/object",170 "optional": false,
169 "deprecated": false,171 "nullable": false,
170 "schemaType": "enum",172 "schemaType": "enum",
171 "childrenParentSchema": "enum",173 "childrenParentSchema": "enum",
172 "children": [174 "children": [
175 },177 },
176 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation": {178 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation": {
177 "kind": "HttpDeclProperty",179 "kind": "HttpDeclProperty",
178 "docstring": "Moderation results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.\n",180 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/moderation",
181 "deprecated": false,
179 "key": "moderation",182 "key": "moderation",
180 "optional": true,183 "docstring": "Moderation results for the request input and generated output. Present\non the moderation chunk when moderated completions are requested.\n",
181 "nullable": true,
182 "type": {184 "type": {
183 "kind": "HttpTypeObject",185 "kind": "HttpTypeObject",
184 "members": [186 "members": [
190 }192 }
191 ]193 ]
192 },194 },
193 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/moderation",195 "optional": true,
194 "deprecated": false,196 "nullable": true,
195 "schemaType": "object",197 "schemaType": "object",
196 "childrenParentSchema": "object",198 "childrenParentSchema": "object",
197 "children": [199 "children": [
201 },203 },
202 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) service_tier": {204 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) service_tier": {
203 "kind": "HttpDeclProperty",205 "kind": "HttpDeclProperty",
204 "docstring": "Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n",206 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/service_tier",
207 "deprecated": false,
205 "key": "service_tier",208 "key": "service_tier",
206 "optional": true,209 "docstring": "Specifies the processing type used for serving the request.\n - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n - When not set, the default behavior is 'auto'.\n\n When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n",
207 "nullable": true,
208 "default": "auto",
209 "type": {210 "type": {
210 "kind": "HttpTypeUnion",211 "kind": "HttpTypeUnion",
212 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/service_tier",
211 "types": [213 "types": [
212 {214 {
213 "kind": "HttpTypeLiteral",215 "kind": "HttpTypeLiteral",
229 "kind": "HttpTypeLiteral",231 "kind": "HttpTypeLiteral",
230 "literal": "priority"232 "literal": "priority"
231 }233 }
232 ],234 ]
233 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/service_tier"
234 },235 },
235 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/service_tier",236 "default": "auto",
236 "deprecated": false,237 "optional": true,
238 "nullable": true,
237 "schemaType": "enum",239 "schemaType": "enum",
238 "childrenParentSchema": "enum",240 "childrenParentSchema": "enum",
239 "children": [241 "children": [
246 },248 },
247 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) system_fingerprint": {249 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) system_fingerprint": {
248 "kind": "HttpDeclProperty",250 "kind": "HttpDeclProperty",
249 "docstring": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n",251 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/system_fingerprint",
252 "deprecated": true,
250 "key": "system_fingerprint",253 "key": "system_fingerprint",
251 "optional": true,254 "docstring": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n",
252 "nullable": false,
253 "type": {255 "type": {
254 "kind": "HttpTypeString"256 "kind": "HttpTypeString"
255 },257 },
256 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/system_fingerprint",258 "optional": true,
257 "deprecated": true,259 "nullable": false,
258 "schemaType": "string",260 "schemaType": "string",
259 "children": []261 "children": []
260 },262 },
261 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) usage": {263 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) usage": {
262 "kind": "HttpDeclProperty",264 "kind": "HttpDeclProperty",
263 "docstring": "An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n",265 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/usage",
266 "deprecated": false,
264 "key": "usage",267 "key": "usage",
265 "optional": true,268 "docstring": "An optional field that will only be present when you set\n`stream_options: {\"include_usage\": true}` in your request. When present, it\ncontains a null value **except for the last chunk** which contains the\ntoken usage statistics for the entire request.\n\n**NOTE:** If the stream is interrupted or cancelled, you may not\nreceive the final usage chunk which contains the total token usage for\nthe request.\n",
266 "nullable": true,
267 "type": {269 "type": {
268 "kind": "HttpTypeReference",270 "kind": "HttpTypeReference",
269 "ident": "CompletionUsage",271 "ident": "CompletionUsage",
270 "$ref": "(resource) completions > (model) completion_usage > (schema)"272 "$ref": "(resource) completions > (model) completion_usage > (schema)"
271 },273 },
272 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/usage",274 "optional": true,
273 "deprecated": false,275 "nullable": true,
274 "schemaType": "object",
275 "modelImplicit": false,276 "modelImplicit": false,
277 "schemaType": "object",
276 "modelPath": "(resource) completions > (model) completion_usage",278 "modelPath": "(resource) completions > (model) completion_usage",
277 "childrenParentSchema": "object",279 "childrenParentSchema": "object",
278 "children": [280 "children": [
285 },287 },
286 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta": {288 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta": {
287 "kind": "HttpDeclProperty",289 "kind": "HttpDeclProperty",
288 "docstring": "A chat completion delta generated by streamed model responses.",290 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/delta",
291 "deprecated": false,
289 "key": "delta",292 "key": "delta",
290 "optional": false,293 "docstring": "A chat completion delta generated by streamed model responses.",
291 "nullable": false,
292 "type": {294 "type": {
293 "kind": "HttpTypeObject",295 "kind": "HttpTypeObject",
294 "members": [296 "members": [
309 }311 }
310 ]312 ]
311 },313 },
312 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/delta",314 "optional": false,
313 "deprecated": false,315 "nullable": false,
314 "schemaType": "object",316 "schemaType": "object",
315 "childrenParentSchema": "object",317 "childrenParentSchema": "object",
316 "children": [318 "children": [
323 },325 },
324 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) finish_reason": {326 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) finish_reason": {
325 "kind": "HttpDeclProperty",327 "kind": "HttpDeclProperty",
326 "docstring": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n",328 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/finish_reason",
329 "deprecated": false,
327 "key": "finish_reason",330 "key": "finish_reason",
328 "optional": false,331 "docstring": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n",
329 "nullable": true,
330 "type": {332 "type": {
331 "kind": "HttpTypeUnion",333 "kind": "HttpTypeUnion",
334 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/finish_reason",
332 "types": [335 "types": [
333 {336 {
334 "kind": "HttpTypeLiteral",337 "kind": "HttpTypeLiteral",
350 "kind": "HttpTypeLiteral",353 "kind": "HttpTypeLiteral",
351 "literal": "function_call"354 "literal": "function_call"
352 }355 }
353 ],356 ]
354 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/finish_reason"
355 },357 },
356 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/finish_reason",358 "optional": false,
357 "deprecated": false,359 "nullable": true,
358 "schemaType": "enum",360 "schemaType": "enum",
359 "childrenParentSchema": "enum",361 "childrenParentSchema": "enum",
360 "children": [362 "children": [
367 },369 },
368 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) index": {370 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) index": {
369 "kind": "HttpDeclProperty",371 "kind": "HttpDeclProperty",
370 "docstring": "The index of the choice in the list of choices.",372 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/index",
373 "deprecated": false,
371 "key": "index",374 "key": "index",
372 "optional": false,375 "docstring": "The index of the choice in the list of choices.",
373 "nullable": false,
374 "type": {376 "type": {
375 "kind": "HttpTypeNumber"377 "kind": "HttpTypeNumber"
376 },378 },
377 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/index",379 "optional": false,
378 "deprecated": false,380 "nullable": false,
379 "schemaType": "integer",381 "schemaType": "integer",
380 "children": []382 "children": []
381 },383 },
382 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs": {384 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs": {
383 "kind": "HttpDeclProperty",385 "kind": "HttpDeclProperty",
384 "docstring": "Log probability information for the choice.",386 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs",
387 "deprecated": false,
385 "key": "logprobs",388 "key": "logprobs",
386 "optional": true,389 "docstring": "Log probability information for the choice.",
387 "nullable": true,
388 "type": {390 "type": {
389 "kind": "HttpTypeObject",391 "kind": "HttpTypeObject",
390 "members": [392 "members": [
396 }398 }
397 ]399 ]
398 },400 },
399 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs",401 "optional": true,
400 "deprecated": false,402 "nullable": true,
401 "schemaType": "object",403 "schemaType": "object",
402 "childrenParentSchema": "object",404 "childrenParentSchema": "object",
403 "children": [405 "children": [
414 },416 },
415 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input": {417 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input": {
416 "kind": "HttpDeclProperty",418 "kind": "HttpDeclProperty",
417 "docstring": "Moderation for the request input.",419 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input",
420 "deprecated": false,
418 "key": "input",421 "key": "input",
419 "optional": false,422 "docstring": "Moderation for the request input.",
420 "nullable": false,
421 "type": {423 "type": {
422 "kind": "HttpTypeUnion",424 "kind": "HttpTypeUnion",
425 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input",
423 "types": [426 "types": [
424 {427 {
425 "kind": "HttpTypeObject",428 "kind": "HttpTypeObject",
449 }452 }
450 ]453 ]
451 }454 }
452 ],455 ]
453 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input"
454 },456 },
455 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input",457 "optional": false,
456 "deprecated": false,458 "nullable": false,
457 "schemaType": "union",459 "schemaType": "union",
458 "childrenParentSchema": "union",460 "childrenParentSchema": "union",
459 "children": [461 "children": [
463 },465 },
464 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output": {466 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output": {
465 "kind": "HttpDeclProperty",467 "kind": "HttpDeclProperty",
466 "docstring": "Moderation for the generated output.",468 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output",
469 "deprecated": false,
467 "key": "output",470 "key": "output",
468 "optional": false,471 "docstring": "Moderation for the generated output.",
469 "nullable": false,
470 "type": {472 "type": {
471 "kind": "HttpTypeUnion",473 "kind": "HttpTypeUnion",
474 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output",
472 "types": [475 "types": [
473 {476 {
474 "kind": "HttpTypeObject",477 "kind": "HttpTypeObject",
498 }501 }
499 ]502 ]
500 }503 }
501 ],504 ]
502 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output"
503 },505 },
504 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output",506 "optional": false,
505 "deprecated": false,507 "nullable": false,
506 "schemaType": "union",508 "schemaType": "union",
507 "childrenParentSchema": "union",509 "childrenParentSchema": "union",
508 "children": [510 "children": [
547 },549 },
548 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens": {550 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens": {
549 "kind": "HttpDeclProperty",551 "kind": "HttpDeclProperty",
550 "docstring": "Number of tokens in the generated completion.",552 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens",
553 "deprecated": false,
551 "key": "completion_tokens",554 "key": "completion_tokens",
552 "optional": false,555 "docstring": "Number of tokens in the generated completion.",
553 "nullable": false,
554 "default": 0,
555 "type": {556 "type": {
556 "kind": "HttpTypeNumber"557 "kind": "HttpTypeNumber"
557 },558 },
558 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens",559 "default": 0,
559 "deprecated": false,560 "optional": false,
561 "nullable": false,
560 "schemaType": "integer",562 "schemaType": "integer",
561 "children": []563 "children": []
562 },564 },
563 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens": {565 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens": {
564 "kind": "HttpDeclProperty",566 "kind": "HttpDeclProperty",
565 "docstring": "Number of tokens in the prompt.",567 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens",
568 "deprecated": false,
566 "key": "prompt_tokens",569 "key": "prompt_tokens",
567 "optional": false,570 "docstring": "Number of tokens in the prompt.",
568 "nullable": false,
569 "default": 0,
570 "type": {571 "type": {
571 "kind": "HttpTypeNumber"572 "kind": "HttpTypeNumber"
572 },573 },
573 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens",574 "default": 0,
574 "deprecated": false,575 "optional": false,
576 "nullable": false,
575 "schemaType": "integer",577 "schemaType": "integer",
576 "children": []578 "children": []
577 },579 },
578 "(resource) completions > (model) completion_usage > (schema) > (property) total_tokens": {580 "(resource) completions > (model) completion_usage > (schema) > (property) total_tokens": {
579 "kind": "HttpDeclProperty",581 "kind": "HttpDeclProperty",
580 "docstring": "Total number of tokens used in the request (prompt + completion).",582 "oasRef": "#/components/schemas/CompletionUsage/properties/total_tokens",
583 "deprecated": false,
581 "key": "total_tokens",584 "key": "total_tokens",
582 "optional": false,585 "docstring": "Total number of tokens used in the request (prompt + completion).",
583 "nullable": false,
584 "default": 0,
585 "type": {586 "type": {
586 "kind": "HttpTypeNumber"587 "kind": "HttpTypeNumber"
587 },588 },
588 "oasRef": "#/components/schemas/CompletionUsage/properties/total_tokens",589 "default": 0,
589 "deprecated": false,590 "optional": false,
591 "nullable": false,
590 "schemaType": "integer",592 "schemaType": "integer",
591 "children": []593 "children": []
592 },594 },
593 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details": {595 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details": {
594 "kind": "HttpDeclProperty",596 "kind": "HttpDeclProperty",
595 "docstring": "Breakdown of tokens used in a completion.",597 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details",
598 "deprecated": false,
596 "key": "completion_tokens_details",599 "key": "completion_tokens_details",
597 "optional": true,600 "docstring": "Breakdown of tokens used in a completion.",
598 "nullable": false,
599 "type": {601 "type": {
600 "kind": "HttpTypeObject",602 "kind": "HttpTypeObject",
601 "members": [603 "members": [
613 }615 }
614 ]616 ]
615 },617 },
616 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details",618 "optional": true,
617 "deprecated": false,619 "nullable": false,
618 "schemaType": "object",620 "schemaType": "object",
619 "childrenParentSchema": "object",621 "childrenParentSchema": "object",
620 "children": [622 "children": [
626 },628 },
627 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details": {629 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details": {
628 "kind": "HttpDeclProperty",630 "kind": "HttpDeclProperty",
629 "docstring": "Breakdown of tokens used in the prompt.",631 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details",
632 "deprecated": false,
630 "key": "prompt_tokens_details",633 "key": "prompt_tokens_details",
631 "optional": true,634 "docstring": "Breakdown of tokens used in the prompt.",
632 "nullable": false,
633 "type": {635 "type": {
634 "kind": "HttpTypeObject",636 "kind": "HttpTypeObject",
635 "members": [637 "members": [
644 }646 }
645 ]647 ]
646 },648 },
647 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details",649 "optional": true,
648 "deprecated": false,650 "nullable": false,
649 "schemaType": "object",651 "schemaType": "object",
650 "childrenParentSchema": "object",652 "childrenParentSchema": "object",
651 "children": [653 "children": [
657 "(resource) completions > (model) completion_usage > (schema)": {659 "(resource) completions > (model) completion_usage > (schema)": {
658 "kind": "HttpDeclTypeAlias",660 "kind": "HttpDeclTypeAlias",
659 "oasRef": "#/components/schemas/CompletionUsage",661 "oasRef": "#/components/schemas/CompletionUsage",
662 "docstring": "Usage statistics for the completion request.",
660 "ident": "CompletionUsage",663 "ident": "CompletionUsage",
661 "type": {664 "type": {
662 "kind": "HttpTypeObject",665 "kind": "HttpTypeObject",
678 }681 }
679 ]682 ]
680 },683 },
681 "docstring": "Usage statistics for the completion request.",
682 "childrenParentSchema": "object",684 "childrenParentSchema": "object",
683 "children": [685 "children": [
684 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens",686 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens",
690 },692 },
691 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) content": {693 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) content": {
692 "kind": "HttpDeclProperty",694 "kind": "HttpDeclProperty",
693 "docstring": "The contents of the chunk message.",695 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/content",
696 "deprecated": false,
694 "key": "content",697 "key": "content",
695 "optional": true,698 "docstring": "The contents of the chunk message.",
696 "nullable": true,
697 "type": {699 "type": {
698 "kind": "HttpTypeString"700 "kind": "HttpTypeString"
699 },701 },
700 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/content",702 "optional": true,
701 "deprecated": false,703 "nullable": true,
702 "schemaType": "string",704 "schemaType": "string",
703 "children": []705 "children": []
704 },706 },
705 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call": {707 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call": {
706 "kind": "HttpDeclProperty",708 "kind": "HttpDeclProperty",
707 "docstring": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",709 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call",
710 "deprecated": true,
708 "key": "function_call",711 "key": "function_call",
709 "optional": true,712 "docstring": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",
710 "nullable": false,
711 "type": {713 "type": {
712 "kind": "HttpTypeObject",714 "kind": "HttpTypeObject",
713 "members": [715 "members": [
719 }721 }
720 ]722 ]
721 },723 },
722 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call",724 "optional": true,
723 "deprecated": true,725 "nullable": false,
724 "schemaType": "object",726 "schemaType": "object",
725 "childrenParentSchema": "object",727 "childrenParentSchema": "object",
726 "children": [728 "children": [
730 },732 },
731 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) refusal": {733 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) refusal": {
732 "kind": "HttpDeclProperty",734 "kind": "HttpDeclProperty",
733 "docstring": "The refusal message generated by the model.",735 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/refusal",
736 "deprecated": false,
734 "key": "refusal",737 "key": "refusal",
735 "optional": true,738 "docstring": "The refusal message generated by the model.",
736 "nullable": true,
737 "type": {739 "type": {
738 "kind": "HttpTypeString"740 "kind": "HttpTypeString"
739 },741 },
740 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/refusal",742 "optional": true,
741 "deprecated": false,743 "nullable": true,
742 "schemaType": "string",744 "schemaType": "string",
743 "children": []745 "children": []
744 },746 },
745 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) role": {747 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) role": {
746 "kind": "HttpDeclProperty",748 "kind": "HttpDeclProperty",
747 "docstring": "The role of the author of this message.",749 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/role",
750 "deprecated": false,
748 "key": "role",751 "key": "role",
749 "optional": true,752 "docstring": "The role of the author of this message.",
750 "nullable": false,
751 "type": {753 "type": {
752 "kind": "HttpTypeUnion",754 "kind": "HttpTypeUnion",
755 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/role",
753 "types": [756 "types": [
754 {757 {
755 "kind": "HttpTypeLiteral",758 "kind": "HttpTypeLiteral",
771 "kind": "HttpTypeLiteral",774 "kind": "HttpTypeLiteral",
772 "literal": "tool"775 "literal": "tool"
773 }776 }
774 ],777 ]
775 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/role"
776 },778 },
777 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/role",779 "optional": true,
778 "deprecated": false,780 "nullable": false,
779 "schemaType": "enum",781 "schemaType": "enum",
780 "childrenParentSchema": "enum",782 "childrenParentSchema": "enum",
781 "children": [783 "children": [
788 },790 },
789 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls": {791 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls": {
790 "kind": "HttpDeclProperty",792 "kind": "HttpDeclProperty",
793 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/tool_calls",
794 "deprecated": false,
791 "key": "tool_calls",795 "key": "tool_calls",
792 "optional": true,
793 "nullable": false,
794 "type": {796 "type": {
795 "kind": "HttpTypeArray",797 "kind": "HttpTypeArray",
798 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/tool_calls",
796 "elementType": {799 "elementType": {
797 "kind": "HttpTypeObject",800 "kind": "HttpTypeObject",
798 "members": [801 "members": [
809 "ident": "type"812 "ident": "type"
810 }813 }
811 ]814 ]
815 }
812 },816 },
813 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/tool_calls"817 "optional": true,
814 },818 "nullable": false,
815 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/tool_calls",
816 "deprecated": false,
817 "schemaType": "array",819 "schemaType": "array",
818 "childrenParentSchema": "object",820 "childrenParentSchema": "object",
819 "children": [821 "children": [
860 },862 },
861 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs > (property) content": {863 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs > (property) content": {
862 "kind": "HttpDeclProperty",864 "kind": "HttpDeclProperty",
863 "docstring": "A list of message content tokens with log probability information.",865 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/content",
866 "deprecated": false,
864 "key": "content",867 "key": "content",
865 "optional": false,868 "docstring": "A list of message content tokens with log probability information.",
866 "nullable": true,
867 "type": {869 "type": {
868 "kind": "HttpTypeArray",870 "kind": "HttpTypeArray",
871 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/content",
869 "elementType": {872 "elementType": {
870 "kind": "HttpTypeReference",873 "kind": "HttpTypeReference",
871 "ident": "ChatCompletionTokenLogprob",874 "ident": "ChatCompletionTokenLogprob",
872 "$ref": "(resource) chat.completions > (model) chat_completion_token_logprob > (schema)"875 "$ref": "(resource) chat.completions > (model) chat_completion_token_logprob > (schema)"
876 }
873 },877 },
874 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/content"878 "optional": false,
875 },879 "nullable": true,
876 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/content",
877 "deprecated": false,
878 "schemaType": "array",880 "schemaType": "array",
879 "childrenParentSchema": "object",881 "childrenParentSchema": "object",
880 "children": [882 "children": [
886 },888 },
887 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs > (property) refusal": {889 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) logprobs > (property) refusal": {
888 "kind": "HttpDeclProperty",890 "kind": "HttpDeclProperty",
889 "docstring": "A list of message refusal tokens with log probability information.",891 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/refusal",
892 "deprecated": false,
890 "key": "refusal",893 "key": "refusal",
891 "optional": false,894 "docstring": "A list of message refusal tokens with log probability information.",
892 "nullable": true,
893 "type": {895 "type": {
894 "kind": "HttpTypeArray",896 "kind": "HttpTypeArray",
897 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/refusal",
895 "elementType": {898 "elementType": {
896 "kind": "HttpTypeReference",899 "kind": "HttpTypeReference",
897 "ident": "ChatCompletionTokenLogprob",900 "ident": "ChatCompletionTokenLogprob",
898 "$ref": "(resource) chat.completions > (model) chat_completion_token_logprob > (schema)"901 "$ref": "(resource) chat.completions > (model) chat_completion_token_logprob > (schema)"
902 }
899 },903 },
900 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/refusal"904 "optional": false,
901 },905 "nullable": true,
902 "oasRef": "#/components/schemas/CreateChatCompletionStreamResponse/properties/choices/items/properties/logprobs/properties/refusal",
903 "deprecated": false,
904 "schemaType": "array",906 "schemaType": "array",
905 "childrenParentSchema": "object",907 "childrenParentSchema": "object",
906 "children": [908 "children": [
913 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0": {915 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0": {
914 "kind": "HttpDeclTypeAlias",916 "kind": "HttpDeclTypeAlias",
915 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input/oneOf/0",917 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input/oneOf/0",
918 "docstring": "Successful moderation results for the request input or generated output.",
916 "ident": "ModerationResults",919 "ident": "ModerationResults",
917 "type": {920 "type": {
918 "kind": "HttpTypeObject",921 "kind": "HttpTypeObject",
928 }931 }
929 ]932 ]
930 },933 },
931 "docstring": "Successful moderation results for the request input or generated output.",
932 "childrenParentSchema": "object",934 "childrenParentSchema": "object",
933 "children": [935 "children": [
934 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) model",936 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) model",
939 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1": {941 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1": {
940 "kind": "HttpDeclTypeAlias",942 "kind": "HttpDeclTypeAlias",
941 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input/oneOf/1",943 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/input/oneOf/1",
944 "docstring": "An error produced while attempting moderation.",
942 "ident": "Error",945 "ident": "Error",
943 "type": {946 "type": {
944 "kind": "HttpTypeObject",947 "kind": "HttpTypeObject",
954 }957 }
955 ]958 ]
956 },959 },
957 "docstring": "An error produced while attempting moderation.",
958 "childrenParentSchema": "object",960 "childrenParentSchema": "object",
959 "children": [961 "children": [
960 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) code",962 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) code",
965 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0": {967 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0": {
966 "kind": "HttpDeclTypeAlias",968 "kind": "HttpDeclTypeAlias",
967 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output/oneOf/0",969 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output/oneOf/0",
970 "docstring": "Successful moderation results for the request input or generated output.",
968 "ident": "ModerationResults",971 "ident": "ModerationResults",
969 "type": {972 "type": {
970 "kind": "HttpTypeObject",973 "kind": "HttpTypeObject",
980 }983 }
981 ]984 ]
982 },985 },
983 "docstring": "Successful moderation results for the request input or generated output.",
984 "childrenParentSchema": "object",986 "childrenParentSchema": "object",
985 "children": [987 "children": [
986 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) model",988 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) model",
991 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1": {993 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1": {
992 "kind": "HttpDeclTypeAlias",994 "kind": "HttpDeclTypeAlias",
993 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output/oneOf/1",995 "oasRef": "#/components/schemas/ChatCompletionModeration/properties/output/oneOf/1",
996 "docstring": "An error produced while attempting moderation.",
994 "ident": "Error",997 "ident": "Error",
995 "type": {998 "type": {
996 "kind": "HttpTypeObject",999 "kind": "HttpTypeObject",
1006 }1009 }
1007 ]1010 ]
1008 },1011 },
1009 "docstring": "An error produced while attempting moderation.",
1010 "childrenParentSchema": "object",1012 "childrenParentSchema": "object",
1011 "children": [1013 "children": [
1012 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) code",1014 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) code",
1016 },1018 },
1017 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) accepted_prediction_tokens": {1019 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) accepted_prediction_tokens": {
1018 "kind": "HttpDeclProperty",1020 "kind": "HttpDeclProperty",
1019 "docstring": "When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n",1021 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/accepted_prediction_tokens",
1022 "deprecated": false,
1020 "key": "accepted_prediction_tokens",1023 "key": "accepted_prediction_tokens",
1021 "optional": true,1024 "docstring": "When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n",
1022 "nullable": false,
1023 "default": 0,
1024 "type": {1025 "type": {
1025 "kind": "HttpTypeNumber"1026 "kind": "HttpTypeNumber"
1026 },1027 },
1027 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/accepted_prediction_tokens",1028 "default": 0,
1028 "deprecated": false,1029 "optional": true,
1030 "nullable": false,
1029 "schemaType": "integer",1031 "schemaType": "integer",
1030 "children": []1032 "children": []
1031 },1033 },
1032 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) audio_tokens": {1034 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) audio_tokens": {
1033 "kind": "HttpDeclProperty",1035 "kind": "HttpDeclProperty",
1034 "docstring": "Audio input tokens generated by the model.",1036 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/audio_tokens",
1037 "deprecated": false,
1035 "key": "audio_tokens",1038 "key": "audio_tokens",
1036 "optional": true,1039 "docstring": "Audio input tokens generated by the model.",
1037 "nullable": false,
1038 "default": 0,
1039 "type": {1040 "type": {
1040 "kind": "HttpTypeNumber"1041 "kind": "HttpTypeNumber"
1041 },1042 },
1042 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/audio_tokens",1043 "default": 0,
1043 "deprecated": false,1044 "optional": true,
1045 "nullable": false,
1044 "schemaType": "integer",1046 "schemaType": "integer",
1045 "children": []1047 "children": []
1046 },1048 },
1047 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) reasoning_tokens": {1049 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) reasoning_tokens": {
1048 "kind": "HttpDeclProperty",1050 "kind": "HttpDeclProperty",
1049 "docstring": "Tokens generated by the model for reasoning.",1051 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/reasoning_tokens",
1052 "deprecated": false,
1050 "key": "reasoning_tokens",1053 "key": "reasoning_tokens",
1051 "optional": true,1054 "docstring": "Tokens generated by the model for reasoning.",
1052 "nullable": false,
1053 "default": 0,
1054 "type": {1055 "type": {
1055 "kind": "HttpTypeNumber"1056 "kind": "HttpTypeNumber"
1056 },1057 },
1057 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/reasoning_tokens",1058 "default": 0,
1058 "deprecated": false,1059 "optional": true,
1060 "nullable": false,
1059 "schemaType": "integer",1061 "schemaType": "integer",
1060 "children": []1062 "children": []
1061 },1063 },
1062 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) rejected_prediction_tokens": {1064 "(resource) completions > (model) completion_usage > (schema) > (property) completion_tokens_details > (property) rejected_prediction_tokens": {
1063 "kind": "HttpDeclProperty",1065 "kind": "HttpDeclProperty",
1064 "docstring": "When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n",1066 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/rejected_prediction_tokens",
1067 "deprecated": false,
1065 "key": "rejected_prediction_tokens",1068 "key": "rejected_prediction_tokens",
1066 "optional": true,1069 "docstring": "When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context window\nlimits.\n",
1067 "nullable": false,
1068 "default": 0,
1069 "type": {1070 "type": {
1070 "kind": "HttpTypeNumber"1071 "kind": "HttpTypeNumber"
1071 },1072 },
1072 "oasRef": "#/components/schemas/CompletionUsage/properties/completion_tokens_details/properties/rejected_prediction_tokens",1073 "default": 0,
1073 "deprecated": false,1074 "optional": true,
1075 "nullable": false,
1074 "schemaType": "integer",1076 "schemaType": "integer",
1075 "children": []1077 "children": []
1076 },1078 },
1077 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) audio_tokens": {1079 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) audio_tokens": {
1078 "kind": "HttpDeclProperty",1080 "kind": "HttpDeclProperty",
1079 "docstring": "Audio input tokens present in the prompt.",1081 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/audio_tokens",
1082 "deprecated": false,
1080 "key": "audio_tokens",1083 "key": "audio_tokens",
1081 "optional": true,1084 "docstring": "Audio input tokens present in the prompt.",
1082 "nullable": false,
1083 "default": 0,
1084 "type": {1085 "type": {
1085 "kind": "HttpTypeNumber"1086 "kind": "HttpTypeNumber"
1086 },1087 },
1087 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/audio_tokens",1088 "default": 0,
1088 "deprecated": false,1089 "optional": true,
1090 "nullable": false,
1089 "schemaType": "integer",1091 "schemaType": "integer",
1090 "children": []1092 "children": []
1091 },1093 },
1092 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) cache_write_tokens": {1094 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) cache_write_tokens": {
1093 "kind": "HttpDeclProperty",1095 "kind": "HttpDeclProperty",
1094 "docstring": "The unadjusted number of prompt tokens written to cache.",1096 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/cache_write_tokens",
1097 "deprecated": false,
1095 "key": "cache_write_tokens",1098 "key": "cache_write_tokens",
1096 "optional": true,1099 "docstring": "The unadjusted number of prompt tokens written to cache.",
1097 "nullable": false,
1098 "default": 0,
1099 "type": {1100 "type": {
1100 "kind": "HttpTypeNumber"1101 "kind": "HttpTypeNumber"
1101 },1102 },
1102 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/cache_write_tokens",1103 "default": 0,
1103 "deprecated": false,1104 "optional": true,
1105 "nullable": false,
1104 "schemaType": "integer",1106 "schemaType": "integer",
1105 "children": []1107 "children": []
1106 },1108 },
1107 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) cached_tokens": {1109 "(resource) completions > (model) completion_usage > (schema) > (property) prompt_tokens_details > (property) cached_tokens": {
1108 "kind": "HttpDeclProperty",1110 "kind": "HttpDeclProperty",
1109 "docstring": "Cached tokens present in the prompt.",1111 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/cached_tokens",
1112 "deprecated": false,
1110 "key": "cached_tokens",1113 "key": "cached_tokens",
1111 "optional": true,1114 "docstring": "Cached tokens present in the prompt.",
1112 "nullable": false,
1113 "default": 0,
1114 "type": {1115 "type": {
1115 "kind": "HttpTypeNumber"1116 "kind": "HttpTypeNumber"
1116 },1117 },
1117 "oasRef": "#/components/schemas/CompletionUsage/properties/prompt_tokens_details/properties/cached_tokens",1118 "default": 0,
1118 "deprecated": false,1119 "optional": true,
1120 "nullable": false,
1119 "schemaType": "integer",1121 "schemaType": "integer",
1120 "children": []1122 "children": []
1121 },1123 },
1122 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call > (property) arguments": {1124 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call > (property) arguments": {
1123 "kind": "HttpDeclProperty",1125 "kind": "HttpDeclProperty",
1124 "docstring": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.",1126 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call/properties/arguments",
1127 "deprecated": false,
1125 "key": "arguments",1128 "key": "arguments",
1126 "optional": true,1129 "docstring": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.",
1127 "nullable": false,
1128 "type": {1130 "type": {
1129 "kind": "HttpTypeString"1131 "kind": "HttpTypeString"
1130 },1132 },
1131 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call/properties/arguments",1133 "optional": true,
1132 "deprecated": false,1134 "nullable": false,
1133 "schemaType": "string",1135 "schemaType": "string",
1134 "children": []1136 "children": []
1135 },1137 },
1136 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call > (property) name": {1138 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) function_call > (property) name": {
1137 "kind": "HttpDeclProperty",1139 "kind": "HttpDeclProperty",
1138 "docstring": "The name of the function to call.",1140 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call/properties/name",
1141 "deprecated": false,
1139 "key": "name",1142 "key": "name",
1140 "optional": true,1143 "docstring": "The name of the function to call.",
1141 "nullable": false,
1142 "type": {1144 "type": {
1143 "kind": "HttpTypeString"1145 "kind": "HttpTypeString"
1144 },1146 },
1145 "oasRef": "#/components/schemas/ChatCompletionStreamResponseDelta/properties/function_call/properties/name",1147 "optional": true,
1146 "deprecated": false,1148 "nullable": false,
1147 "schemaType": "string",1149 "schemaType": "string",
1148 "children": []1150 "children": []
1149 },1151 },
1184 },1186 },
1185 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) index": {1187 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) index": {
1186 "kind": "HttpDeclProperty",1188 "kind": "HttpDeclProperty",
1189 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/index",
1190 "deprecated": false,
1187 "key": "index",1191 "key": "index",
1188 "optional": false,
1189 "nullable": false,
1190 "type": {1192 "type": {
1191 "kind": "HttpTypeNumber"1193 "kind": "HttpTypeNumber"
1192 },1194 },
1193 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/index",1195 "optional": false,
1194 "deprecated": false,1196 "nullable": false,
1195 "schemaType": "integer",1197 "schemaType": "integer",
1196 "children": []1198 "children": []
1197 },1199 },
1198 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) id": {1200 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) id": {
1199 "kind": "HttpDeclProperty",1201 "kind": "HttpDeclProperty",
1200 "docstring": "The ID of the tool call.",1202 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/id",
1203 "deprecated": false,
1201 "key": "id",1204 "key": "id",
1202 "optional": true,1205 "docstring": "The ID of the tool call.",
1203 "nullable": false,
1204 "type": {1206 "type": {
1205 "kind": "HttpTypeString"1207 "kind": "HttpTypeString"
1206 },1208 },
1207 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/id",1209 "optional": true,
1208 "deprecated": false,1210 "nullable": false,
1209 "schemaType": "string",1211 "schemaType": "string",
1210 "children": []1212 "children": []
1211 },1213 },
1212 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function": {1214 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function": {
1213 "kind": "HttpDeclProperty",1215 "kind": "HttpDeclProperty",
1216 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function",
1217 "deprecated": false,
1214 "key": "function",1218 "key": "function",
1215 "optional": true,
1216 "nullable": false,
1217 "type": {1219 "type": {
1218 "kind": "HttpTypeObject",1220 "kind": "HttpTypeObject",
1219 "members": [1221 "members": [
1225 }1227 }
1226 ]1228 ]
1227 },1229 },
1228 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function",1230 "optional": true,
1229 "deprecated": false,1231 "nullable": false,
1230 "schemaType": "object",1232 "schemaType": "object",
1231 "childrenParentSchema": "object",1233 "childrenParentSchema": "object",
1232 "children": [1234 "children": [
1236 },1238 },
1237 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) type": {1239 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) type": {
1238 "kind": "HttpDeclProperty",1240 "kind": "HttpDeclProperty",
1239 "docstring": "The type of the tool. Currently, only `function` is supported.",1241 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/type",
1242 "deprecated": false,
1240 "key": "type",1243 "key": "type",
1241 "optional": true,1244 "docstring": "The type of the tool. Currently, only `function` is supported.",
1242 "nullable": false,
1243 "type": {1245 "type": {
1244 "kind": "HttpTypeUnion",1246 "kind": "HttpTypeUnion",
1247 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/type",
1245 "types": [1248 "types": [
1246 {1249 {
1247 "kind": "HttpTypeLiteral",1250 "kind": "HttpTypeLiteral",
1248 "literal": "function"1251 "literal": "function"
1249 }1252 }
1250 ],1253 ]
1251 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/type"
1252 },1254 },
1253 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/type",1255 "optional": true,
1254 "deprecated": false,1256 "nullable": false,
1255 "schemaType": "enum",1257 "schemaType": "enum",
1256 "childrenParentSchema": "enum",1258 "childrenParentSchema": "enum",
1257 "children": [1259 "children": [
1260 },1262 },
1261 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) token": {1263 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) token": {
1262 "kind": "HttpDeclProperty",1264 "kind": "HttpDeclProperty",
1263 "docstring": "The token.",1265 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/token",
1266 "deprecated": false,
1264 "key": "token",1267 "key": "token",
1265 "optional": false,1268 "docstring": "The token.",
1266 "nullable": false,
1267 "type": {1269 "type": {
1268 "kind": "HttpTypeString"1270 "kind": "HttpTypeString"
1269 },1271 },
1270 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/token",1272 "optional": false,
1271 "deprecated": false,1273 "nullable": false,
1272 "schemaType": "string",1274 "schemaType": "string",
1273 "children": []1275 "children": []
1274 },1276 },
1275 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) bytes": {1277 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) bytes": {
1276 "kind": "HttpDeclProperty",1278 "kind": "HttpDeclProperty",
1277 "docstring": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.",1279 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/bytes",
1280 "deprecated": false,
1278 "key": "bytes",1281 "key": "bytes",
1279 "optional": false,1282 "docstring": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.",
1280 "nullable": true,
1281 "type": {1283 "type": {
1282 "kind": "HttpTypeArray",1284 "kind": "HttpTypeArray",
1285 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/bytes",
1283 "elementType": {1286 "elementType": {
1284 "kind": "HttpTypeNumber"1287 "kind": "HttpTypeNumber"
1288 }
1285 },1289 },
1286 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/bytes"1290 "optional": false,
1287 },1291 "nullable": true,
1288 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/bytes",
1289 "deprecated": false,
1290 "schemaType": "array",1292 "schemaType": "array",
1291 "children": []1293 "children": []
1292 },1294 },
1293 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) logprob": {1295 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) logprob": {
1294 "kind": "HttpDeclProperty",1296 "kind": "HttpDeclProperty",
1295 "docstring": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.",1297 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/logprob",
1298 "deprecated": false,
1296 "key": "logprob",1299 "key": "logprob",
1297 "optional": false,1300 "docstring": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.",
1298 "nullable": false,
1299 "type": {1301 "type": {
1300 "kind": "HttpTypeNumber"1302 "kind": "HttpTypeNumber"
1301 },1303 },
1302 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/logprob",1304 "optional": false,
1303 "deprecated": false,1305 "nullable": false,
1304 "schemaType": "number",1306 "schemaType": "number",
1305 "children": []1307 "children": []
1306 },1308 },
1307 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs": {1309 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs": {
1308 "kind": "HttpDeclProperty",1310 "kind": "HttpDeclProperty",
1309 "docstring": "List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.",1311 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs",
1312 "deprecated": false,
1310 "key": "top_logprobs",1313 "key": "top_logprobs",
1311 "optional": false,1314 "docstring": "List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`.",
1312 "nullable": false,
1313 "type": {1315 "type": {
1314 "kind": "HttpTypeArray",1316 "kind": "HttpTypeArray",
1317 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs",
1315 "elementType": {1318 "elementType": {
1316 "kind": "HttpTypeObject",1319 "kind": "HttpTypeObject",
1317 "members": [1320 "members": [
1325 "ident": "logprob"1328 "ident": "logprob"
1326 }1329 }
1327 ]1330 ]
1331 }
1328 },1332 },
1329 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs"1333 "optional": false,
1330 },1334 "nullable": false,
1331 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs",
1332 "deprecated": false,
1333 "schemaType": "array",1335 "schemaType": "array",
1334 "childrenParentSchema": "object",1336 "childrenParentSchema": "object",
1335 "children": [1337 "children": [
1369 },1371 },
1370 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) model": {1372 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) model": {
1371 "kind": "HttpDeclProperty",1373 "kind": "HttpDeclProperty",
1372 "docstring": "The moderation model used to generate the results.",1374 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/model",
1375 "deprecated": false,
1373 "key": "model",1376 "key": "model",
1374 "optional": false,1377 "docstring": "The moderation model used to generate the results.",
1375 "nullable": false,
1376 "type": {1378 "type": {
1377 "kind": "HttpTypeString"1379 "kind": "HttpTypeString"
1378 },1380 },
1379 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/model",1381 "optional": false,
1380 "deprecated": false,1382 "nullable": false,
1381 "schemaType": "string",1383 "schemaType": "string",
1382 "children": []1384 "children": []
1383 },1385 },
1384 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results": {1386 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results": {
1385 "kind": "HttpDeclProperty",1387 "kind": "HttpDeclProperty",
1386 "docstring": "A list of moderation results.",1388 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1389 "deprecated": false,
1387 "key": "results",1390 "key": "results",
1388 "optional": false,1391 "docstring": "A list of moderation results.",
1389 "nullable": false,
1390 "type": {1392 "type": {
1391 "kind": "HttpTypeArray",1393 "kind": "HttpTypeArray",
1394 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1392 "elementType": {1395 "elementType": {
1393 "kind": "HttpTypeObject",1396 "kind": "HttpTypeObject",
1394 "members": [1397 "members": [
1411 "ident": "type"1414 "ident": "type"
1412 }1415 }
1413 ]1416 ]
1417 }
1414 },1418 },
1415 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results"1419 "optional": false,
1416 },1420 "nullable": false,
1417 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1418 "deprecated": false,
1419 "schemaType": "array",1421 "schemaType": "array",
1420 "childrenParentSchema": "object",1422 "childrenParentSchema": "object",
1421 "children": [1423 "children": [
1429 },1431 },
1430 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) type": {1432 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) type": {
1431 "kind": "HttpDeclProperty",1433 "kind": "HttpDeclProperty",
1432 "docstring": "The object type, which is always `moderation_results`.",1434 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",
1435 "deprecated": false,
1433 "key": "type",1436 "key": "type",
1434 "optional": false,1437 "docstring": "The object type, which is always `moderation_results`.",
1435 "nullable": false,
1436 "type": {1438 "type": {
1437 "kind": "HttpTypeUnion",1439 "kind": "HttpTypeUnion",
1440 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",
1438 "types": [1441 "types": [
1439 {1442 {
1440 "kind": "HttpTypeLiteral",1443 "kind": "HttpTypeLiteral",
1441 "literal": "moderation_results"1444 "literal": "moderation_results"
1442 }1445 }
1443 ],1446 ]
1444 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type"
1445 },1447 },
1446 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",1448 "optional": false,
1447 "deprecated": false,1449 "nullable": false,
1448 "schemaType": "enum",1450 "schemaType": "enum",
1449 "childrenParentSchema": "enum",1451 "childrenParentSchema": "enum",
1450 "children": [1452 "children": [
1453 },1455 },
1454 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) code": {1456 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) code": {
1455 "kind": "HttpDeclProperty",1457 "kind": "HttpDeclProperty",
1456 "docstring": "The error code.",1458 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/code",
1459 "deprecated": false,
1457 "key": "code",1460 "key": "code",
1458 "optional": false,1461 "docstring": "The error code.",
1459 "nullable": false,
1460 "type": {1462 "type": {
1461 "kind": "HttpTypeString"1463 "kind": "HttpTypeString"
1462 },1464 },
1463 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/code",1465 "optional": false,
1464 "deprecated": false,1466 "nullable": false,
1465 "schemaType": "string",1467 "schemaType": "string",
1466 "children": []1468 "children": []
1467 },1469 },
1468 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) message": {1470 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) message": {
1469 "kind": "HttpDeclProperty",1471 "kind": "HttpDeclProperty",
1470 "docstring": "The error message.",1472 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/message",
1473 "deprecated": false,
1471 "key": "message",1474 "key": "message",
1472 "optional": false,1475 "docstring": "The error message.",
1473 "nullable": false,
1474 "type": {1476 "type": {
1475 "kind": "HttpTypeString"1477 "kind": "HttpTypeString"
1476 },1478 },
1477 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/message",1479 "optional": false,
1478 "deprecated": false,1480 "nullable": false,
1479 "schemaType": "string",1481 "schemaType": "string",
1480 "children": []1482 "children": []
1481 },1483 },
1482 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) type": {1484 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 1 > (property) type": {
1483 "kind": "HttpDeclProperty",1485 "kind": "HttpDeclProperty",
1484 "docstring": "The object type, which is always `error`.",1486 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",
1487 "deprecated": false,
1485 "key": "type",1488 "key": "type",
1486 "optional": false,1489 "docstring": "The object type, which is always `error`.",
1487 "nullable": false,
1488 "type": {1490 "type": {
1489 "kind": "HttpTypeUnion",1491 "kind": "HttpTypeUnion",
1492 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",
1490 "types": [1493 "types": [
1491 {1494 {
1492 "kind": "HttpTypeLiteral",1495 "kind": "HttpTypeLiteral",
1493 "literal": "error"1496 "literal": "error"
1494 }1497 }
1495 ],1498 ]
1496 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type"
1497 },1499 },
1498 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",1500 "optional": false,
1499 "deprecated": false,1501 "nullable": false,
1500 "schemaType": "enum",1502 "schemaType": "enum",
1501 "childrenParentSchema": "enum",1503 "childrenParentSchema": "enum",
1502 "children": [1504 "children": [
1505 },1507 },
1506 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) model": {1508 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) model": {
1507 "kind": "HttpDeclProperty",1509 "kind": "HttpDeclProperty",
1508 "docstring": "The moderation model used to generate the results.",1510 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/model",
1511 "deprecated": false,
1509 "key": "model",1512 "key": "model",
1510 "optional": false,1513 "docstring": "The moderation model used to generate the results.",
1511 "nullable": false,
1512 "type": {1514 "type": {
1513 "kind": "HttpTypeString"1515 "kind": "HttpTypeString"
1514 },1516 },
1515 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/model",1517 "optional": false,
1516 "deprecated": false,1518 "nullable": false,
1517 "schemaType": "string",1519 "schemaType": "string",
1518 "children": []1520 "children": []
1519 },1521 },
1520 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results": {1522 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results": {
1521 "kind": "HttpDeclProperty",1523 "kind": "HttpDeclProperty",
1522 "docstring": "A list of moderation results.",1524 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1525 "deprecated": false,
1523 "key": "results",1526 "key": "results",
1524 "optional": false,1527 "docstring": "A list of moderation results.",
1525 "nullable": false,
1526 "type": {1528 "type": {
1527 "kind": "HttpTypeArray",1529 "kind": "HttpTypeArray",
1530 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1528 "elementType": {1531 "elementType": {
1529 "kind": "HttpTypeObject",1532 "kind": "HttpTypeObject",
1530 "members": [1533 "members": [
1547 "ident": "type"1550 "ident": "type"
1548 }1551 }
1549 ]1552 ]
1553 }
1550 },1554 },
1551 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results"1555 "optional": false,
1552 },1556 "nullable": false,
1553 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/results",
1554 "deprecated": false,
1555 "schemaType": "array",1557 "schemaType": "array",
1556 "childrenParentSchema": "object",1558 "childrenParentSchema": "object",
1557 "children": [1559 "children": [
1565 },1567 },
1566 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) type": {1568 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) type": {
1567 "kind": "HttpDeclProperty",1569 "kind": "HttpDeclProperty",
1568 "docstring": "The object type, which is always `moderation_results`.",1570 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",
1571 "deprecated": false,
1569 "key": "type",1572 "key": "type",
1570 "optional": false,1573 "docstring": "The object type, which is always `moderation_results`.",
1571 "nullable": false,
1572 "type": {1574 "type": {
1573 "kind": "HttpTypeUnion",1575 "kind": "HttpTypeUnion",
1576 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",
1574 "types": [1577 "types": [
1575 {1578 {
1576 "kind": "HttpTypeLiteral",1579 "kind": "HttpTypeLiteral",
1577 "literal": "moderation_results"1580 "literal": "moderation_results"
1578 }1581 }
1579 ],1582 ]
1580 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type"
1581 },1583 },
1582 "oasRef": "#/components/schemas/ChatCompletionModerationResults/properties/type",1584 "optional": false,
1583 "deprecated": false,1585 "nullable": false,
1584 "schemaType": "enum",1586 "schemaType": "enum",
1585 "childrenParentSchema": "enum",1587 "childrenParentSchema": "enum",
1586 "children": [1588 "children": [
1589 },1591 },
1590 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) code": {1592 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) code": {
1591 "kind": "HttpDeclProperty",1593 "kind": "HttpDeclProperty",
1592 "docstring": "The error code.",1594 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/code",
1595 "deprecated": false,
1593 "key": "code",1596 "key": "code",
1594 "optional": false,1597 "docstring": "The error code.",
1595 "nullable": false,
1596 "type": {1598 "type": {
1597 "kind": "HttpTypeString"1599 "kind": "HttpTypeString"
1598 },1600 },
1599 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/code",1601 "optional": false,
1600 "deprecated": false,1602 "nullable": false,
1601 "schemaType": "string",1603 "schemaType": "string",
1602 "children": []1604 "children": []
1603 },1605 },
1604 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) message": {1606 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) message": {
1605 "kind": "HttpDeclProperty",1607 "kind": "HttpDeclProperty",
1606 "docstring": "The error message.",1608 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/message",
1609 "deprecated": false,
1607 "key": "message",1610 "key": "message",
1608 "optional": false,1611 "docstring": "The error message.",
1609 "nullable": false,
1610 "type": {1612 "type": {
1611 "kind": "HttpTypeString"1613 "kind": "HttpTypeString"
1612 },1614 },
1613 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/message",1615 "optional": false,
1614 "deprecated": false,1616 "nullable": false,
1615 "schemaType": "string",1617 "schemaType": "string",
1616 "children": []1618 "children": []
1617 },1619 },
1618 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) type": {1620 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 1 > (property) type": {
1619 "kind": "HttpDeclProperty",1621 "kind": "HttpDeclProperty",
1620 "docstring": "The object type, which is always `error`.",1622 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",
1623 "deprecated": false,
1621 "key": "type",1624 "key": "type",
1622 "optional": false,1625 "docstring": "The object type, which is always `error`.",
1623 "nullable": false,
1624 "type": {1626 "type": {
1625 "kind": "HttpTypeUnion",1627 "kind": "HttpTypeUnion",
1628 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",
1626 "types": [1629 "types": [
1627 {1630 {
1628 "kind": "HttpTypeLiteral",1631 "kind": "HttpTypeLiteral",
1629 "literal": "error"1632 "literal": "error"
1630 }1633 }
1631 ],1634 ]
1632 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type"
1633 },1635 },
1634 "oasRef": "#/components/schemas/ChatCompletionModerationError/properties/type",1636 "optional": false,
1635 "deprecated": false,1637 "nullable": false,
1636 "schemaType": "enum",1638 "schemaType": "enum",
1637 "childrenParentSchema": "enum",1639 "childrenParentSchema": "enum",
1638 "children": [1640 "children": [
1641 },1643 },
1642 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function > (property) arguments": {1644 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function > (property) arguments": {
1643 "kind": "HttpDeclProperty",1645 "kind": "HttpDeclProperty",
1644 "docstring": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.",1646 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function/properties/arguments",
1647 "deprecated": false,
1645 "key": "arguments",1648 "key": "arguments",
1646 "optional": true,1649 "docstring": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.",
1647 "nullable": false,
1648 "type": {1650 "type": {
1649 "kind": "HttpTypeString"1651 "kind": "HttpTypeString"
1650 },1652 },
1651 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function/properties/arguments",1653 "optional": true,
1652 "deprecated": false,1654 "nullable": false,
1653 "schemaType": "string",1655 "schemaType": "string",
1654 "children": []1656 "children": []
1655 },1657 },
1656 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function > (property) name": {1658 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) choices > (items) > (property) delta > (property) tool_calls > (items) > (property) function > (property) name": {
1657 "kind": "HttpDeclProperty",1659 "kind": "HttpDeclProperty",
1658 "docstring": "The name of the function to call.",1660 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function/properties/name",
1661 "deprecated": false,
1659 "key": "name",1662 "key": "name",
1660 "optional": true,1663 "docstring": "The name of the function to call.",
1661 "nullable": false,
1662 "type": {1664 "type": {
1663 "kind": "HttpTypeString"1665 "kind": "HttpTypeString"
1664 },1666 },
1665 "oasRef": "#/components/schemas/ChatCompletionMessageToolCallChunk/properties/function/properties/name",1667 "optional": true,
1666 "deprecated": false,1668 "nullable": false,
1667 "schemaType": "string",1669 "schemaType": "string",
1668 "children": []1670 "children": []
1669 },1671 },
1676 },1678 },
1677 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) token": {1679 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) token": {
1678 "kind": "HttpDeclProperty",1680 "kind": "HttpDeclProperty",
1679 "docstring": "The token.",1681 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/token",
1682 "deprecated": false,
1680 "key": "token",1683 "key": "token",
1681 "optional": false,1684 "docstring": "The token.",
1682 "nullable": false,
1683 "type": {1685 "type": {
1684 "kind": "HttpTypeString"1686 "kind": "HttpTypeString"
1685 },1687 },
1686 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/token",1688 "optional": false,
1687 "deprecated": false,1689 "nullable": false,
1688 "schemaType": "string",1690 "schemaType": "string",
1689 "children": []1691 "children": []
1690 },1692 },
1691 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) bytes": {1693 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) bytes": {
1692 "kind": "HttpDeclProperty",1694 "kind": "HttpDeclProperty",
1693 "docstring": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.",1695 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/bytes",
1696 "deprecated": false,
1694 "key": "bytes",1697 "key": "bytes",
1695 "optional": false,1698 "docstring": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.",
1696 "nullable": true,
1697 "type": {1699 "type": {
1698 "kind": "HttpTypeArray",1700 "kind": "HttpTypeArray",
1701 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/bytes",
1699 "elementType": {1702 "elementType": {
1700 "kind": "HttpTypeNumber"1703 "kind": "HttpTypeNumber"
1704 }
1701 },1705 },
1702 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/bytes"1706 "optional": false,
1703 },1707 "nullable": true,
1704 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/bytes",
1705 "deprecated": false,
1706 "schemaType": "array",1708 "schemaType": "array",
1707 "children": []1709 "children": []
1708 },1710 },
1709 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) logprob": {1711 "(resource) chat.completions > (model) chat_completion_token_logprob > (schema) > (property) top_logprobs > (items) > (property) logprob": {
1710 "kind": "HttpDeclProperty",1712 "kind": "HttpDeclProperty",
1711 "docstring": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.",1713 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/logprob",
1714 "deprecated": false,
1712 "key": "logprob",1715 "key": "logprob",
1713 "optional": false,1716 "docstring": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.",
1714 "nullable": false,
1715 "type": {1717 "type": {
1716 "kind": "HttpTypeNumber"1718 "kind": "HttpTypeNumber"
1717 },1719 },
1718 "oasRef": "#/components/schemas/ChatCompletionTokenLogprob/properties/top_logprobs/items/properties/logprob",1720 "optional": false,
1719 "deprecated": false,1721 "nullable": false,
1720 "schemaType": "number",1722 "schemaType": "number",
1721 "children": []1723 "children": []
1722 },1724 },
1723 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) categories": {1725 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) categories": {
1724 "kind": "HttpDeclProperty",1726 "kind": "HttpDeclProperty",
1725 "docstring": "A dictionary of moderation categories to booleans, True if the input is flagged under this category.",1727 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",
1728 "deprecated": false,
1726 "key": "categories",1729 "key": "categories",
1727 "optional": false,1730 "docstring": "A dictionary of moderation categories to booleans, True if the input is flagged under this category.",
1728 "nullable": false,
1729 "type": {1731 "type": {
1730 "kind": "HttpTypeReference",1732 "kind": "HttpTypeReference",
1733 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",
1731 "ident": "Record",1734 "ident": "Record",
1732 "typeParameters": [1735 "typeParameters": [
1733 {1736 {
1736 {1739 {
1737 "kind": "HttpTypeBoolean"1740 "kind": "HttpTypeBoolean"
1738 }1741 }
1739 ],1742 ]
1740 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories"
1741 },1743 },
1742 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",1744 "optional": false,
1743 "deprecated": false,1745 "nullable": false,
1744 "schemaType": "map",1746 "schemaType": "map",
1745 "children": []1747 "children": []
1746 },1748 },
1747 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) category_applied_input_types": {1749 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) category_applied_input_types": {
1748 "kind": "HttpDeclProperty",1750 "kind": "HttpDeclProperty",
1749 "docstring": "Which modalities of input are reflected by the score for each category.",1751 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",
1752 "deprecated": false,
1750 "key": "category_applied_input_types",1753 "key": "category_applied_input_types",
1751 "optional": false,1754 "docstring": "Which modalities of input are reflected by the score for each category.",
1752 "nullable": false,
1753 "type": {1755 "type": {
1754 "kind": "HttpTypeReference",1756 "kind": "HttpTypeReference",
1757 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",
1755 "ident": "Record",1758 "ident": "Record",
1756 "typeParameters": [1759 "typeParameters": [
1757 {1760 {
1759 },1762 },
1760 {1763 {
1761 "kind": "HttpTypeArray",1764 "kind": "HttpTypeArray",
1765 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties",
1762 "elementType": {1766 "elementType": {
1763 "kind": "HttpTypeUnion",1767 "kind": "HttpTypeUnion",
1768 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties/items",
1764 "types": [1769 "types": [
1765 {1770 {
1766 "kind": "HttpTypeLiteral",1771 "kind": "HttpTypeLiteral",
1770 "kind": "HttpTypeLiteral",1775 "kind": "HttpTypeLiteral",
1771 "literal": "image"1776 "literal": "image"
1772 }1777 }
1773 ],1778 ]
1774 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties/items"1779 }
1775 },
1776 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties"
1777 }1780 }
1778 ],1781 ]
1779 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types"
1780 },1782 },
1781 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",1783 "optional": false,
1782 "deprecated": false,1784 "nullable": false,
1783 "schemaType": "map",1785 "schemaType": "map",
1784 "childrenParentSchema": "enum",1786 "childrenParentSchema": "enum",
1785 "children": [1787 "children": [
1789 },1791 },
1790 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) category_scores": {1792 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) category_scores": {
1791 "kind": "HttpDeclProperty",1793 "kind": "HttpDeclProperty",
1792 "docstring": "A dictionary of moderation categories to scores.",1794 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",
1795 "deprecated": false,
1793 "key": "category_scores",1796 "key": "category_scores",
1794 "optional": false,1797 "docstring": "A dictionary of moderation categories to scores.",
1795 "nullable": false,
1796 "type": {1798 "type": {
1797 "kind": "HttpTypeReference",1799 "kind": "HttpTypeReference",
1800 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",
1798 "ident": "Record",1801 "ident": "Record",
1799 "typeParameters": [1802 "typeParameters": [
1800 {1803 {
1803 {1806 {
1804 "kind": "HttpTypeNumber"1807 "kind": "HttpTypeNumber"
1805 }1808 }
1806 ],1809 ]
1807 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores"
1808 },1810 },
1809 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",1811 "optional": false,
1810 "deprecated": false,1812 "nullable": false,
1811 "schemaType": "map",1813 "schemaType": "map",
1812 "children": []1814 "children": []
1813 },1815 },
1814 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) flagged": {1816 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) flagged": {
1815 "kind": "HttpDeclProperty",1817 "kind": "HttpDeclProperty",
1816 "docstring": "A boolean indicating whether the content was flagged by any category.",1818 "oasRef": "#/components/schemas/ModerationResultBody/properties/flagged",
1819 "deprecated": false,
1817 "key": "flagged",1820 "key": "flagged",
1818 "optional": false,1821 "docstring": "A boolean indicating whether the content was flagged by any category.",
1819 "nullable": false,
1820 "type": {1822 "type": {
1821 "kind": "HttpTypeBoolean"1823 "kind": "HttpTypeBoolean"
1822 },1824 },
1823 "oasRef": "#/components/schemas/ModerationResultBody/properties/flagged",1825 "optional": false,
1824 "deprecated": false,1826 "nullable": false,
1825 "schemaType": "boolean",1827 "schemaType": "boolean",
1826 "children": []1828 "children": []
1827 },1829 },
1828 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) model": {1830 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) model": {
1829 "kind": "HttpDeclProperty",1831 "kind": "HttpDeclProperty",
1830 "docstring": "The moderation model that produced this result.",1832 "oasRef": "#/components/schemas/ModerationResultBody/properties/model",
1833 "deprecated": false,
1831 "key": "model",1834 "key": "model",
1832 "optional": false,1835 "docstring": "The moderation model that produced this result.",
1833 "nullable": false,
1834 "type": {1836 "type": {
1835 "kind": "HttpTypeString"1837 "kind": "HttpTypeString"
1836 },1838 },
1837 "oasRef": "#/components/schemas/ModerationResultBody/properties/model",1839 "optional": false,
1838 "deprecated": false,1840 "nullable": false,
1839 "schemaType": "string",1841 "schemaType": "string",
1840 "children": []1842 "children": []
1841 },1843 },
1842 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) type": {1844 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) input > (variant) 0 > (property) results > (items) > (property) type": {
1843 "kind": "HttpDeclProperty",1845 "kind": "HttpDeclProperty",
1844 "docstring": "The object type, which was always `moderation_result` for successful moderation results.",1846 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",
1847 "deprecated": false,
1845 "key": "type",1848 "key": "type",
1846 "optional": false,1849 "docstring": "The object type, which was always `moderation_result` for successful moderation results.",
1847 "nullable": false,
1848 "default": "moderation_result",
1849 "type": {1850 "type": {
1850 "kind": "HttpTypeUnion",1851 "kind": "HttpTypeUnion",
1852 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",
1851 "types": [1853 "types": [
1852 {1854 {
1853 "kind": "HttpTypeLiteral",1855 "kind": "HttpTypeLiteral",
1854 "literal": "moderation_result"1856 "literal": "moderation_result"
1855 }1857 }
1856 ],1858 ]
1857 "oasRef": "#/components/schemas/ModerationResultBody/properties/type"
1858 },1859 },
1859 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",1860 "default": "moderation_result",
1860 "deprecated": false,1861 "optional": false,
1862 "nullable": false,
1861 "schemaType": "enum",1863 "schemaType": "enum",
1862 "childrenParentSchema": "enum",1864 "childrenParentSchema": "enum",
1863 "children": [1865 "children": [
1880 },1882 },
1881 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) categories": {1883 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) categories": {
1882 "kind": "HttpDeclProperty",1884 "kind": "HttpDeclProperty",
1883 "docstring": "A dictionary of moderation categories to booleans, True if the input is flagged under this category.",1885 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",
1886 "deprecated": false,
1884 "key": "categories",1887 "key": "categories",
1885 "optional": false,1888 "docstring": "A dictionary of moderation categories to booleans, True if the input is flagged under this category.",
1886 "nullable": false,
1887 "type": {1889 "type": {
1888 "kind": "HttpTypeReference",1890 "kind": "HttpTypeReference",
1891 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",
1889 "ident": "Record",1892 "ident": "Record",
1890 "typeParameters": [1893 "typeParameters": [
1891 {1894 {
1894 {1897 {
1895 "kind": "HttpTypeBoolean"1898 "kind": "HttpTypeBoolean"
1896 }1899 }
1897 ],1900 ]
1898 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories"
1899 },1901 },
1900 "oasRef": "#/components/schemas/ModerationResultBody/properties/categories",1902 "optional": false,
1901 "deprecated": false,1903 "nullable": false,
1902 "schemaType": "map",1904 "schemaType": "map",
1903 "children": []1905 "children": []
1904 },1906 },
1905 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) category_applied_input_types": {1907 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) category_applied_input_types": {
1906 "kind": "HttpDeclProperty",1908 "kind": "HttpDeclProperty",
1907 "docstring": "Which modalities of input are reflected by the score for each category.",1909 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",
1910 "deprecated": false,
1908 "key": "category_applied_input_types",1911 "key": "category_applied_input_types",
1909 "optional": false,1912 "docstring": "Which modalities of input are reflected by the score for each category.",
1910 "nullable": false,
1911 "type": {1913 "type": {
1912 "kind": "HttpTypeReference",1914 "kind": "HttpTypeReference",
1915 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",
1913 "ident": "Record",1916 "ident": "Record",
1914 "typeParameters": [1917 "typeParameters": [
1915 {1918 {
1917 },1920 },
1918 {1921 {
1919 "kind": "HttpTypeArray",1922 "kind": "HttpTypeArray",
1923 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties",
1920 "elementType": {1924 "elementType": {
1921 "kind": "HttpTypeUnion",1925 "kind": "HttpTypeUnion",
1926 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties/items",
1922 "types": [1927 "types": [
1923 {1928 {
1924 "kind": "HttpTypeLiteral",1929 "kind": "HttpTypeLiteral",
1928 "kind": "HttpTypeLiteral",1933 "kind": "HttpTypeLiteral",
1929 "literal": "image"1934 "literal": "image"
1930 }1935 }
1931 ],1936 ]
1932 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties/items"
1933 },
1934 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types/additionalProperties"
1935 }1937 }
1936 ],1938 }
1937 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types"1939 ]
1938 },1940 },
1939 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_applied_input_types",1941 "optional": false,
1940 "deprecated": false,1942 "nullable": false,
1941 "schemaType": "map",1943 "schemaType": "map",
1942 "childrenParentSchema": "enum",1944 "childrenParentSchema": "enum",
1943 "children": [1945 "children": [
1947 },1949 },
1948 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) category_scores": {1950 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) category_scores": {
1949 "kind": "HttpDeclProperty",1951 "kind": "HttpDeclProperty",
1950 "docstring": "A dictionary of moderation categories to scores.",1952 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",
1953 "deprecated": false,
1951 "key": "category_scores",1954 "key": "category_scores",
1952 "optional": false,1955 "docstring": "A dictionary of moderation categories to scores.",
1953 "nullable": false,
1954 "type": {1956 "type": {
1955 "kind": "HttpTypeReference",1957 "kind": "HttpTypeReference",
1958 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",
1956 "ident": "Record",1959 "ident": "Record",
1957 "typeParameters": [1960 "typeParameters": [
1958 {1961 {
1961 {1964 {
1962 "kind": "HttpTypeNumber"1965 "kind": "HttpTypeNumber"
1963 }1966 }
1964 ],1967 ]
1965 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores"
1966 },1968 },
1967 "oasRef": "#/components/schemas/ModerationResultBody/properties/category_scores",1969 "optional": false,
1968 "deprecated": false,1970 "nullable": false,
1969 "schemaType": "map",1971 "schemaType": "map",
1970 "children": []1972 "children": []
1971 },1973 },
1972 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) flagged": {1974 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) flagged": {
1973 "kind": "HttpDeclProperty",1975 "kind": "HttpDeclProperty",
1974 "docstring": "A boolean indicating whether the content was flagged by any category.",1976 "oasRef": "#/components/schemas/ModerationResultBody/properties/flagged",
1977 "deprecated": false,
1975 "key": "flagged",1978 "key": "flagged",
1976 "optional": false,1979 "docstring": "A boolean indicating whether the content was flagged by any category.",
1977 "nullable": false,
1978 "type": {1980 "type": {
1979 "kind": "HttpTypeBoolean"1981 "kind": "HttpTypeBoolean"
1980 },1982 },
1981 "oasRef": "#/components/schemas/ModerationResultBody/properties/flagged",1983 "optional": false,
1982 "deprecated": false,1984 "nullable": false,
1983 "schemaType": "boolean",1985 "schemaType": "boolean",
1984 "children": []1986 "children": []
1985 },1987 },
1986 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) model": {1988 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) model": {
1987 "kind": "HttpDeclProperty",1989 "kind": "HttpDeclProperty",
1988 "docstring": "The moderation model that produced this result.",1990 "oasRef": "#/components/schemas/ModerationResultBody/properties/model",
1991 "deprecated": false,
1989 "key": "model",1992 "key": "model",
1990 "optional": false,1993 "docstring": "The moderation model that produced this result.",
1991 "nullable": false,
1992 "type": {1994 "type": {
1993 "kind": "HttpTypeString"1995 "kind": "HttpTypeString"
1994 },1996 },
1995 "oasRef": "#/components/schemas/ModerationResultBody/properties/model",1997 "optional": false,
1996 "deprecated": false,1998 "nullable": false,
1997 "schemaType": "string",1999 "schemaType": "string",
1998 "children": []2000 "children": []
1999 },2001 },
2000 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) type": {2002 "(resource) chat.completions > (model) chat_completion_chunk > (schema) > (property) moderation > (property) output > (variant) 0 > (property) results > (items) > (property) type": {
2001 "kind": "HttpDeclProperty",2003 "kind": "HttpDeclProperty",
2002 "docstring": "The object type, which was always `moderation_result` for successful moderation results.",2004 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",
2005 "deprecated": false,
2003 "key": "type",2006 "key": "type",
2004 "optional": false,2007 "docstring": "The object type, which was always `moderation_result` for successful moderation results.",
2005 "nullable": false,
2006 "default": "moderation_result",
2007 "type": {2008 "type": {
2008 "kind": "HttpTypeUnion",2009 "kind": "HttpTypeUnion",
2010 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",
2009 "types": [2011 "types": [
2010 {2012 {
2011 "kind": "HttpTypeLiteral",2013 "kind": "HttpTypeLiteral",
2012 "literal": "moderation_result"2014 "literal": "moderation_result"
2013 }2015 }
2014 ],2016 ]
2015 "oasRef": "#/components/schemas/ModerationResultBody/properties/type"
2016 },2017 },
2017 "oasRef": "#/components/schemas/ModerationResultBody/properties/type",2018 "default": "moderation_result",
2018 "deprecated": false,2019 "optional": false,
2020 "nullable": false,
2019 "schemaType": "enum",2021 "schemaType": "enum",
2020 "childrenParentSchema": "enum",2022 "childrenParentSchema": "enum",
2021 "children": [2023 "children": [