diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 085e6cbc1..4a35347ae 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 7f5b669b-5cfb-49a0-a069-b34e47bd12e9 -openapi_spec_hash: 0ac5ea4ab2546a188a36a0d370367637 -openapi_transformed_spec_hash: 6be6c39576ec27111cab26c251d2ab65 -config_hash: d92ec885ac2a08b6a4c1ff90420f0327 -codegen_sha: 23ba3d180f14bc59feb714e1ab25d5d341f5c213 -codegen_hash: 1e48d0bf25ef090cada933936c2c23c5843d9fc1504a36983ab2970b4a51971d -public_codegen_sha: 0e6ccf8a94ca9c81a24ae4309a74e49d91639708 +generation_id: 343c25e0-559d-4268-b40d-eb35fc7f8a2a +openapi_spec_hash: cc8bc0e9cda20d98cbcab338ff08b50c +openapi_transformed_spec_hash: 2f1cea3510c46bd2b681baf83d8724c5 +config_hash: d7b82262337a543ff59106e4a32ead4e +codegen_sha: 6799e2136ecd93934219fe9881be618dbfdd9dd4 +codegen_hash: 3504e760c08cb4da862788b5cfacf2640f6b54ee67df10fc084873006e706594 +public_codegen_sha: 6a0bbe3b03ee4bc30789c39fe36a80fcac312007 diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 1cc46fbb4..072676533 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -2817,21 +2817,21 @@ paths: "system_fingerprint": null } description: | - **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses) + **Starting a new project?** We recommend trying [Responses](https://developers.openai.com/api/reference/resources/responses) to take advantage of the latest OpenAI platform features. Compare - [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the - [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision), - and [audio](https://platform.openai.com/docs/guides/audio) guides. + [text generation](https://developers.openai.com/api/docs/guides/text), [vision](https://developers.openai.com/api/docs/guides/images-vision), + and [audio](https://developers.openai.com/api/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, - [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). Returns a chat completion object, or a streamed sequence of chat completion chunk objects if the request is streamed. @@ -3752,7 +3752,7 @@ paths: $ref: '#/components/schemas/IncludeEnum' description: | Additional fields to include in the response. See the `include` - parameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. + parameter for [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. requestBody: required: true content: @@ -4057,7 +4057,7 @@ paths: $ref: '#/components/schemas/IncludeEnum' description: | Additional fields to include in the response. See the `include` - parameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. + parameter for [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) for more information. responses: '200': description: OK @@ -4620,7 +4620,7 @@ paths: description: | Create the structure of an evaluation that can be used to test a model's performance. An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. - For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + For more information, see the [Evals guide](https://developers.openai.com/api/docs/guides/evals). /evals/{eval_id}: get: operationId: getEval @@ -6210,18 +6210,18 @@ paths: user. - The Assistants API supports files up to 2 million tokens and of specific - file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for + file types. See the [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for details. - The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning - [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or - [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models. + [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or + [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models. - The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required - [format](https://platform.openai.com/docs/api-reference/batch/request-input). + [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). - For Retrieval or `file_search` ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use - [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) instead of attaching them one by one. Vector store attachment has separate limits from file upload, including 2,000 attached files per minute per organization. @@ -6746,7 +6746,7 @@ paths: "has_more": false } description: | - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. post: @@ -6801,7 +6801,7 @@ paths: "has_more": false } description: | - **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** Calling this endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). This enables organization owners to share fine-tuned models with other projects in their organization. /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}: @@ -6849,7 +6849,7 @@ paths: "deleted": true } description: | - **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + **NOTE:** This endpoint requires an [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. /fine_tuning/jobs: @@ -7256,7 +7256,7 @@ paths: Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) get: operationId: listPaginatedFineTuningJobs tags: @@ -7432,7 +7432,7 @@ paths: description: | Get info about a fine-tuning job. - [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) /fine_tuning/jobs/{fine_tuning_job_id}/cancel: post: operationId: cancelFineTuningJob @@ -8105,7 +8105,7 @@ paths: event: image_generation.completed data: {"type":"image_generation.completed","b64_json":"...","usage":{"total_tokens":100,"input_tokens":50,"output_tokens":50,"input_tokens_details":{"text_tokens":10,"image_tokens":40}}} description: | - Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + Creates an image given a prompt. [Learn more](https://developers.openai.com/api/docs/guides/images-vision). /images/variations: post: operationId: createImageVariation @@ -8635,7 +8635,7 @@ paths: } description: | Classifies if text and/or image inputs are potentially harmful. Learn - more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + more in the [moderation guide](https://developers.openai.com/api/docs/guides/moderation). /organization/admin_api_keys: get: security: @@ -8910,7 +8910,7 @@ paths: type: string - name: event_types[] in: query - description: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + description: Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). required: false schema: type: array @@ -16103,7 +16103,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: true @@ -16149,10 +16149,10 @@ paths: type: string description: |- The identifier for the call. For SIP calls, use the value provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. For WebRTC sessions, reuse the call ID returned in the `Location` header when creating the call with - [`POST /v1/realtime/calls`](https://platform.openai.com/docs/api-reference/realtime/create-call). + [`POST /v1/realtime/calls`](https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create). responses: '200': description: Call hangup initiated successfully. @@ -16182,7 +16182,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: true @@ -16220,7 +16220,7 @@ paths: type: string description: |- The identifier for the call provided in the - [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) webhook. requestBody: required: false @@ -16341,7 +16341,7 @@ paths: applied to any sessions created using that client secret, but these can also be overridden by the client connection. - [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. /realtime/sessions: @@ -17727,12 +17727,12 @@ paths: "metadata": {} } description: | - Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) - or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call - your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in - [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data + Creates a model response. Provide [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to generate [text](https://developers.openai.com/api/docs/guides/text) + or [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) outputs. Have the model call + your own [custom code](https://developers.openai.com/api/docs/guides/function-calling) or use built-in + [tools](https://developers.openai.com/api/docs/guides/tools) like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search) to use your own data as input for the model's response. /responses/{response_id}: get: @@ -17764,7 +17764,7 @@ paths: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. - in: query name: starting_after @@ -18027,7 +18027,10 @@ paths: "user": null, "metadata": {} } - description: "Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled. \n[Learn more](https://platform.openai.com/docs/guides/background).\n" + description: | + Cancels a model response with the given ID. Only responses created with + the `background` parameter set to `true` can be cancelled. + [Learn more](https://developers.openai.com/api/docs/guides/background). /responses/{response_id}/input_items: get: operationId: listInputItems @@ -18844,7 +18847,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong to. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) the messages belong to. - name: limit in: query description: | @@ -18982,7 +18985,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message for. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to create a message for. requestBody: required: true content: @@ -19072,7 +19075,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to which this message belongs. - in: path name: message_id required: true @@ -19523,7 +19526,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -19872,7 +19875,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. - in: path name: run_id required: true @@ -19975,7 +19978,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. - in: path name: run_id required: true @@ -20248,7 +20251,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -20364,7 +20367,7 @@ paths: description: | A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. schema: type: array items: @@ -20455,7 +20458,7 @@ paths: required: true schema: type: string - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to which this run belongs. - in: path name: run_id required: true @@ -20748,7 +20751,26 @@ paths: "status": "pending", "expires_at": 1719127296 } - description: "Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object\nthat you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.\nCurrently, an Upload can accept at most 8 GB in total and expires after an\nhour after you create it.\n\nOnce you complete the Upload, we will create a\n[File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts\nyou uploaded. This File is usable in the rest of our platform as a regular\nFile object.\n\nFor certain `purpose` values, the correct `mime_type` must be specified. \nPlease refer to documentation for the \n[supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).\n\nFor guidance on the proper filename extensions for each purpose, please\nfollow the documentation on [creating a\nFile](https://platform.openai.com/docs/api-reference/files/create).\n\nReturns the Upload object with status `pending`.\n" + description: | + Creates an intermediate [Upload](https://developers.openai.com/api/reference/resources/uploads) object + that you can add [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) to. + Currently, an Upload can accept at most 8 GB in total and expires after an + hour after you create it. + + Once you complete the Upload, we will create a + [File](https://developers.openai.com/api/reference/resources/files) object that contains all the parts + you uploaded. This File is usable in the rest of our platform as a regular + File object. + + For certain `purpose` values, the correct `mime_type` must be specified. + Please refer to documentation for the + [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). + + For guidance on the proper filename extensions for each purpose, please + follow the documentation on [creating a + File](https://developers.openai.com/api/reference/resources/files/methods/create). + + Returns the Upload object with status `pending`. /uploads/{upload_id}/cancel: post: operationId: cancelUpload @@ -20851,7 +20873,15 @@ paths: "purpose": "fine-tune", } } - description: "Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.\nReturns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.\n" + description: | + Completes the [Upload](https://developers.openai.com/api/reference/resources/uploads). + + Within the returned Upload object, there is a nested [File](https://developers.openai.com/api/reference/resources/files) object that is ready to use in the rest of the platform. + + You can specify the order of the Parts by passing in an ordered list of the Part IDs. + + The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. /uploads/{upload_id}/parts: post: operationId: addUploadPart @@ -20895,7 +20925,12 @@ paths: "created_at": 1719185911, "upload_id": "upload_abc123" } - description: "Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).\n" + description: | + Adds a [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) to an [Upload](https://developers.openai.com/api/reference/resources/uploads) object. A Part represents a chunk of bytes from the file you are trying to upload. + + Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. + + It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). /vector_stores: get: operationId: listVectorStores @@ -21797,7 +21832,7 @@ paths: tags: - Vector stores summary: Create vector store file - description: Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + description: Create a vector store file by attaching a [File](https://developers.openai.com/api/reference/resources/files) to a [vector store](https://developers.openai.com/api/reference/resources/vector_stores). parameters: - in: path name: vector_store_id @@ -22009,7 +22044,7 @@ paths: object: "vector_store.file.deleted", deleted: true } - description: Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://platform.openai.com/docs/api-reference/files/delete) endpoint. + description: Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) endpoint. post: operationId: updateVectorStoreFileAttributes tags: @@ -22860,7 +22895,7 @@ paths: name: Create content provenance check group: content_provenance_checks description: |- - Check whether an image or audio file contains known OpenAI provenance signals. [Learn more about content provenance](/api/docs/guides/content-provenance). + Check whether an image or audio file contains known OpenAI provenance signals. [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). If `not_detected`, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the metadata was stripped or has evidence of tampering, the watermark was degraded, it comes from a legacy generation model, or it was created before provenance signals were available. Content could also still be AI-generated by another company's model, which the tool currently does not detect. /videos: @@ -23882,7 +23917,7 @@ paths: description: |- Compact a conversation. Returns a compacted response object. - Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + Learn when and how to compact long-running conversations in the [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). /skills: post: tags: @@ -26192,12 +26227,12 @@ paths: enum: - responses_multi_agent=v1 description: | - Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or - [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) - or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call - your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in - [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data + Creates a model response. Provide [text](https://developers.openai.com/api/docs/guides/text) or + [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to generate [text](https://developers.openai.com/api/docs/guides/text) + or [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) outputs. Have the model call + your own [custom code](https://developers.openai.com/api/docs/guides/function-calling) or use built-in + [tools](https://developers.openai.com/api/docs/guides/tools) like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search) to use your own data as input for the model's response. /responses/{response_id}?beta=true: get: @@ -26229,7 +26264,7 @@ paths: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. - in: query name: starting_after @@ -26531,7 +26566,10 @@ paths: "user": null, "metadata": {} } - description: "Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled. \n[Learn more](https://platform.openai.com/docs/guides/background).\n" + description: | + Cancels a model response with the given ID. Only responses created with + the `background` parameter set to `true` can be cancelled. + [Learn more](https://developers.openai.com/api/docs/guides/background). /responses/compact?beta=true: post: summary: Compact a response @@ -26702,7 +26740,7 @@ paths: description: |- Compact a conversation. Returns a compacted response object. - Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + Learn when and how to compact long-running conversations in the [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). /responses/{response_id}/input_items?beta=true: get: operationId: beta_listInputItems @@ -27414,7 +27452,7 @@ components: - type: 'null' model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. type: string instructions: anyOf: @@ -27443,7 +27481,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -27454,7 +27492,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -27538,7 +27576,7 @@ components: `thread.message.completed` event. We may add additional events over time, so we recommend handling unknown events gracefully - in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to + in your code. See the [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn how to integrate the Assistants API with streaming. x-oaiMeta: name: Assistant stream events @@ -27630,7 +27668,7 @@ components: description: | The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive. - Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. ranking_options: $ref: '#/components/schemas/FileSearchRankingOptions' required: @@ -27664,9 +27702,9 @@ components: - function AssistantsApiResponseFormatOption: description: | - Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + Specifies the format that the model must output. Compatible with [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. - Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON. @@ -27773,7 +27811,7 @@ components: description: | An optional text to guide the model's style or continue a previous audio segment. - For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + For `whisper-1`, the [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. delay: @@ -28883,7 +28921,7 @@ components: Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model - guide](https://platform.openai.com/docs/models) to browse and compare available models. + guide](https://developers.openai.com/api/docs/models) to browse and compare available models. errors: type: object properties: @@ -28974,7 +29012,7 @@ components: type: integer description: | The number of tokens that were retrieved from the cache. [More on - prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). required: - cached_tokens output_tokens: @@ -29543,7 +29581,7 @@ components: `["text"]` - The `gpt-4o-audio-preview` model can also be used to [generate audio](https://platform.openai.com/docs/guides/audio). To + The `gpt-4o-audio-preview` model can also be used to [generate audio](https://developers.openai.com/api/docs/guides/audio). To request that this model generate both text and audio responses, you can use: @@ -29701,7 +29739,7 @@ components: - type: object description: | Data about a previous audio response from the model. - [Learn more](https://platform.openai.com/docs/guides/audio). + [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - id properties: @@ -29810,7 +29848,7 @@ components: type: object title: Audio content part description: | - Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). properties: type: type: string @@ -29846,7 +29884,7 @@ components: type: object title: File content part description: | - Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation. properties: type: type: string @@ -29859,10 +29897,14 @@ components: properties: filename: type: string - description: "The name of the file, used when passing the file to the model as a \nstring.\n" + description: | + The name of the file, used when passing the file to the model as a + string. file_data: type: string - description: "The base64 encoded file data, used when passing the file to the model \nas a string.\n" + description: | + The base64 encoded file data, used when passing the file to the model + as a string. file_id: type: string description: | @@ -29884,7 +29926,7 @@ components: type: object title: Image content part description: | - Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). properties: type: type: string @@ -29901,7 +29943,7 @@ components: format: uri detail: type: string - description: Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + description: Specifies the detail level of the image. Learn more in the [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). enum: - auto - low @@ -29937,7 +29979,7 @@ components: type: object title: Text content part description: | - Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). properties: type: type: string @@ -30044,7 +30086,7 @@ components: description: The text contents of the message. title: Text content - type: array - description: An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs. + description: An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs. title: Array of content parts items: $ref: '#/components/schemas/ChatCompletionRequestUserMessageContentPart' @@ -30092,7 +30134,7 @@ components: type: array description: | Annotations for the message, when applicable, as when using the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). items: type: object description: | @@ -30154,7 +30196,7 @@ components: - type: object description: | If the audio output modality is requested, this object contains data - about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). + about the audio response from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - id - expires_at @@ -30706,7 +30748,7 @@ components: title: Computer tool call description: | A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. properties: type: type: string @@ -31010,7 +31052,7 @@ components: $ref: '#/components/schemas/OutputContent' ConversationItem: title: Conversation item - description: A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output). + description: A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output). discriminator: propertyName: type anyOf: @@ -31161,7 +31203,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. example: gpt-5 anyOf: - type: string @@ -31210,7 +31252,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -31221,14 +31263,14 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string vector_stores: type: array description: | - A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. + A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: object @@ -31236,7 +31278,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. maxItems: 100000000 items: type: string @@ -31340,9 +31382,9 @@ components: description: | The ID of an uploaded file that contains requests for the new batch. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. + See [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. - Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + Your input file must be formatted as a [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. endpoint: type: string enum: @@ -31372,9 +31414,9 @@ components: messages: description: | A list of messages comprising the conversation so far. Depending on the - [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are - supported, like [text](https://platform.openai.com/docs/guides/text-generation), - [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). + [model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are + supported, like [text](https://developers.openai.com/api/docs/guides/text), + [images](https://developers.openai.com/api/docs/guides/images-vision), and [audio](https://developers.openai.com/api/docs/guides/audio). type: array minItems: 1 items: @@ -31383,7 +31425,7 @@ components: description: | Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/ModelIdsShared' service_tier: @@ -31396,7 +31438,7 @@ components: $ref: '#/components/schemas/ReasoningEffort' max_completion_tokens: description: | - An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer nullable: true frequency_penalty: @@ -31424,7 +31466,7 @@ components: title: Web search description: | This tool searches the web for relevant results to use in a response. - Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: user_location: type: object @@ -31464,7 +31506,7 @@ components: Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` @@ -31480,7 +31522,7 @@ components: nullable: true description: | Parameters for audio output. Required when audio output is requested with - `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + `modalities: ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). required: - voice - format @@ -31510,8 +31552,8 @@ components: nullable: true description: | Whether or not to store the output of this chat completion request for - use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or - [evals](https://platform.openai.com/docs/guides/evals) products. + use in our [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) or + [evals](https://developers.openai.com/api/docs/guides/evals) products. Supports text and image inputs. Note: image inputs over 8MB will be dropped. moderation: @@ -31524,8 +31566,8 @@ components: description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming) - for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events) + for more information, along with the [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses) guide for more information on how to handle the streaming events. type: boolean nullable: true @@ -31558,12 +31600,12 @@ components: nullable: true max_tokens: description: | - The maximum number of [tokens](/tokenizer) that can be generated in the + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is - not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning). + not compatible with [o-series models](https://developers.openai.com/api/docs/guides/reasoning). type: integer nullable: true deprecated: true @@ -31578,7 +31620,7 @@ components: prediction: nullable: true description: | - Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs), + Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs), which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content. @@ -31604,8 +31646,8 @@ components: type: array description: | A list of tools the model may call. You can provide either - [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or - [function tools](https://platform.openai.com/docs/guides/function-calling). + [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) or + [function tools](https://developers.openai.com/api/docs/guides/function-calling). items: anyOf: - $ref: '#/components/schemas/ChatCompletionTool' @@ -31804,7 +31846,10 @@ components: } CreateChatCompletionStreamResponse: type: object - description: "Represents a streamed chunk of a chat completion response returned\nby the model, based on the provided input. \n[Learn more](https://platform.openai.com/docs/guides/streaming-responses).\n" + description: | + Represents a streamed chunk of a chat completion response returned + by the model, based on the provided input. + [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). properties: id: type: string @@ -31928,7 +31973,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. anyOf: - type: string - type: string @@ -31994,7 +32039,7 @@ components: description: | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) logit_bias: type: object x-oaiTypeLabel: map @@ -32005,7 +32050,7 @@ components: description: | Modify the likelihood of specified tokens appearing in the completion. - Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. logprobs: @@ -32025,7 +32070,7 @@ components: example: 16 nullable: true description: | - The maximum number of [tokens](/tokenizer) that can be generated in the completion. + The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. n: @@ -32048,7 +32093,7 @@ components: description: | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. - [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) seed: type: integer format: int64 @@ -32102,7 +32147,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - model - prompt @@ -32281,7 +32326,7 @@ components: properties: input: description: | - Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. + Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. example: The quick brown fox jumped over the lazy dog anyOf: - type: string @@ -32317,7 +32362,7 @@ components: type: integer model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. example: text-embedding-3-small anyOf: - type: string @@ -32345,7 +32390,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - model - input @@ -32460,7 +32505,7 @@ components: Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). Setting to `{ "type": "json_object" }` enables the older JSON mode, which ensures the message the model generates is valid JSON. Using `json_schema` @@ -32818,12 +32863,12 @@ components: The two categories of tools you can provide the model are: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). + [function calling](https://developers.openai.com/api/docs/guides/function-calling). items: $ref: '#/components/schemas/Tool' text: @@ -32831,8 +32876,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/TextResponseFormatConfiguration' @@ -32960,7 +33005,7 @@ components: model: description: | The name of the model to fine-tune. You can select one of the - [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). example: gpt-4o-mini anyOf: - type: string @@ -32976,13 +33021,13 @@ components: description: | The ID of an uploaded file that contains training data. - See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file. + See [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`. - The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format. + The contents of the file should differ depending on if the model uses the [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) format, or if the fine-tuning method uses the [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) format. - See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. + See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. type: string example: file-abc123 hyperparameters: @@ -33054,7 +33099,7 @@ components: Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. - See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details. + See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for more details. type: string nullable: true example: file-abc123 @@ -33287,7 +33332,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). input_fidelity: anyOf: - $ref: '#/components/schemas/InputFidelity' @@ -33300,7 +33345,7 @@ components: nullable: true description: | Edit the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. partial_images: $ref: '#/components/schemas/PartialImages' quality: @@ -33414,7 +33459,7 @@ components: nullable: true description: | Generate the image in streaming mode. Defaults to `false`. See the - [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information. + [Image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for more information. This parameter is only supported for the GPT image models. partial_images: $ref: '#/components/schemas/PartialImages' @@ -33475,7 +33520,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - prompt CreateImageVariationRequest: @@ -33528,7 +33573,7 @@ components: type: string example: user-1234 description: | - A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). required: - image CreateMessageRequest: @@ -33553,7 +33598,7 @@ components: description: The text contents of the message. title: Text content - type: array - description: An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + description: An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). title: Array of content parts items: anyOf: @@ -33636,8 +33681,8 @@ components: model: description: | The content moderation model you would like to use. Learn more in - [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about - available models [here](https://platform.openai.com/docs/models#moderation). + [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), and learn about + available models [here](https://developers.openai.com/api/docs/guides/moderation). nullable: false x-oaiTypeLabel: string anyOf: @@ -34069,7 +34114,7 @@ components: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. - If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](/api/docs/guides/your-data#v1responses). + If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). default: true - type: 'null' instructions: @@ -34093,7 +34138,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. type: boolean default: false @@ -34116,7 +34161,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer minimum: 16 - type: 'null' @@ -34125,10 +34170,10 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -34137,7 +34182,7 @@ components: reasoning_effort: $ref: '#/components/schemas/ReasoningEffort' instructions: - description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. + description: Overrides the [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true additional_instructions: @@ -34217,7 +34262,7 @@ components: properties: model: description: | - One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. anyOf: - type: string - type: string @@ -34237,7 +34282,7 @@ components: description: Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. maxLength: 4096 voice: - description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).' + description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).' $ref: '#/components/schemas/VoiceIdsOrCustomVoice' response_format: description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. @@ -34303,12 +34348,12 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string thread: $ref: '#/components/schemas/CreateThreadRequest' model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -34375,7 +34420,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -34386,7 +34431,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -34453,7 +34498,7 @@ components: additionalProperties: false properties: messages: - description: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. + description: A list of [messages](https://developers.openai.com/api/docs/assistants/migration) to start the thread with. type: array items: $ref: '#/components/schemas/CreateMessageRequest' @@ -34469,7 +34514,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -34480,14 +34525,14 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string vector_stores: type: array description: | - A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. + A helper to create a [vector store](https://developers.openai.com/api/reference/resources/vector_stores) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: object @@ -34495,7 +34540,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. maxItems: 100000000 items: type: string @@ -34608,7 +34653,7 @@ components: type: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. type: string response_format: $ref: '#/components/schemas/AudioResponseFormat' @@ -34644,7 +34689,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions) + See the [Streaming section of the Speech-to-Text guide](https://developers.openai.com/api/docs/guides/speech-to-text?lang=curl#streaming) for more information. Note: Streaming is not supported for the `whisper-1` model and will be ignored. @@ -34893,7 +34938,7 @@ components: x-oaiTypeLabel: string prompt: description: | - An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in English. type: string response_format: description: | @@ -34956,7 +35001,7 @@ components: The intended purpose of the uploaded file. See the [documentation on File - purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). type: string enum: - assistants @@ -34987,7 +35032,7 @@ components: additionalProperties: false properties: file_ids: - description: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`. + description: A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with `files`. type: array minItems: 1 maxItems: 2000 @@ -35009,7 +35054,7 @@ components: additionalProperties: false properties: file_id: - description: A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) to minimize per-vector-store write requests. + description: A [File](https://developers.openai.com/api/reference/resources/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. For multi-file ingestion, we recommend [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) to minimize per-vector-store write requests. type: string chunking_strategy: $ref: '#/components/schemas/ChunkingStrategyRequestParam' @@ -35022,7 +35067,7 @@ components: additionalProperties: false properties: file_ids: - description: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + description: A list of [File](https://developers.openai.com/api/reference/resources/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. type: array maxItems: 500 items: @@ -35693,7 +35738,7 @@ components: embedding: type: array description: | - The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). + The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). items: type: number format: float @@ -35755,9 +35800,9 @@ components: required: - event - data - description: Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. + description: Occurs when an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. x-oaiMeta: - dataDescription: '`data` is an [error](/docs/guides/error-codes#api-errors)' + dataDescription: '`data` is an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors)' ErrorResponse: type: object properties: @@ -37232,7 +37277,7 @@ components: description: | The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0. - See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + See the [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) for more information. properties: ranker: $ref: '#/components/schemas/FileSearchRanker' @@ -37248,7 +37293,7 @@ components: title: File search tool call description: | The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. properties: id: type: string @@ -37738,7 +37783,7 @@ components: description: The organization that owns the fine-tuning job. result_files: type: array - description: The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). items: type: string example: file-abc123 @@ -37759,11 +37804,11 @@ components: - type: 'null' training_file: type: string - description: The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The file ID used for training. You can retrieve the training data with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). validation_file: anyOf: - type: string - description: The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + description: The file ID used for validation. You can retrieve the validation results with the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). - type: 'null' integrations: anyOf: @@ -37995,18 +38040,23 @@ components: anyOf: - type: boolean default: false - description: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling). + description: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). - type: 'null' required: - name FunctionParameters: type: object - description: "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list." + description: |- + The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://developers.openai.com/api/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. + + Omitting `parameters` defines a function with an empty parameter list. additionalProperties: true FunctionToolCall: type: object title: Function tool call - description: "A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n" + description: | + A tool call to run a function. See the + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. properties: id: type: string @@ -39730,11 +39780,11 @@ components: Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) anyOf: - type: string title: Text input @@ -40729,7 +40779,7 @@ components: title: MCP tool description: | Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). properties: type: type: string @@ -40761,7 +40811,7 @@ components: description: | Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: @@ -40939,7 +40989,7 @@ components: MessageContentImageFileObject: title: Image file type: object - description: References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + description: References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. properties: type: description: Always `image_file`. @@ -40951,7 +41001,7 @@ components: type: object properties: file_id: - description: The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + description: The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. type: string detail: type: string @@ -41111,7 +41161,7 @@ components: MessageDeltaContentImageFileObject: title: Image file type: object - description: References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + description: References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. properties: index: type: integer @@ -41126,7 +41176,7 @@ components: type: object properties: file_id: - description: The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + description: The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. type: string detail: type: string @@ -41338,7 +41388,7 @@ components: MessageObject: type: object title: The message object - description: Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + description: Represents a message within a [thread](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -41354,7 +41404,7 @@ components: type: integer format: unixtime thread_id: - description: The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. + description: The [thread](https://developers.openai.com/api/docs/assistants/migration) ID that this message belongs to. type: string status: description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. @@ -41405,12 +41455,12 @@ components: $ref: '#/components/schemas/MessageContent' assistant_id: anyOf: - - description: If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. + - description: If applicable, the ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored this message. type: string - type: 'null' run_id: anyOf: - - description: The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. + - description: The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. type: string - type: 'null' attachments: @@ -41512,9 +41562,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41527,9 +41577,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41542,9 +41592,9 @@ components: required: - event - data - description: Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + description: Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed. x-oaiMeta: - dataDescription: '`data` is a [message delta](/docs/api-reference/assistants-streaming/message-delta-object)' + dataDescription: '`data` is a [message delta](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41557,9 +41607,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -41572,9 +41622,9 @@ components: required: - event - data - description: Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + description: Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed. x-oaiMeta: - dataDescription: '`data` is a [message](/docs/api-reference/messages/object)' + dataDescription: '`data` is a [message](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event Metadata: @@ -41641,7 +41691,7 @@ components: - $ref: '#/components/schemas/ModelIdsResponses' - type: string - type: 'null' - description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. ModelIdsResponses: example: gpt-6-astra anyOf: @@ -41722,7 +41772,7 @@ components: description: | This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: anyOf: - type: string @@ -41730,14 +41780,14 @@ components: example: safety-identifier-1234 description: | A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). - type: 'null' prompt_cache_key: anyOf: - type: string example: prompt-cache-key-1234 description: | - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). - type: 'null' prompt_cache_retention: deprecated: true @@ -41749,7 +41799,7 @@ components: description: | Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -41765,7 +41815,7 @@ components: properties: model: description: | - ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. anyOf: - type: string - $ref: '#/components/schemas/AssistantSupportedModels' @@ -41812,7 +41862,7 @@ components: file_ids: type: array description: | - Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + Overrides the list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -41823,7 +41873,7 @@ components: vector_store_ids: type: array description: | - Overrides the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + Overrides the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -41890,7 +41940,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -41901,7 +41951,7 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string @@ -42403,7 +42453,7 @@ components: - $ref: '#/components/schemas/OutputTextContent' - $ref: '#/components/schemas/RefusalContent' ParallelToolCalls: - description: Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + description: Whether to enable [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) during tool use. type: boolean default: true PartialImages: @@ -42451,7 +42501,7 @@ components: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array - description: An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs. + description: An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text inputs. title: Array of content parts items: $ref: '#/components/schemas/ChatCompletionRequestMessageContentPartText' @@ -42533,6 +42583,12 @@ components: type: integer format: unixtime description: The Unix timestamp (in seconds) of when the API key was created + expires_at: + anyOf: + - type: integer + format: unixtime + - type: 'null' + description: The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. last_used_at: anyOf: - type: integer @@ -42578,6 +42634,7 @@ components: "redacted_value": "sk-abc...def", "name": "My API Key", "created_at": 1711471533, + "expires_at": 1714063533, "last_used_at": 1711471534, "id": "key_abc", "owner_project_access": "active", @@ -42694,13 +42751,13 @@ components: - type: 'null' deprecated: true description: |- - Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. Deprecated: use `residency` instead. Do not provide both `geography` and `residency`. residency: anyOf: - $ref: '#/components/schemas/PublicProjectResidency' - type: 'null' - description: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + description: Create the project with the specified residency configuration. Your organization must have access to the requested residency configuration in order to use it. See [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. external_key_id: anyOf: - type: string @@ -43180,6 +43237,12 @@ components: created_at: type: integer format: unixtime + expires_at: + anyOf: + - type: integer + format: unixtime + - type: 'null' + description: The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. id: type: string required: @@ -43199,6 +43262,13 @@ components: - type: boolean description: Create the service account without default roles or an API key. - type: 'null' + expires_in_seconds: + anyOf: + - type: integer + minimum: 1 + maximum: 31536000 + - type: 'null' + description: Number of seconds until the initial API key expires. If omitted or null, the key does not expire unless the effective organization or project policy requires an expiration. When a policy sets a maximum lifetime, this value must be provided and must not exceed that limit. A non-null value cannot be used when `create_service_account_only` is true. required: - name ProjectServiceAccountCreateResponse: @@ -43517,7 +43587,7 @@ components: - type: object description: | Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). required: - id properties: @@ -43894,7 +43964,7 @@ components: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -46219,7 +46289,7 @@ components: - $ref: '#/components/schemas/RealtimeSessionCreateRequestGA' description: |- Optional session configuration to apply before the realtime session is - created. Use the same parameters you would send in a [`create client secret`](https://platform.openai.com/docs/api-reference/realtime-sessions/create-realtime-client-secret) + created. Use the same parameters you would send in a [`create client secret`](https://developers.openai.com/api/reference/resources/realtime/subresources/client_secrets/methods/create) request. additionalProperties: false RealtimeCallReferRequest: @@ -46481,7 +46551,7 @@ components: stop generating audio and emit a `output_audio_buffer.cleared` event. This event should be preceded by a `response.cancel` client event to stop the generation of the current response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -47065,7 +47135,7 @@ components: description: | Create a session and client secret for the Realtime API. The request can specify either a realtime or a transcription session configuration. - [Learn more about the Realtime API](https://platform.openai.com/docs/guides/realtime). + [Learn more about the Realtime API](https://developers.openai.com/api/docs/guides/realtime). properties: expires_after: type: object @@ -48621,7 +48691,7 @@ components: mode when the user has interrupted (`input_audio_buffer.speech_started`), or when the client has emitted the `output_audio_buffer.clear` event to manually cut off the current audio response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -48652,7 +48722,7 @@ components: **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is emitted after an audio content part has been added (`response.content_part.added`) to the response. - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -48683,7 +48753,7 @@ components: **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server, and no more audio is forthcoming. This event is emitted after the full response data has been sent to the client (`response.done`). - [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). properties: event_id: type: string @@ -50018,7 +50088,7 @@ components: - allOf: - $ref: '#/components/schemas/AudioTranscription' description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. - type: 'null' turn_detection: $ref: '#/components/schemas/RealtimeTurnDetection' @@ -50418,7 +50488,7 @@ components: description: The format of the input audio. transcription: description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. $ref: '#/components/schemas/AudioTranscription' noise_reduction: type: object @@ -51070,7 +51140,7 @@ components: $ref: '#/components/schemas/RealtimeAudioFormats' transcription: description: | - Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. $ref: '#/components/schemas/AudioTranscription' noise_reduction: type: object @@ -52128,7 +52198,7 @@ components: type: object description: | Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). title: Reasoning properties: mode: @@ -52202,7 +52272,7 @@ components: Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. - type: 'null' ReasoningItem: @@ -52211,7 +52281,7 @@ components: A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). title: Reasoning properties: type: @@ -52419,7 +52489,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer - type: 'null' required: @@ -53414,7 +53484,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -53449,7 +53519,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - name @@ -53482,7 +53552,7 @@ components: title: Text grammar description: | A custom grammar for the model to follow when generating text. - Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + Learn more in the [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars). properties: type: type: string @@ -53501,7 +53571,7 @@ components: title: Python grammar description: | Configure the model to generate valid Python code. See the - [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details. + [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars) for more details. properties: type: type: string @@ -54275,7 +54345,7 @@ components: `["text"]` The `gpt-4o-audio-preview` model can also be used to - [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate + [generate audio](https://developers.openai.com/api/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]` @@ -54468,13 +54538,13 @@ components: description: | The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - type: 'null' model: description: | Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/ModelIdsResponses' background: @@ -54482,7 +54552,7 @@ components: - type: boolean description: | Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). default: false - type: 'null' max_tool_calls: @@ -55686,8 +55756,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/TextResponseFormatConfiguration' @@ -55708,7 +55778,9 @@ components: properties: cached_tokens: type: integer - description: "The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n" + description: | + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cache_write_tokens: type: integer description: The number of input tokens that were written to the cache. @@ -56909,10 +56981,16 @@ components: propertyName: type item: type: object - description: "The dataset item provided to the grader. This will be used to populate \nthe `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. \n" + description: | + The dataset item provided to the grader. This will be used to populate + the `item` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details. model_sample: type: string - description: "The model sample to be evaluated. This value will be used to populate \nthe `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.\nThe `output_json` variable will be populated if the model sample is a \nvalid JSON string.\n \n" + description: | + The model sample to be evaluated. This value will be used to populate + the `sample` namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details. + The `output_json` variable will be populated if the model sample is a + valid JSON string. required: - grader - model_sample @@ -57015,7 +57093,7 @@ components: RunObject: type: object title: A run on a thread - description: Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + description: Represents an execution run on a [thread](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -57031,10 +57109,10 @@ components: type: integer format: unixtime thread_id: - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was executed on as a part of this run. type: string assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for execution of this run. type: string status: $ref: '#/components/schemas/RunStatus' @@ -57119,13 +57197,13 @@ components: - max_completion_tokens - max_prompt_tokens model: - description: The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The model that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. type: string instructions: - description: The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The instructions that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. type: string tools: - description: The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + description: The list of tools that the [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this run. default: [] type: array maxItems: 20 @@ -57367,7 +57445,7 @@ components: type: object properties: file_id: - description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + description: The [file](https://developers.openai.com/api/reference/resources/files) ID of the image. type: string required: - index @@ -57445,7 +57523,7 @@ components: output: anyOf: - type: string - description: The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + description: The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. - type: 'null' required: - index @@ -57543,7 +57621,7 @@ components: type: object properties: file_id: - description: The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + description: The [file](https://developers.openai.com/api/reference/resources/files) ID of the image. type: string required: - file_id @@ -57683,7 +57761,7 @@ components: output: anyOf: - type: string - description: The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + description: The output of the function. This will be `null` if the outputs have not been [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. - type: 'null' required: - name @@ -57733,13 +57811,13 @@ components: type: integer format: unixtime assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) associated with the run step. type: string thread_id: - description: The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + description: The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was run. type: string run_id: - description: The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. + description: The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) that this run step is a part of. type: string type: description: The type of run step, which can be either `message_creation` or `tool_calls`. @@ -57871,9 +57949,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57886,9 +57964,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57901,9 +57979,9 @@ components: required: - event - data - description: Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + description: Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed. x-oaiMeta: - dataDescription: '`data` is a [run step delta](/docs/api-reference/assistants-streaming/run-step-delta-object)' + dataDescription: '`data` is a [run step delta](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57916,9 +57994,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57931,9 +58009,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57946,9 +58024,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57961,9 +58039,9 @@ components: required: - event - data - description: Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + description: Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires. x-oaiMeta: - dataDescription: '`data` is a [run step](/docs/api-reference/run-steps/step-object)' + dataDescription: '`data` is a [run step](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event RunStreamEvent: @@ -57980,9 +58058,9 @@ components: required: - event - data - description: Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + description: Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -57995,9 +58073,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58010,9 +58088,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58025,9 +58103,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58040,9 +58118,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58055,9 +58133,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58070,9 +58148,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58085,9 +58163,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58100,9 +58178,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' - type: object properties: event: @@ -58115,9 +58193,9 @@ components: required: - event - data - description: Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + description: Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires. x-oaiMeta: - dataDescription: '`data` is a [run](/docs/api-reference/runs/object)' + dataDescription: '`data` is a [run](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event RunToolCallObject: @@ -58126,7 +58204,7 @@ components: properties: id: type: string - description: The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. + description: The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) endpoint. type: type: string description: The type of tool call the output is required for. For now, this is always `function`. @@ -58157,8 +58235,8 @@ components: Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - When not set, the default behavior is 'auto'. 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. @@ -58178,8 +58256,8 @@ components: Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`. - When not set, the default behavior is 'auto'. @@ -58382,7 +58460,20 @@ components: required: - tool_outputs TextResponseFormatConfiguration: - description: "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n" + description: | + An object specifying the format that the model must output. + + Configuring `{ "type": "json_schema" }` enables Structured Outputs, + which ensures the model will match your supplied JSON schema. Learn more in the + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + + The default format is `{ "type": "text" }` with no additional options. + + **Not recommended for gpt-4o and newer models:** + + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. anyOf: - $ref: '#/components/schemas/ResponseFormatText' - $ref: '#/components/schemas/TextResponseFormatJsonSchema' @@ -58394,7 +58485,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -58423,7 +58514,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - type @@ -58432,7 +58523,7 @@ components: ThreadObject: type: object title: Thread - description: Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). + description: Represents a thread that contains [messages](https://developers.openai.com/api/docs/assistants/migration). properties: id: description: The identifier, which can be referenced in API endpoints. @@ -58459,7 +58550,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -58470,7 +58561,7 @@ components: vector_store_ids: type: array description: | - The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + The [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this thread. There can be a maximum of 1 vector store attached to the thread. maxItems: 1 items: type: string @@ -58510,9 +58601,9 @@ components: required: - event - data - description: Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + description: Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is created. x-oaiMeta: - dataDescription: '`data` is a [thread](/docs/api-reference/threads/object)' + dataDescription: '`data` is a [thread](https://developers.openai.com/api/docs/assistants/migration)' discriminator: propertyName: event ToggleCertificatesRequest: @@ -58695,13 +58786,13 @@ components: title: Hosted tool description: | Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). properties: type: type: string description: | The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: - `file_search` @@ -58730,22 +58821,22 @@ components: We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. items: $ref: '#/components/schemas/Tool' TranscriptTextDeltaEvent: type: object - description: Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + description: Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. properties: type: type: string @@ -58761,7 +58852,7 @@ components: logprobs: type: array description: | - The log probabilities of the delta. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + The log probabilities of the delta. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. items: type: object properties: @@ -58796,7 +58887,7 @@ components: } TranscriptTextDoneEvent: type: object - description: Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + description: Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. properties: type: type: string @@ -58818,7 +58909,7 @@ components: logprobs: type: array description: | - The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `include[]` parameter set to `logprobs`. items: type: object properties: @@ -58862,7 +58953,7 @@ components: TranscriptTextSegmentEvent: type: object description: | - Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`. properties: type: type: string @@ -59224,7 +59315,7 @@ components: description: The intended number of bytes to be uploaded. purpose: type: string - description: The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values. + description: The intended purpose of the file. [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values. status: type: string description: The status of the Upload. @@ -60338,7 +60429,7 @@ components: type: integer format: unixtime vector_store_id: - description: The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + description: The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. type: string status: description: The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. @@ -60454,7 +60545,7 @@ components: type: integer format: unixtime vector_store_id: - description: The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + description: The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to. type: string status: description: The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. @@ -61117,7 +61208,7 @@ components: title: Web search description: | Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: type: type: string @@ -61168,7 +61259,7 @@ components: title: Web search tool call description: | The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. properties: id: type: string @@ -61761,7 +61852,9 @@ components: sip_headers: type: array description: | - Headers from the SIP Invite. + Headers from the SIP INVITE, excluding SIP authorization headers. + Retained names, values, repeated entries, and order are preserved. + Treat these values as untrusted call metadata. items: type: object description: | @@ -61803,9 +61896,9 @@ components: "data": { "session_id": "live_u0_479a275623b54bdb9b6fbae2f7cbd408", "sip_headers": [ - {"name": "Max-Forwards", "value": "63"}, - {"name": "CSeq", "value": "851287 INVITE"}, - {"name": "Content-Type", "value": "application/sdp"}, + {"name": "From", "value": ";tag=abc123"}, + {"name": "To", "value": ""}, + {"name": "Call-ID", "value": "call-123@example.com"} ] } } @@ -61849,7 +61942,9 @@ components: sip_headers: type: array description: | - Headers from the SIP Invite. + Headers from the SIP INVITE, excluding SIP authorization headers. + Retained names, values, repeated entries, and order are preserved. + Treat these values as untrusted call metadata. items: type: object description: | @@ -61893,7 +61988,7 @@ components: "sip_headers": [ {"name": "Max-Forwards", "value": "63"}, {"name": "CSeq", "value": "851287 INVITE"}, - {"name": "Content-Type", "value": "application/sdp"}, + {"name": "Content-Type", "value": "application/sdp"} ] } } @@ -62297,7 +62392,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. PromptCacheBreakpointParam: properties: mode: @@ -62829,7 +62924,7 @@ components: - type - detail title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). ComputerScreenshotContent: properties: type: @@ -63426,7 +63521,7 @@ components: - strict - parameters title: Function - description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). RankerVersionType: type: string enum: @@ -63491,7 +63586,7 @@ components: - type - vector_store_ids title: File search - description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). ComputerTool: properties: type: @@ -63505,7 +63600,7 @@ components: required: - type title: Computer - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). ComputerEnvironment: type: string enum: @@ -63539,7 +63634,7 @@ components: - display_width - display_height title: Computer use preview - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). ContainerMemoryLimit: type: string enum: @@ -63802,7 +63897,7 @@ components: - type - name title: Custom tool - description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) EmptyModelParam: properties: {} type: object @@ -63989,7 +64084,7 @@ components: required: - type title: Web search preview - description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). ApplyPatchToolParam: properties: type: @@ -64162,7 +64257,7 @@ components: - id - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). CodeInterpreterOutputLogs: properties: type: @@ -64782,7 +64877,7 @@ components: required: - type title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) FileDetailEnum: type: string enum: @@ -65127,7 +65222,7 @@ components: - type - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). FunctionShellActionParam: properties: commands: @@ -65766,7 +65861,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. ReasoningModeEnum: anyOf: - type: string @@ -66963,7 +67058,7 @@ components: model: anyOf: - type: string - description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. - type: 'null' input: anyOf: @@ -66981,7 +67076,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' tools: @@ -66998,7 +67093,7 @@ components: reasoning: anyOf: - $ref: '#/components/schemas/Reasoning' - description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).' + description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).' - type: 'null' truncation: $ref: '#/components/schemas/TruncationEnum' @@ -67081,7 +67176,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' instructions: @@ -67111,7 +67206,7 @@ components: anyOf: - $ref: '#/components/schemas/ServiceTierEnum' description: |- - Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. + Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. - type: 'null' type: object @@ -68565,7 +68660,7 @@ components: model: anyOf: - type: string - description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. - type: 'null' input: anyOf: @@ -68583,7 +68678,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' tools: @@ -68600,7 +68695,7 @@ components: reasoning: anyOf: - $ref: '#/components/schemas/BetaReasoning' - description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).' + description: '**gpt-5 and o-series models only** Configuration options for [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).' - type: 'null' truncation: $ref: '#/components/schemas/BetaTruncationEnum' @@ -68753,13 +68848,13 @@ components: title: Hosted tool description: | Indicates that the model should use a built-in tool to generate a response. - [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). properties: type: type: string description: | The type of hosted tool the model should to use. Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + [built-in tools](https://developers.openai.com/api/docs/guides/tools). Allowed values are: - `file_search` @@ -68880,7 +68975,7 @@ components: type: object description: | Configuration options for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). + [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). title: Reasoning properties: mode: @@ -68954,7 +69049,7 @@ components: Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the - [reasoning guide](https://platform.openai.com/docs/guides/reasoning) + [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific support. - type: 'null' BetaReasoningModeEnum: @@ -68969,8 +69064,8 @@ components: description: | Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) properties: format: $ref: '#/components/schemas/BetaTextResponseFormatConfiguration' @@ -68991,7 +69086,20 @@ components: `medium`. - type: 'null' BetaTextResponseFormatConfiguration: - description: "An object specifying the format that the model must output.\n\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs, \nwhich ensures the model will match your supplied JSON schema. Learn more in the \n[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).\n\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n\n**Not recommended for gpt-4o and newer models:**\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n" + description: | + An object specifying the format that the model must output. + + Configuring `{ "type": "json_schema" }` enables Structured Outputs, + which ensures the model will match your supplied JSON schema. Learn more in the + [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + + The default format is `{ "type": "text" }` with no additional options. + + **Not recommended for gpt-4o and newer models:** + + Setting to `{ "type": "json_object" }` enables the older JSON mode, which + ensures the message the model generates is valid JSON. Using `json_schema` + is preferred for models that support it. anyOf: - $ref: '#/components/schemas/BetaResponseFormatText' - $ref: '#/components/schemas/BetaTextResponseFormatJsonSchema' @@ -69020,7 +69128,7 @@ components: title: JSON schema description: | JSON Schema response format. Used to generate structured JSON responses. - Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). properties: type: type: string @@ -69049,7 +69157,7 @@ components: If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs - guide](https://platform.openai.com/docs/guides/structured-outputs). + guide](https://developers.openai.com/api/docs/guides/structured-outputs). - type: 'null' required: - type @@ -69151,7 +69259,7 @@ components: required: - type title: Web search preview - description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). BetaSearchContentType: type: string enum: @@ -69307,7 +69415,7 @@ components: - type - name title: Custom tool - description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + description: A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) BetaCustomGrammarFormatParam: properties: type: @@ -69907,7 +70015,7 @@ components: title: MCP tool description: | Give the model access to additional tools via remote Model Context Protocol - (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). properties: type: type: string @@ -69939,7 +70047,7 @@ components: description: | Identifier for service connectors, like those available in ChatGPT. One of `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more - about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). Currently supported `connector_id` values are: @@ -70055,7 +70163,7 @@ components: title: Web search description: | Search the Internet for sources related to the prompt. Learn more about the - [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). properties: type: type: string @@ -70161,7 +70269,7 @@ components: - display_width - display_height title: Computer use preview - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). BetaComputerEnvironment: type: string enum: @@ -70183,7 +70291,7 @@ components: required: - type title: Computer - description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + description: A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). BetaFileSearchTool: properties: type: @@ -70214,7 +70322,7 @@ components: - type - vector_store_ids title: File search - description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). BetaFilters: anyOf: - $ref: '#/components/schemas/BetaComparisonFilter' @@ -70378,7 +70486,7 @@ components: - strict - parameters title: Function - description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). BetaInputItem: discriminator: propertyName: type @@ -70800,7 +70908,7 @@ components: - type - detail title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). BetaImageDetail: type: string enum: @@ -71840,14 +71948,14 @@ components: - type - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). BetaReasoningItem: type: object description: | A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually - [managing context](https://platform.openai.com/docs/guides/conversation-state). + [managing context](https://developers.openai.com/api/docs/guides/conversation-state). title: Reasoning properties: agent: @@ -72414,7 +72522,7 @@ components: required: - type title: Input image - description: An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + description: An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) BetaPromptCacheBreakpointParam: properties: mode: @@ -72586,7 +72694,9 @@ components: BetaFunctionToolCall: type: object title: Function tool call - description: "A tool call to run a function. See the \n[function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information.\n" + description: | + A tool call to run a function. See the + [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. properties: agent: anyOf: @@ -72647,7 +72757,7 @@ components: title: Web search tool call description: | The results of a web search tool call. See the - [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. properties: agent: anyOf: @@ -72887,7 +72997,7 @@ components: title: Computer tool call description: | A tool call to a computer use tool. See the - [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. properties: agent: anyOf: @@ -73210,7 +73320,7 @@ components: title: File search tool call description: | The results of a file search tool call. See the - [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. properties: agent: anyOf: @@ -73698,7 +73808,7 @@ components: previous_response_id: anyOf: - type: string - description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + description: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. example: resp_123 - type: 'null' instructions: @@ -73728,7 +73838,7 @@ components: anyOf: - $ref: '#/components/schemas/BetaServiceTierEnum' description: |- - Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. + Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. For models with a dedicated Fast tier, either value resolves to `service_tier=fast`; for other models, either value resolves to `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. - type: 'null' type: object @@ -73753,7 +73863,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. BetaPromptCacheModeEnum: type: string enum: @@ -73773,7 +73883,7 @@ components: - $ref: '#/components/schemas/BetaModelIdsResponses' - type: string - type: 'null' - description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + description: Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. BetaModelIdsResponses: example: gpt-6-astra anyOf: @@ -74457,7 +74567,7 @@ components: - id - encrypted_content title: Compaction item - description: A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + description: A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). BetaProgramOutput: properties: agent: @@ -75111,7 +75221,9 @@ components: properties: cached_tokens: type: integer - description: "The number of tokens that were retrieved from the cache. \n[More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).\n" + description: | + The number of tokens that were retrieved from the cache. + [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cache_write_tokens: type: integer description: The number of input tokens that were written to the cache. @@ -75527,7 +75639,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer - type: 'null' required: @@ -75830,8 +75942,8 @@ components: Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model. - - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. - - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. + - If set to '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then the request will be processed with the Flex Processing service tier. + - To opt-in to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the request level, include the `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat Completions. The response will show `service_tier=priority` regardless of if you specify `service_tier=fast` or `priority` in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for `gpt-5.6-sol`; a response served through it will show `service_tier=ultrafast`. - When not set, the default behavior is 'auto'. @@ -75855,13 +75967,13 @@ components: description: | The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about - [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - type: 'null' model: description: | Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance - characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare available models. $ref: '#/components/schemas/BetaModelIdsResponses' background: @@ -75869,7 +75981,7 @@ components: - type: boolean description: | Whether to run the model response in the background. - [Learn more](https://platform.openai.com/docs/guides/background). + [Learn more](https://developers.openai.com/api/docs/guides/background). default: false - type: 'null' max_tool_calls: @@ -75891,7 +76003,7 @@ components: - type: object description: | Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). required: - id properties: @@ -75933,16 +76045,16 @@ components: We support the following categories of tools: - **Built-in tools**: Tools that are provided by OpenAI that extend the - model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search) - or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about - [built-in tools](https://platform.openai.com/docs/guides/tools). + model's capabilities, like [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + or [file search](https://developers.openai.com/api/docs/guides/tools-file-search). Learn more about + [built-in tools](https://developers.openai.com/api/docs/guides/tools). - **MCP Tools**: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint. Learn more about - [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). - **Function calls (custom tools)**: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about - [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use + [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can also use custom tools to call your own code. items: $ref: '#/components/schemas/BetaTool' @@ -75995,7 +76107,7 @@ components: description: | This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. - Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: anyOf: - type: string @@ -76003,14 +76115,14 @@ components: example: safety-identifier-1234 description: | A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. - The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). - type: 'null' prompt_cache_key: anyOf: - type: string example: prompt-cache-key-1234 description: | - Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). - type: 'null' prompt_cache_retention: deprecated: true @@ -76022,7 +76134,7 @@ components: description: | Deprecated. Use `prompt_cache_options.ttl` instead. - The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). This field expresses a maximum retention policy, while `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields are independent and do not interact. @@ -79408,11 +79520,11 @@ components: Text, image, or file inputs to the model, used to generate a response. Learn more: - - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - - [Image inputs](https://platform.openai.com/docs/guides/images) - - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - - [Function calling](https://platform.openai.com/docs/guides/function-calling) + - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) anyOf: - type: string title: Text input @@ -80591,7 +80703,7 @@ components: Whether to store the generated model response for later retrieval via API. Defaults to true when omitted. - If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](/api/docs/guides/your-data#v1responses). + If set to true, response data will be stored for at least 30 days, subject to the [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). default: true - type: 'null' instructions: @@ -80615,7 +80727,7 @@ components: - description: | If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). - See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information. type: boolean default: false @@ -80638,7 +80750,7 @@ components: max_output_tokens: anyOf: - description: | - An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). type: integer minimum: 16 - type: 'null' @@ -80753,7 +80865,7 @@ components: type: object required: [] title: Prompt cache options - description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) for current details. + description: Options for prompt caching. Supported for `gpt-5.6` and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is currently the only supported value. See the [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for current details. BetaCreateModelResponseProperties: allOf: - $ref: '#/components/schemas/BetaModelResponseProperties' @@ -81094,12 +81206,12 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string thread: $ref: '#/components/schemas/CreateThreadRequest' model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -81166,7 +81278,7 @@ components: file_ids: type: array description: | - A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + A list of [file](https://developers.openai.com/api/reference/resources/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. default: [] maxItems: 20 items: @@ -81177,7 +81289,7 @@ components: vector_store_ids: type: array description: | - The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. maxItems: 1 items: type: string @@ -81236,10 +81348,10 @@ components: additionalProperties: false properties: assistant_id: - description: The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + description: The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to execute this run. type: string model: - description: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + description: The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. nullable: true anyOf: - type: string @@ -81248,7 +81360,7 @@ components: reasoning_effort: $ref: '#/components/schemas/ReasoningEffort' instructions: - description: Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. + description: Overrides the [instructions](https://developers.openai.com/api/docs/assistants/migration) of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true additional_instructions: @@ -81489,12 +81601,12 @@ x-oaiMeta: - id: responses-streaming title: Streaming events description: | - When you [create a Response](https://platform.openai.com/docs/api-reference/responses/create) with + When you [create a Response](https://developers.openai.com/api/reference/resources/responses/methods/create) with `stream` set to `true`, the server will emit server-sent events to the client as the Response is generated. This section contains the events that are emitted by the server. - [Learn more about streaming responses](https://platform.openai.com/docs/guides/streaming-responses?api-mode=responses). + [Learn more about streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses). navigationGroup: responses sections: - type: object @@ -81675,7 +81787,7 @@ x-oaiMeta: title: Server events description: | These events use the same payloads over WebSocket and - [HTTP streaming](./streaming-events). + [HTTP streaming](https://developers.openai.com/api/reference/resources/responses/streaming-events). navigationGroup: responses sections: - type: object @@ -81844,7 +81956,7 @@ x-oaiMeta: Webhooks are HTTP requests sent by OpenAI to a URL you specify when certain events happen during the course of API usage. - [Learn more about webhooks](https://platform.openai.com/docs/guides/webhooks). + [Learn more about webhooks](https://developers.openai.com/api/docs/guides/webhooks). navigationGroup: webhooks sections: - type: object @@ -81905,7 +82017,7 @@ x-oaiMeta: title: Image Streaming description: | Stream image generation and editing in real time with server-sent events. - [Learn more about image streaming](https://platform.openai.com/docs/guides/image-generation). + [Learn more about image streaming](https://developers.openai.com/api/docs/guides/image-generation). navigationGroup: endpoints sections: - type: object @@ -82144,7 +82256,7 @@ x-oaiMeta: description: | Stream Chat Completions in real time. Receive chunks of completions returned from the model using server-sent events. - [Learn more](https://platform.openai.com/docs/guides/streaming-responses?api-mode=chat). + [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). navigationGroup: chat sections: - type: object @@ -82155,11 +82267,11 @@ x-oaiMeta: beta: true description: | Stream the result of executing a Run or resuming a Run after submitting tool outputs. - You can stream events from the [Create Thread and Run](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun), - [Create Run](https://platform.openai.com/docs/api-reference/runs/createRun), and [Submit Tool Outputs](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + You can stream events from the [Create Thread and Run](https://developers.openai.com/api/docs/assistants/migration), + [Create Run](https://developers.openai.com/api/docs/assistants/migration), and [Submit Tool Outputs](https://developers.openai.com/api/docs/assistants/migration) endpoints by passing `"stream": true`. The response will be a [Server-Sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) stream. Our Node and Python SDKs provide helpful utilities to make streaming easy. Reference the - [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn more. + [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn more. navigationGroup: assistants sections: - type: object diff --git a/lib/openai/models/admin/organization/admin_api_key.rb b/lib/openai/models/admin/organization/admin_api_key.rb index e52d7ef91..c0ffd4702 100644 --- a/lib/openai/models/admin/organization/admin_api_key.rb +++ b/lib/openai/models/admin/organization/admin_api_key.rb @@ -56,21 +56,28 @@ class AdminAPIKey < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, expires_at:, owner:, redacted_value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key") # Represents an individual Admin API key in an org. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the API key was created + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the API key was created # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) of when the API key expires + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) of when the API key expires # # @param owner [OpenAI::Models::Admin::Organization::AdminAPIKey::Owner] # - # @param redacted_value [String] The redacted value of the API key + # @param redacted_value [String] + # The redacted value of the API key # - # @param last_used_at [Integer, nil] The Unix timestamp (in seconds) of when the API key was last used + # @param last_used_at [Integer, nil] + # The Unix timestamp (in seconds) of when the API key was last used # - # @param name [String, nil] The name of the API key + # @param name [String, nil] + # The name of the API key # - # @param object [Symbol, :"organization.admin_api_key"] The object type, which is always `organization.admin_api_key` + # @param object [Symbol, :"organization.admin_api_key"] + # The object type, which is always `organization.admin_api_key` # @see OpenAI::Models::Admin::Organization::AdminAPIKey#owner class Owner < OpenAI::Internal::Type::BaseModel @@ -111,17 +118,23 @@ class Owner < OpenAI::Internal::Type::BaseModel optional :type, String # @!method initialize(id: nil, created_at: nil, name: nil, object: nil, role: nil, type: nil) - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the user was created + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the user was created # - # @param name [String] The name of the user + # @param name [String] + # The name of the user # - # @param object [String] The object type, which is always organization.user + # @param object [String] + # The object type, which is always organization.user # - # @param role [String] Always `owner` + # @param role [String] + # Always `owner` # - # @param type [String] Always `user` + # @param type [String] + # Always `user` end end end diff --git a/lib/openai/models/admin/organization/admin_api_key_create_params.rb b/lib/openai/models/admin/organization/admin_api_key_create_params.rb index a51e500f7..31afb85ed 100644 --- a/lib/openai/models/admin/organization/admin_api_key_create_params.rb +++ b/lib/openai/models/admin/organization/admin_api_key_create_params.rb @@ -22,12 +22,11 @@ class AdminAPIKeyCreateParams < OpenAI::Internal::Type::BaseModel optional :expires_in_seconds, Integer # @!method initialize(name:, expires_in_seconds: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AdminAPIKeyCreateParams} for more details. - # # @param name [String] # - # @param expires_in_seconds [Integer] The number of seconds until the API key expires. Omit this field for a key that + # @param expires_in_seconds [Integer] + # The number of seconds until the API key expires. Omit this field for a key that + # does not expire. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/admin_api_key_create_response.rb b/lib/openai/models/admin/organization/admin_api_key_create_response.rb index ca57bf9a7..bda97a00f 100644 --- a/lib/openai/models/admin/organization/admin_api_key_create_response.rb +++ b/lib/openai/models/admin/organization/admin_api_key_create_response.rb @@ -15,23 +15,31 @@ class AdminAPIKeyCreateResponse < OpenAI::Models::Admin::Organization::AdminAPIK # @!method initialize(id:, created_at:, expires_at:, owner:, redacted_value:, value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key") # Represents an individual Admin API key in an org. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the API key was created + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the API key was created # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) of when the API key expires + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) of when the API key expires # # @param owner [OpenAI::Models::Admin::Organization::AdminAPIKey::Owner] # - # @param redacted_value [String] The redacted value of the API key + # @param redacted_value [String] + # The redacted value of the API key # - # @param value [String] The value of the API key. Only shown on create. + # @param value [String] + # The value of the API key. Only shown on create. # - # @param last_used_at [Integer, nil] The Unix timestamp (in seconds) of when the API key was last used + # @param last_used_at [Integer, nil] + # The Unix timestamp (in seconds) of when the API key was last used # - # @param name [String, nil] The name of the API key + # @param name [String, nil] + # The name of the API key # - # @param object [Symbol, :"organization.admin_api_key"] The object type, which is always `organization.admin_api_key` + # @param object [Symbol, :"organization.admin_api_key"] + # The object type, which is always `organization.admin_api_key` end end end diff --git a/lib/openai/models/admin/organization/admin_api_key_delete_params.rb b/lib/openai/models/admin/organization/admin_api_key_delete_params.rb index 3bcb881d4..7326e52c3 100644 --- a/lib/openai/models/admin/organization/admin_api_key_delete_params.rb +++ b/lib/openai/models/admin/organization/admin_api_key_delete_params.rb @@ -16,7 +16,8 @@ class AdminAPIKeyDeleteParams < OpenAI::Internal::Type::BaseModel required :key_id, String # @!method initialize(key_id:, request_options: {}) - # @param key_id [String] The ID of the API key to be deleted. + # @param key_id [String] + # The ID of the API key to be deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/admin_api_key_list_params.rb b/lib/openai/models/admin/organization/admin_api_key_list_params.rb index 0cf62d756..561d72790 100644 --- a/lib/openai/models/admin/organization/admin_api_key_list_params.rb +++ b/lib/openai/models/admin/organization/admin_api_key_list_params.rb @@ -28,11 +28,14 @@ class AdminAPIKeyListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::AdminAPIKeyListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # @param after [String, nil] Return keys with IDs that come after this ID in the pagination order. + # @param after [String, nil] + # Return keys with IDs that come after this ID in the pagination order. # - # @param limit [Integer] Maximum number of keys to return. + # @param limit [Integer] + # Maximum number of keys to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::AdminAPIKeyListParams::Order] Order results by creation time, ascending or descending. + # @param order [Symbol, OpenAI::Models::Admin::Organization::AdminAPIKeyListParams::Order] + # Order results by creation time, ascending or descending. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/admin_api_key_retrieve_params.rb b/lib/openai/models/admin/organization/admin_api_key_retrieve_params.rb index 37d5d3e68..7010fd53c 100644 --- a/lib/openai/models/admin/organization/admin_api_key_retrieve_params.rb +++ b/lib/openai/models/admin/organization/admin_api_key_retrieve_params.rb @@ -16,7 +16,8 @@ class AdminAPIKeyRetrieveParams < OpenAI::Internal::Type::BaseModel required :key_id, String # @!method initialize(key_id:, request_options: {}) - # @param key_id [String] The ID of the API key. + # @param key_id [String] + # The ID of the API key. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/audit_log_list_params.rb b/lib/openai/models/admin/organization/audit_log_list_params.rb index 2c62946e3..73907c4b0 100644 --- a/lib/openai/models/admin/organization/audit_log_list_params.rb +++ b/lib/openai/models/admin/organization/audit_log_list_params.rb @@ -49,7 +49,7 @@ class AuditLogListParams < OpenAI::Internal::Type::BaseModel # @!attribute event_types # Return only events with a `type` in one of these values. For example, # `project.created`. For all options, see the documentation for the - # [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). # # @return [Array, nil] optional( @@ -88,28 +88,50 @@ class AuditLogListParams < OpenAI::Internal::Type::BaseModel optional :tenant_only, OpenAI::Internal::Type::Boolean # @!method initialize(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, tenant_only: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListParams} for more details. + # @param actor_emails [Array] + # Return only events performed by users with these emails. # - # @param actor_emails [Array] Return only events performed by users with these emails. + # @param actor_ids [Array] + # Return only events performed by these actors. Can be a user ID, a service + # account ID, or an api key tracking ID. # - # @param actor_ids [Array] Return only events performed by these actors. Can be a user ID, a service accoun + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param effective_at [OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt] + # Return only events whose `effective_at` (Unix seconds) is in this range. # - # @param effective_at [OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt] Return only events whose `effective_at` (Unix seconds) is in this range. + # @param event_types [Array] + # Return only events with a `type` in one of these values. For example, + # `project.created`. For all options, see the documentation for the + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). # - # @param event_types [Array] Return only events with a `type` in one of these values. For example, `project.c + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param project_ids [Array] + # Return only events for these projects. # - # @param project_ids [Array] Return only events for these projects. + # @param resource_ids [Array] + # Return only events performed on these targets. For example, a project ID + # updated. For ChatGPT connector role events, use the workspace connector resource + # ID shown in `details.id`, such as `__`. # - # @param resource_ids [Array] Return only events performed on these targets. For example, a project ID updated - # - # @param tenant_only [Boolean] Return only tenant-scoped events associated with this organization. Required for + # @param tenant_only [Boolean] + # Return only tenant-scoped events associated with this organization. Required for + # tenant-scoped events such as `role.bound_to_resource` and + # `role.unbound_from_resource`. When `true`, all supplied event types must be + # tenant-scoped. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -142,19 +164,22 @@ class EffectiveAt < OpenAI::Internal::Type::BaseModel optional :lte, Integer # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt} for more - # details. - # # Return only events whose `effective_at` (Unix seconds) is in this range. # - # @param gt [Integer] Return only events whose `effective_at` (Unix seconds) is greater than this valu + # @param gt [Integer] + # Return only events whose `effective_at` (Unix seconds) is greater than this + # value. # - # @param gte [Integer] Return only events whose `effective_at` (Unix seconds) is greater than or equal + # @param gte [Integer] + # Return only events whose `effective_at` (Unix seconds) is greater than or equal + # to this value. # - # @param lt [Integer] Return only events whose `effective_at` (Unix seconds) is less than this value. + # @param lt [Integer] + # Return only events whose `effective_at` (Unix seconds) is less than this value. # - # @param lte [Integer] Return only events whose `effective_at` (Unix seconds) is less than or equal to + # @param lte [Integer] + # Return only events whose `effective_at` (Unix seconds) is less than or equal to + # this value. end # The event type. diff --git a/lib/openai/models/admin/organization/audit_log_list_response.rb b/lib/openai/models/admin/organization/audit_log_list_response.rb index ad9417905..fa137e7cf 100644 --- a/lib/openai/models/admin/organization/audit_log_list_response.rb +++ b/lib/openai/models/admin/organization/audit_log_list_response.rb @@ -582,130 +582,190 @@ class AuditLogListResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, effective_at:, type:, actor: nil, api_key_created: nil, api_key_deleted: nil, api_key_updated: nil, certificate_created: nil, certificate_deleted: nil, certificate_updated: nil, certificates_activated: nil, certificates_deactivated: nil, checkpoint_permission_created: nil, checkpoint_permission_deleted: nil, external_key_registered: nil, external_key_removed: nil, group_created: nil, group_deleted: nil, group_updated: nil, invite_accepted: nil, invite_deleted: nil, invite_sent: nil, ip_allowlist_config_activated: nil, ip_allowlist_config_deactivated: nil, ip_allowlist_created: nil, ip_allowlist_deleted: nil, ip_allowlist_updated: nil, login_failed: nil, login_succeeded: nil, logout_failed: nil, logout_succeeded: nil, organization_updated: nil, project: nil, project_archived: nil, project_created: nil, project_deleted: nil, project_updated: nil, rate_limit_deleted: nil, rate_limit_updated: nil, role_assignment_created: nil, role_assignment_deleted: nil, role_bound_to_resource: nil, role_created: nil, role_deleted: nil, role_unbound_from_resource: nil, role_updated: nil, scim_disabled: nil, scim_enabled: nil, service_account_created: nil, service_account_deleted: nil, service_account_updated: nil, user_added: nil, user_deleted: nil, user_updated: nil, workload_identity_provider_mapping_created: nil, workload_identity_provider_mapping_deleted: nil, workload_identity_provider_mapping_updated: nil, workload_identity_provider_created: nil, workload_identity_provider_deleted: nil, workload_identity_provider_updated: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListResponse} for more details. - # # A log of a user action or configuration change within this organization. # - # @param id [String] The ID of this log. + # @param id [String] + # The ID of this log. # - # @param effective_at [Integer] The Unix timestamp (in seconds) of the event. + # @param effective_at [Integer] + # The Unix timestamp (in seconds) of the event. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Type] The event type. + # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Type] + # The event type. # - # @param actor [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor, nil] The actor who performed the audit logged action. + # @param actor [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor, nil] + # The actor who performed the audit logged action. # - # @param api_key_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyCreated] The details for events with this `type`. + # @param api_key_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyCreated] + # The details for events with this `type`. # - # @param api_key_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyDeleted] The details for events with this `type`. + # @param api_key_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyDeleted] + # The details for events with this `type`. # - # @param api_key_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyUpdated] The details for events with this `type`. + # @param api_key_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyUpdated] + # The details for events with this `type`. # - # @param certificate_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateCreated] The details for events with this `type`. + # @param certificate_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateCreated] + # The details for events with this `type`. # - # @param certificate_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateDeleted] The details for events with this `type`. + # @param certificate_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateDeleted] + # The details for events with this `type`. # - # @param certificate_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateUpdated] The details for events with this `type`. + # @param certificate_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificateUpdated] + # The details for events with this `type`. # - # @param certificates_activated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificatesActivated] The details for events with this `type`. + # @param certificates_activated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificatesActivated] + # The details for events with this `type`. # - # @param certificates_deactivated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificatesDeactivated] The details for events with this `type`. + # @param certificates_deactivated [OpenAI::Models::Admin::Organization::AuditLogListResponse::CertificatesDeactivated] + # The details for events with this `type`. # - # @param checkpoint_permission_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionCreated] The project and fine-tuned model checkpoint that the checkpoint permission was c + # @param checkpoint_permission_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionCreated] + # The project and fine-tuned model checkpoint that the checkpoint permission was + # created for. # - # @param checkpoint_permission_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionDeleted] The details for events with this `type`. + # @param checkpoint_permission_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionDeleted] + # The details for events with this `type`. # - # @param external_key_registered [OpenAI::Models::Admin::Organization::AuditLogListResponse::ExternalKeyRegistered] The details for events with this `type`. + # @param external_key_registered [OpenAI::Models::Admin::Organization::AuditLogListResponse::ExternalKeyRegistered] + # The details for events with this `type`. # - # @param external_key_removed [OpenAI::Models::Admin::Organization::AuditLogListResponse::ExternalKeyRemoved] The details for events with this `type`. + # @param external_key_removed [OpenAI::Models::Admin::Organization::AuditLogListResponse::ExternalKeyRemoved] + # The details for events with this `type`. # - # @param group_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupCreated] The details for events with this `type`. + # @param group_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupCreated] + # The details for events with this `type`. # - # @param group_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupDeleted] The details for events with this `type`. + # @param group_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupDeleted] + # The details for events with this `type`. # - # @param group_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupUpdated] The details for events with this `type`. + # @param group_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupUpdated] + # The details for events with this `type`. # - # @param invite_accepted [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteAccepted] The details for events with this `type`. + # @param invite_accepted [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteAccepted] + # The details for events with this `type`. # - # @param invite_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteDeleted] The details for events with this `type`. + # @param invite_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteDeleted] + # The details for events with this `type`. # - # @param invite_sent [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteSent] The details for events with this `type`. + # @param invite_sent [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteSent] + # The details for events with this `type`. # - # @param ip_allowlist_config_activated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistConfigActivated] The details for events with this `type`. + # @param ip_allowlist_config_activated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistConfigActivated] + # The details for events with this `type`. # - # @param ip_allowlist_config_deactivated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistConfigDeactivated] The details for events with this `type`. + # @param ip_allowlist_config_deactivated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistConfigDeactivated] + # The details for events with this `type`. # - # @param ip_allowlist_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistCreated] The details for events with this `type`. + # @param ip_allowlist_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistCreated] + # The details for events with this `type`. # - # @param ip_allowlist_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistDeleted] The details for events with this `type`. + # @param ip_allowlist_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistDeleted] + # The details for events with this `type`. # - # @param ip_allowlist_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistUpdated] The details for events with this `type`. + # @param ip_allowlist_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::IPAllowlistUpdated] + # The details for events with this `type`. # - # @param login_failed [OpenAI::Models::Admin::Organization::AuditLogListResponse::LoginFailed] The details for events with this `type`. + # @param login_failed [OpenAI::Models::Admin::Organization::AuditLogListResponse::LoginFailed] + # The details for events with this `type`. # - # @param login_succeeded [Object] This event has no additional fields beyond the standard audit log attributes. + # @param login_succeeded [Object] + # This event has no additional fields beyond the standard audit log attributes. # - # @param logout_failed [OpenAI::Models::Admin::Organization::AuditLogListResponse::LogoutFailed] The details for events with this `type`. + # @param logout_failed [OpenAI::Models::Admin::Organization::AuditLogListResponse::LogoutFailed] + # The details for events with this `type`. # - # @param logout_succeeded [Object] This event has no additional fields beyond the standard audit log attributes. + # @param logout_succeeded [Object] + # This event has no additional fields beyond the standard audit log attributes. # - # @param organization_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated] The details for events with this `type`. + # @param organization_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated] + # The details for events with this `type`. # - # @param project [OpenAI::Models::Admin::Organization::AuditLogListResponse::Project] The project that the action was scoped to. Absent for actions not scoped to proj + # @param project [OpenAI::Models::Admin::Organization::AuditLogListResponse::Project] + # The project that the action was scoped to. Absent for actions not scoped to + # projects. Note that any admin actions taken via Admin API keys are associated + # with the default project. # - # @param project_archived [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectArchived] The details for events with this `type`. + # @param project_archived [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectArchived] + # The details for events with this `type`. # - # @param project_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectCreated] The details for events with this `type`. + # @param project_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectCreated] + # The details for events with this `type`. # - # @param project_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectDeleted] The details for events with this `type`. + # @param project_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectDeleted] + # The details for events with this `type`. # - # @param project_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectUpdated] The details for events with this `type`. + # @param project_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectUpdated] + # The details for events with this `type`. # - # @param rate_limit_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitDeleted] The details for events with this `type`. + # @param rate_limit_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitDeleted] + # The details for events with this `type`. # - # @param rate_limit_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitUpdated] The details for events with this `type`. + # @param rate_limit_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitUpdated] + # The details for events with this `type`. # - # @param role_assignment_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentCreated] The details for events with this `type`. + # @param role_assignment_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentCreated] + # The details for events with this `type`. # - # @param role_assignment_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted] The details for events with this `type`. + # @param role_assignment_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted] + # The details for events with this `type`. # - # @param role_bound_to_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource] The details for events with this `type`. + # @param role_bound_to_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource] + # The details for events with this `type`. # - # @param role_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleCreated] The details for events with this `type`. + # @param role_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleCreated] + # The details for events with this `type`. # - # @param role_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted] The details for events with this `type`. + # @param role_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted] + # The details for events with this `type`. # - # @param role_unbound_from_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource] The details for events with this `type`. + # @param role_unbound_from_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource] + # The details for events with this `type`. # - # @param role_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated] The details for events with this `type`. + # @param role_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated] + # The details for events with this `type`. # - # @param scim_disabled [OpenAI::Models::Admin::Organization::AuditLogListResponse::ScimDisabled] The details for events with this `type`. + # @param scim_disabled [OpenAI::Models::Admin::Organization::AuditLogListResponse::ScimDisabled] + # The details for events with this `type`. # - # @param scim_enabled [OpenAI::Models::Admin::Organization::AuditLogListResponse::ScimEnabled] The details for events with this `type`. + # @param scim_enabled [OpenAI::Models::Admin::Organization::AuditLogListResponse::ScimEnabled] + # The details for events with this `type`. # - # @param service_account_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountCreated] The details for events with this `type`. + # @param service_account_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountCreated] + # The details for events with this `type`. # - # @param service_account_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountDeleted] The details for events with this `type`. + # @param service_account_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountDeleted] + # The details for events with this `type`. # - # @param service_account_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountUpdated] The details for events with this `type`. + # @param service_account_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountUpdated] + # The details for events with this `type`. # - # @param user_added [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserAdded] The details for events with this `type`. + # @param user_added [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserAdded] + # The details for events with this `type`. # - # @param user_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserDeleted] The details for events with this `type`. + # @param user_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserDeleted] + # The details for events with this `type`. # - # @param user_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserUpdated] The details for events with this `type`. + # @param user_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserUpdated] + # The details for events with this `type`. # - # @param workload_identity_provider_mapping_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingCreated] The details for events with this `type`. + # @param workload_identity_provider_mapping_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingCreated] + # The details for events with this `type`. # - # @param workload_identity_provider_mapping_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingDeleted] The details for events with this `type`. + # @param workload_identity_provider_mapping_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingDeleted] + # The details for events with this `type`. # - # @param workload_identity_provider_mapping_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingUpdated] The details for events with this `type`. + # @param workload_identity_provider_mapping_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderMappingUpdated] + # The details for events with this `type`. # - # @param workload_identity_provider_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderCreated] The details for events with this `type`. + # @param workload_identity_provider_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderCreated] + # The details for events with this `type`. # - # @param workload_identity_provider_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderDeleted] The details for events with this `type`. + # @param workload_identity_provider_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderDeleted] + # The details for events with this `type`. # - # @param workload_identity_provider_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderUpdated] The details for events with this `type`. + # @param workload_identity_provider_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderUpdated] + # The details for events with this `type`. # The event type. # @@ -888,11 +948,14 @@ class Actor < OpenAI::Internal::Type::BaseModel # @!method initialize(api_key: nil, session: nil, type: nil) # The actor who performed the audit logged action. # - # @param api_key [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey] The API Key used to perform the audit logged action. + # @param api_key [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey] + # The API Key used to perform the audit logged action. # - # @param session [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Session] The session in which the audit logged action was performed. + # @param session [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Session] + # The session in which the audit logged action was performed. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Type] The type of actor. Is either `session` or `api_key`. + # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Type] + # The type of actor. Is either `session` or `api_key`. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor#api_key class APIKey < OpenAI::Internal::Type::BaseModel @@ -929,13 +992,17 @@ class APIKey < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, service_account: nil, type: nil, user: nil) # The API Key used to perform the audit logged action. # - # @param id [String] The tracking id of the API key. + # @param id [String] + # The tracking id of the API key. # - # @param service_account [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::ServiceAccount] The service account that performed the audit logged action. + # @param service_account [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::ServiceAccount] + # The service account that performed the audit logged action. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::Type] The type of API key. Can be either `user` or `service_account`. + # @param type [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::Type] + # The type of API key. Can be either `user` or `service_account`. # - # @param user [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::User] The user who performed the audit logged action. + # @param user [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey::User] + # The user who performed the audit logged action. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::APIKey#service_account class ServiceAccount < OpenAI::Internal::Type::BaseModel @@ -948,7 +1015,8 @@ class ServiceAccount < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The service account that performed the audit logged action. # - # @param id [String] The service account id. + # @param id [String] + # The service account id. end # The type of API key. Can be either `user` or `service_account`. @@ -981,9 +1049,11 @@ class User < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, email: nil) # The user who performed the audit logged action. # - # @param id [String] The user id. + # @param id [String] + # The user id. # - # @param email [String] The user email. + # @param email [String] + # The user email. end end @@ -1004,9 +1074,11 @@ class Session < OpenAI::Internal::Type::BaseModel # @!method initialize(ip_address: nil, user: nil) # The session in which the audit logged action was performed. # - # @param ip_address [String] The IP address from which the action was performed. + # @param ip_address [String] + # The IP address from which the action was performed. # - # @param user [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Session::User] The user who performed the audit logged action. + # @param user [OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Session::User] + # The user who performed the audit logged action. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::Actor::Session#user class User < OpenAI::Internal::Type::BaseModel @@ -1025,9 +1097,11 @@ class User < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, email: nil) # The user who performed the audit logged action. # - # @param id [String] The user id. + # @param id [String] + # The user id. # - # @param email [String] The user email. + # @param email [String] + # The user email. end end @@ -1062,9 +1136,11 @@ class APIKeyCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The tracking ID of the API key. + # @param id [String] + # The tracking ID of the API key. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyCreated::Data] The payload used to create the API key. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyCreated::Data] + # The payload used to create the API key. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyCreated#data class Data < OpenAI::Internal::Type::BaseModel @@ -1077,7 +1153,8 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(scopes: nil) # The payload used to create the API key. # - # @param scopes [Array] A list of scopes allowed for the API key, e.g. `["api.model.request"]` + # @param scopes [Array] + # A list of scopes allowed for the API key, e.g. `["api.model.request"]` end end @@ -1092,7 +1169,8 @@ class APIKeyDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The tracking ID of the API key. + # @param id [String] + # The tracking ID of the API key. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#api_key_updated @@ -1115,9 +1193,11 @@ class APIKeyUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The tracking ID of the API key. + # @param id [String] + # The tracking ID of the API key. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyUpdated::ChangesRequested] The payload used to update the API key. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyUpdated::ChangesRequested] + # The payload used to update the API key. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::APIKeyUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -1130,7 +1210,8 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(scopes: nil) # The payload used to update the API key. # - # @param scopes [Array] A list of scopes allowed for the API key, e.g. `["api.model.request"]` + # @param scopes [Array] + # A list of scopes allowed for the API key, e.g. `["api.model.request"]` end end @@ -1151,9 +1232,11 @@ class CertificateCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The certificate ID. + # @param id [String] + # The certificate ID. # - # @param name [String] The name of the certificate. + # @param name [String] + # The name of the certificate. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#certificate_deleted @@ -1179,11 +1262,14 @@ class CertificateDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, certificate: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The certificate ID. + # @param id [String] + # The certificate ID. # - # @param certificate [String] The certificate content in PEM format. + # @param certificate [String] + # The certificate content in PEM format. # - # @param name [String] The name of the certificate. + # @param name [String] + # The name of the certificate. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#certificate_updated @@ -1203,9 +1289,11 @@ class CertificateUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The certificate ID. + # @param id [String] + # The certificate ID. # - # @param name [String] The name of the certificate. + # @param name [String] + # The name of the certificate. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#certificates_activated @@ -1241,9 +1329,11 @@ class Certificate < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(id: nil, name: nil) - # @param id [String] The certificate ID. + # @param id [String] + # The certificate ID. # - # @param name [String] The name of the certificate. + # @param name [String] + # The name of the certificate. end end @@ -1280,9 +1370,11 @@ class Certificate < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(id: nil, name: nil) - # @param id [String] The certificate ID. + # @param id [String] + # The certificate ID. # - # @param name [String] The name of the certificate. + # @param name [String] + # The name of the certificate. end end @@ -1307,9 +1399,11 @@ class CheckpointPermissionCreated < OpenAI::Internal::Type::BaseModel # The project and fine-tuned model checkpoint that the checkpoint permission was # created for. # - # @param id [String] The ID of the checkpoint permission. + # @param id [String] + # The ID of the checkpoint permission. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionCreated::Data] The payload used to create the checkpoint permission. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionCreated::Data] + # The payload used to create the checkpoint permission. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::CheckpointPermissionCreated#data class Data < OpenAI::Internal::Type::BaseModel @@ -1328,9 +1422,11 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuned_model_checkpoint: nil, project_id: nil) # The payload used to create the checkpoint permission. # - # @param fine_tuned_model_checkpoint [String] The ID of the fine-tuned model checkpoint. + # @param fine_tuned_model_checkpoint [String] + # The ID of the fine-tuned model checkpoint. # - # @param project_id [String] The ID of the project that the checkpoint permission was created for. + # @param project_id [String] + # The ID of the project that the checkpoint permission was created for. end end @@ -1345,7 +1441,8 @@ class CheckpointPermissionDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the checkpoint permission. + # @param id [String] + # The ID of the checkpoint permission. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#external_key_registered @@ -1365,9 +1462,11 @@ class ExternalKeyRegistered < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The ID of the external key configuration. + # @param id [String] + # The ID of the external key configuration. # - # @param data [Object] The configuration for the external key. + # @param data [Object] + # The configuration for the external key. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#external_key_removed @@ -1381,7 +1480,8 @@ class ExternalKeyRemoved < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the external key configuration. + # @param id [String] + # The ID of the external key configuration. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#group_created @@ -1401,9 +1501,11 @@ class GroupCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The ID of the group. + # @param id [String] + # The ID of the group. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupCreated::Data] Information about the created group. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupCreated::Data] + # Information about the created group. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupCreated#data class Data < OpenAI::Internal::Type::BaseModel @@ -1416,7 +1518,8 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(group_name: nil) # Information about the created group. # - # @param group_name [String] The group name. + # @param group_name [String] + # The group name. end end @@ -1431,7 +1534,8 @@ class GroupDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the group. + # @param id [String] + # The ID of the group. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#group_updated @@ -1454,9 +1558,11 @@ class GroupUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The ID of the group. + # @param id [String] + # The ID of the group. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupUpdated::ChangesRequested] The payload used to update the group. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupUpdated::ChangesRequested] + # The payload used to update the group. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::GroupUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -1469,7 +1575,8 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(group_name: nil) # The payload used to update the group. # - # @param group_name [String] The updated group name. + # @param group_name [String] + # The updated group name. end end @@ -1484,7 +1591,8 @@ class InviteAccepted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the invite. + # @param id [String] + # The ID of the invite. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#invite_deleted @@ -1498,7 +1606,8 @@ class InviteDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the invite. + # @param id [String] + # The ID of the invite. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#invite_sent @@ -1518,9 +1627,11 @@ class InviteSent < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The ID of the invite. + # @param id [String] + # The ID of the invite. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteSent::Data] The payload used to create the invite. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteSent::Data] + # The payload used to create the invite. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::InviteSent#data class Data < OpenAI::Internal::Type::BaseModel @@ -1539,9 +1650,11 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(email: nil, role: nil) # The payload used to create the invite. # - # @param email [String] The email invited to the organization. + # @param email [String] + # The email invited to the organization. # - # @param role [String] The role the email was invited to be. Is either `owner` or `member`. + # @param role [String] + # The role the email was invited to be. Is either `owner` or `member`. end end @@ -1563,8 +1676,8 @@ class IPAllowlistConfigActivated < OpenAI::Internal::Type::BaseModel # @!method initialize(configs: nil) # The details for events with this `type`. # - # @param configs [Array] The configurations that were activated. - + # @param configs [Array] + # The configurations that were activated. class Config < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the IP allowlist configuration. @@ -1579,9 +1692,11 @@ class Config < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(id: nil, name: nil) - # @param id [String] The ID of the IP allowlist configuration. + # @param id [String] + # The ID of the IP allowlist configuration. # - # @param name [String] The name of the IP allowlist configuration. + # @param name [String] + # The name of the IP allowlist configuration. end end @@ -1603,8 +1718,8 @@ class IPAllowlistConfigDeactivated < OpenAI::Internal::Type::BaseModel # @!method initialize(configs: nil) # The details for events with this `type`. # - # @param configs [Array] The configurations that were deactivated. - + # @param configs [Array] + # The configurations that were deactivated. class Config < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the IP allowlist configuration. @@ -1619,9 +1734,11 @@ class Config < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(id: nil, name: nil) - # @param id [String] The ID of the IP allowlist configuration. + # @param id [String] + # The ID of the IP allowlist configuration. # - # @param name [String] The name of the IP allowlist configuration. + # @param name [String] + # The name of the IP allowlist configuration. end end @@ -1648,11 +1765,14 @@ class IPAllowlistCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, allowed_ips: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The ID of the IP allowlist configuration. + # @param id [String] + # The ID of the IP allowlist configuration. # - # @param allowed_ips [Array] The IP addresses or CIDR ranges included in the configuration. + # @param allowed_ips [Array] + # The IP addresses or CIDR ranges included in the configuration. # - # @param name [String] The name of the IP allowlist configuration. + # @param name [String] + # The name of the IP allowlist configuration. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#ip_allowlist_deleted @@ -1678,11 +1798,14 @@ class IPAllowlistDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, allowed_ips: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The ID of the IP allowlist configuration. + # @param id [String] + # The ID of the IP allowlist configuration. # - # @param allowed_ips [Array] The IP addresses or CIDR ranges that were in the configuration. + # @param allowed_ips [Array] + # The IP addresses or CIDR ranges that were in the configuration. # - # @param name [String] The name of the IP allowlist configuration. + # @param name [String] + # The name of the IP allowlist configuration. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#ip_allowlist_updated @@ -1702,9 +1825,11 @@ class IPAllowlistUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, allowed_ips: nil) # The details for events with this `type`. # - # @param id [String] The ID of the IP allowlist configuration. + # @param id [String] + # The ID of the IP allowlist configuration. # - # @param allowed_ips [Array] The updated set of IP addresses or CIDR ranges in the configuration. + # @param allowed_ips [Array] + # The updated set of IP addresses or CIDR ranges in the configuration. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#login_failed @@ -1724,9 +1849,11 @@ class LoginFailed < OpenAI::Internal::Type::BaseModel # @!method initialize(error_code: nil, error_message: nil) # The details for events with this `type`. # - # @param error_code [String] The error code of the failure. + # @param error_code [String] + # The error code of the failure. # - # @param error_message [String] The error message of the failure. + # @param error_message [String] + # The error message of the failure. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#logout_failed @@ -1746,9 +1873,11 @@ class LogoutFailed < OpenAI::Internal::Type::BaseModel # @!method initialize(error_code: nil, error_message: nil) # The details for events with this `type`. # - # @param error_code [String] The error code of the failure. + # @param error_code [String] + # The error code of the failure. # - # @param error_message [String] The error message of the failure. + # @param error_message [String] + # The error message of the failure. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#organization_updated @@ -1771,9 +1900,11 @@ class OrganizationUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The organization ID. + # @param id [String] + # The organization ID. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated::ChangesRequested] The payload used to update the organization settings. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated::ChangesRequested] + # The payload used to update the organization settings. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -1825,25 +1956,33 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel optional :usage_dashboard_visibility, String # @!method initialize(api_call_logging: nil, api_call_logging_project_ids: nil, description: nil, name: nil, threads_ui_visibility: nil, title: nil, usage_dashboard_visibility: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListResponse::OrganizationUpdated::ChangesRequested} - # for more details. - # # The payload used to update the organization settings. # - # @param api_call_logging [String] How your organization logs data from supported API calls. One of `disabled`, `en + # @param api_call_logging [String] + # How your organization logs data from supported API calls. One of `disabled`, + # `enabled_per_call`, `enabled_for_all_projects`, or + # `enabled_for_selected_projects` # - # @param api_call_logging_project_ids [String] The list of project ids if api_call_logging is set to `enabled_for_selected_proj + # @param api_call_logging_project_ids [String] + # The list of project ids if api_call_logging is set to + # `enabled_for_selected_projects` # - # @param description [String] The organization description. + # @param description [String] + # The organization description. # - # @param name [String] The organization name. + # @param name [String] + # The organization name. # - # @param threads_ui_visibility [String] Visibility of the threads page which shows messages created with the Assistants + # @param threads_ui_visibility [String] + # Visibility of the threads page which shows messages created with the Assistants + # API and Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`. # - # @param title [String] The organization title. + # @param title [String] + # The organization title. # - # @param usage_dashboard_visibility [String] Visibility of the usage dashboard which shows activity and costs for your organi + # @param usage_dashboard_visibility [String] + # Visibility of the usage dashboard which shows activity and costs for your + # organization. One of `ANY_ROLE` or `OWNERS`. end end @@ -1866,9 +2005,11 @@ class Project < OpenAI::Internal::Type::BaseModel # projects. Note that any admin actions taken via Admin API keys are associated # with the default project. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. # - # @param name [String] The project title. + # @param name [String] + # The project title. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#project_archived @@ -1882,7 +2023,8 @@ class ProjectArchived < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#project_created @@ -1902,9 +2044,11 @@ class ProjectCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectCreated::Data] The payload used to create the project. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectCreated::Data] + # The payload used to create the project. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectCreated#data class Data < OpenAI::Internal::Type::BaseModel @@ -1923,9 +2067,11 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(name: nil, title: nil) # The payload used to create the project. # - # @param name [String] The project name. + # @param name [String] + # The project name. # - # @param title [String] The title of the project as seen on the dashboard. + # @param title [String] + # The title of the project as seen on the dashboard. end end @@ -1940,7 +2086,8 @@ class ProjectDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#project_updated @@ -1963,9 +2110,11 @@ class ProjectUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectUpdated::ChangesRequested] The payload used to update the project. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectUpdated::ChangesRequested] + # The payload used to update the project. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::ProjectUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -1978,7 +2127,8 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(title: nil) # The payload used to update the project. # - # @param title [String] The title of the project as seen on the dashboard. + # @param title [String] + # The title of the project as seen on the dashboard. end end @@ -1993,7 +2143,8 @@ class RateLimitDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The rate limit ID + # @param id [String] + # The rate limit ID end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#rate_limit_updated @@ -2016,9 +2167,11 @@ class RateLimitUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The rate limit ID + # @param id [String] + # The rate limit ID # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitUpdated::ChangesRequested] The payload used to update the rate limits. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitUpdated::ChangesRequested] + # The payload used to update the rate limits. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::RateLimitUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -2061,17 +2214,23 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(batch_1_day_max_input_tokens: nil, max_audio_megabytes_per_1_minute: nil, max_images_per_1_minute: nil, max_requests_per_1_day: nil, max_requests_per_1_minute: nil, max_tokens_per_1_minute: nil) # The payload used to update the rate limits. # - # @param batch_1_day_max_input_tokens [Integer] The maximum batch input tokens per day. Only relevant for certain models. + # @param batch_1_day_max_input_tokens [Integer] + # The maximum batch input tokens per day. Only relevant for certain models. # - # @param max_audio_megabytes_per_1_minute [Integer] The maximum audio megabytes per minute. Only relevant for certain models. + # @param max_audio_megabytes_per_1_minute [Integer] + # The maximum audio megabytes per minute. Only relevant for certain models. # - # @param max_images_per_1_minute [Integer] The maximum images per minute. Only relevant for certain models. + # @param max_images_per_1_minute [Integer] + # The maximum images per minute. Only relevant for certain models. # - # @param max_requests_per_1_day [Integer] The maximum requests per day. Only relevant for certain models. + # @param max_requests_per_1_day [Integer] + # The maximum requests per day. Only relevant for certain models. # - # @param max_requests_per_1_minute [Integer] The maximum requests per minute. + # @param max_requests_per_1_minute [Integer] + # The maximum requests per minute. # - # @param max_tokens_per_1_minute [Integer] The maximum tokens per minute. + # @param max_tokens_per_1_minute [Integer] + # The maximum tokens per minute. end end @@ -2110,15 +2269,20 @@ class RoleAssignmentCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, principal_id: nil, principal_type: nil, resource_id: nil, resource_type: nil) # The details for events with this `type`. # - # @param id [String] The identifier of the role assignment. + # @param id [String] + # The identifier of the role assignment. # - # @param principal_id [String] The principal (user or group) that received the role. + # @param principal_id [String] + # The principal (user or group) that received the role. # - # @param principal_type [String] The type of principal (user or group) that received the role. + # @param principal_type [String] + # The type of principal (user or group) that received the role. # - # @param resource_id [String] The resource the role assignment is scoped to. + # @param resource_id [String] + # The resource the role assignment is scoped to. # - # @param resource_type [String] The type of resource the role assignment is scoped to. + # @param resource_type [String] + # The type of resource the role assignment is scoped to. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_assignment_deleted @@ -2156,15 +2320,20 @@ class RoleAssignmentDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, principal_id: nil, principal_type: nil, resource_id: nil, resource_type: nil) # The details for events with this `type`. # - # @param id [String] The identifier of the role assignment. + # @param id [String] + # The identifier of the role assignment. # - # @param principal_id [String] The principal (user or group) that had the role removed. + # @param principal_id [String] + # The principal (user or group) that had the role removed. # - # @param principal_type [String] The type of principal (user or group) that had the role removed. + # @param principal_type [String] + # The type of principal (user or group) that had the role removed. # - # @param resource_id [String] The resource the role assignment was scoped to. + # @param resource_id [String] + # The resource the role assignment was scoped to. # - # @param resource_type [String] The type of resource the role assignment was scoped to. + # @param resource_type [String] + # The type of resource the role assignment was scoped to. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_bound_to_resource @@ -2235,31 +2404,39 @@ class RoleBoundToResource < OpenAI::Internal::Type::BaseModel optional :workspace_id, String # @!method initialize(id: nil, connector_id: nil, connector_name: nil, enabled: nil, permissions: nil, resource_id: nil, resource_type: nil, role_id: nil, source: nil, workspace_id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource} - # for more details. - # # The details for events with this `type`. # - # @param id [String] The ID of the resource the role was bound to. ChatGPT workspace connector resour + # @param id [String] + # The ID of the resource the role was bound to. ChatGPT workspace connector + # resources use `__`. # - # @param connector_id [String] The connector ID for a ChatGPT workspace connector resource. + # @param connector_id [String] + # The connector ID for a ChatGPT workspace connector resource. # - # @param connector_name [String] The connector display name for a ChatGPT workspace connector resource, or the co + # @param connector_name [String] + # The connector display name for a ChatGPT workspace connector resource, or the + # connector ID when the display name could not be resolved. # - # @param enabled [Boolean] Whether the connector is enabled for the role. + # @param enabled [Boolean] + # Whether the connector is enabled for the role. # - # @param permissions [Array] The permissions granted to the role for the resource. + # @param permissions [Array] + # The permissions granted to the role for the resource. # - # @param resource_id [String] The ID of the resource the role was bound to. + # @param resource_id [String] + # The ID of the resource the role was bound to. # - # @param resource_type [String] The type of resource the role was bound to. + # @param resource_type [String] + # The type of resource the role was bound to. # - # @param role_id [String] The ID of the role that was bound to the resource. + # @param role_id [String] + # The ID of the role that was bound to the resource. # - # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source] The connector role mutation path that produced the event. + # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source] + # The connector role mutation path that produced the event. # - # @param workspace_id [String] The workspace ID for a ChatGPT workspace connector resource. + # @param workspace_id [String] + # The workspace ID for a ChatGPT workspace connector resource. # The connector role mutation path that produced the event. # @@ -2313,15 +2490,20 @@ class RoleCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, permissions: nil, resource_id: nil, resource_type: nil, role_name: nil) # The details for events with this `type`. # - # @param id [String] The role ID. + # @param id [String] + # The role ID. # - # @param permissions [Array] The permissions granted by the role. + # @param permissions [Array] + # The permissions granted by the role. # - # @param resource_id [String] The resource the role is scoped to. + # @param resource_id [String] + # The resource the role is scoped to. # - # @param resource_type [String] The type of resource the role belongs to. + # @param resource_type [String] + # The type of resource the role belongs to. # - # @param role_name [String] The name of the role. + # @param role_name [String] + # The name of the role. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_deleted @@ -2335,7 +2517,8 @@ class RoleDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The role ID. + # @param id [String] + # The role ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_unbound_from_resource @@ -2406,31 +2589,39 @@ class RoleUnboundFromResource < OpenAI::Internal::Type::BaseModel optional :workspace_id, String # @!method initialize(id: nil, connector_id: nil, connector_name: nil, enabled: nil, permissions: nil, resource_id: nil, resource_type: nil, role_id: nil, source: nil, workspace_id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource} - # for more details. - # # The details for events with this `type`. # - # @param id [String] The ID of the resource the role was unbound from. ChatGPT workspace connector re + # @param id [String] + # The ID of the resource the role was unbound from. ChatGPT workspace connector + # resources use `__`. # - # @param connector_id [String] The connector ID for a ChatGPT workspace connector resource. + # @param connector_id [String] + # The connector ID for a ChatGPT workspace connector resource. # - # @param connector_name [String] The connector display name for a ChatGPT workspace connector resource, or the co + # @param connector_name [String] + # The connector display name for a ChatGPT workspace connector resource, or the + # connector ID when the display name could not be resolved. # - # @param enabled [Boolean] Whether the connector is enabled for the role. + # @param enabled [Boolean] + # Whether the connector is enabled for the role. # - # @param permissions [Array] The permissions remaining for the role after the change. + # @param permissions [Array] + # The permissions remaining for the role after the change. # - # @param resource_id [String] The ID of the resource the role was unbound from. + # @param resource_id [String] + # The ID of the resource the role was unbound from. # - # @param resource_type [String] The type of resource the role was unbound from. + # @param resource_type [String] + # The type of resource the role was unbound from. # - # @param role_id [String] The ID of the role that was unbound from the resource. + # @param role_id [String] + # The ID of the role that was unbound from the resource. # - # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source] The connector role mutation path that produced the event. + # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source] + # The connector role mutation path that produced the event. # - # @param workspace_id [String] The workspace ID for a ChatGPT workspace connector resource. + # @param workspace_id [String] + # The workspace ID for a ChatGPT workspace connector resource. # The connector role mutation path that produced the event. # @@ -2469,9 +2660,11 @@ class RoleUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The role ID. + # @param id [String] + # The role ID. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated::ChangesRequested] The payload used to update the role. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated::ChangesRequested] + # The payload used to update the role. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -2520,19 +2713,26 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(description: nil, metadata: nil, permissions_added: nil, permissions_removed: nil, resource_id: nil, resource_type: nil, role_name: nil) # The payload used to update the role. # - # @param description [String] The updated role description, when provided. + # @param description [String] + # The updated role description, when provided. # - # @param metadata [Object] Additional metadata stored on the role. + # @param metadata [Object] + # Additional metadata stored on the role. # - # @param permissions_added [Array] The permissions added to the role. + # @param permissions_added [Array] + # The permissions added to the role. # - # @param permissions_removed [Array] The permissions removed from the role. + # @param permissions_removed [Array] + # The permissions removed from the role. # - # @param resource_id [String] The resource the role is scoped to. + # @param resource_id [String] + # The resource the role is scoped to. # - # @param resource_type [String] The type of resource the role belongs to. + # @param resource_type [String] + # The type of resource the role belongs to. # - # @param role_name [String] The updated role name, when provided. + # @param role_name [String] + # The updated role name, when provided. end end @@ -2547,7 +2747,8 @@ class ScimDisabled < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the SCIM was disabled for. + # @param id [String] + # The ID of the SCIM was disabled for. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#scim_enabled @@ -2561,7 +2762,8 @@ class ScimEnabled < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The ID of the SCIM was enabled for. + # @param id [String] + # The ID of the SCIM was enabled for. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#service_account_created @@ -2584,9 +2786,11 @@ class ServiceAccountCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The service account ID. + # @param id [String] + # The service account ID. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountCreated::Data] The payload used to create the service account. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountCreated::Data] + # The payload used to create the service account. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountCreated#data class Data < OpenAI::Internal::Type::BaseModel @@ -2599,7 +2803,8 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(role: nil) # The payload used to create the service account. # - # @param role [String] The role of the service account. Is either `owner` or `member`. + # @param role [String] + # The role of the service account. Is either `owner` or `member`. end end @@ -2614,7 +2819,8 @@ class ServiceAccountDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The service account ID. + # @param id [String] + # The service account ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#service_account_updated @@ -2637,9 +2843,11 @@ class ServiceAccountUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The service account ID. + # @param id [String] + # The service account ID. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountUpdated::ChangesRequested] The payload used to updated the service account. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountUpdated::ChangesRequested] + # The payload used to updated the service account. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::ServiceAccountUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -2652,7 +2860,8 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(role: nil) # The payload used to updated the service account. # - # @param role [String] The role of the service account. Is either `owner` or `member`. + # @param role [String] + # The role of the service account. Is either `owner` or `member`. end end @@ -2673,9 +2882,11 @@ class UserAdded < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The user ID. + # @param id [String] + # The user ID. # - # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserAdded::Data] The payload used to add the user to the project. + # @param data [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserAdded::Data] + # The payload used to add the user to the project. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::UserAdded#data class Data < OpenAI::Internal::Type::BaseModel @@ -2688,7 +2899,8 @@ class Data < OpenAI::Internal::Type::BaseModel # @!method initialize(role: nil) # The payload used to add the user to the project. # - # @param role [String] The role of the user. Is either `owner` or `member`. + # @param role [String] + # The role of the user. Is either `owner` or `member`. end end @@ -2703,7 +2915,8 @@ class UserDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil) # The details for events with this `type`. # - # @param id [String] The user ID. + # @param id [String] + # The user ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#user_updated @@ -2726,9 +2939,11 @@ class UserUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The project ID. + # @param id [String] + # The project ID. # - # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserUpdated::ChangesRequested] The payload used to update the user. + # @param changes_requested [OpenAI::Models::Admin::Organization::AuditLogListResponse::UserUpdated::ChangesRequested] + # The payload used to update the user. # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::UserUpdated#changes_requested class ChangesRequested < OpenAI::Internal::Type::BaseModel @@ -2741,7 +2956,8 @@ class ChangesRequested < OpenAI::Internal::Type::BaseModel # @!method initialize(role: nil) # The payload used to update the user. # - # @param role [String] The role of the user. Is either `owner` or `member`. + # @param role [String] + # The role of the user. Is either `owner` or `member`. end end @@ -2768,11 +2984,14 @@ class WorkloadIdentityProviderMappingCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil, identity_provider_id: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider mapping ID. + # @param id [String] + # The workload identity provider mapping ID. # - # @param data [Object] The payload used to create the workload identity provider mapping. + # @param data [Object] + # The payload used to create the workload identity provider mapping. # - # @param identity_provider_id [String] The workload identity provider ID. + # @param identity_provider_id [String] + # The workload identity provider ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#workload_identity_provider_mapping_deleted @@ -2804,13 +3023,17 @@ class WorkloadIdentityProviderMappingDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, identity_provider_id: nil, project_id: nil, service_account_id: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider mapping ID. + # @param id [String] + # The workload identity provider mapping ID. # - # @param identity_provider_id [String] The workload identity provider ID. + # @param identity_provider_id [String] + # The workload identity provider ID. # - # @param project_id [String] The project ID. + # @param project_id [String] + # The project ID. # - # @param service_account_id [String] The mapped service account ID. + # @param service_account_id [String] + # The mapped service account ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#workload_identity_provider_mapping_updated @@ -2836,11 +3059,14 @@ class WorkloadIdentityProviderMappingUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil, identity_provider_id: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider mapping ID. + # @param id [String] + # The workload identity provider mapping ID. # - # @param changes_requested [Object] The payload used to update the workload identity provider mapping. + # @param changes_requested [Object] + # The payload used to update the workload identity provider mapping. # - # @param identity_provider_id [String] The workload identity provider ID. + # @param identity_provider_id [String] + # The workload identity provider ID. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#workload_identity_provider_created @@ -2860,9 +3086,11 @@ class WorkloadIdentityProviderCreated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, data: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider ID. + # @param id [String] + # The workload identity provider ID. # - # @param data [Object] The payload used to create the workload identity provider. + # @param data [Object] + # The payload used to create the workload identity provider. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#workload_identity_provider_deleted @@ -2882,9 +3110,11 @@ class WorkloadIdentityProviderDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, name: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider ID. + # @param id [String] + # The workload identity provider ID. # - # @param name [String] The workload identity provider name. + # @param name [String] + # The workload identity provider name. end # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#workload_identity_provider_updated @@ -2904,9 +3134,11 @@ class WorkloadIdentityProviderUpdated < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, changes_requested: nil) # The details for events with this `type`. # - # @param id [String] The workload identity provider ID. + # @param id [String] + # The workload identity provider ID. # - # @param changes_requested [Object] The payload used to update the workload identity provider. + # @param changes_requested [Object] + # The payload used to update the workload identity provider. end end end diff --git a/lib/openai/models/admin/organization/certificate.rb b/lib/openai/models/admin/organization/certificate.rb index b80be7e8b..34d6c31f1 100644 --- a/lib/openai/models/admin/organization/certificate.rb +++ b/lib/openai/models/admin/organization/certificate.rb @@ -50,22 +50,32 @@ class Certificate < OpenAI::Internal::Type::BaseModel optional :active, OpenAI::Internal::Type::Boolean # @!method initialize(id:, certificate_details:, created_at:, name:, object:, active: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Certificate} for more details. - # # Represents an individual `certificate` uploaded to the organization. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # # @param certificate_details [OpenAI::Models::Admin::Organization::Certificate::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. + # + # @param name [String, nil] + # The name of the certificate. # - # @param name [String, nil] The name of the certificate. + # @param object [Symbol, OpenAI::Models::Admin::Organization::Certificate::Object] + # The object type. # - # @param object [Symbol, OpenAI::Models::Admin::Organization::Certificate::Object] The object type. + # - If creating, updating, or getting a specific certificate, the object type is + # `certificate`. + # - If listing, activating, or deactivating certificates for the organization, the + # object type is `organization.certificate`. + # - If listing, activating, or deactivating certificates for a project, the object + # type is `organization.project.certificate`. # - # @param active [Boolean] Whether the certificate is currently active at the specified scope. Not returned + # @param active [Boolean] + # Whether the certificate is currently active at the specified scope. Not returned + # when getting details for a specific certificate. # @see OpenAI::Models::Admin::Organization::Certificate#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -88,11 +98,14 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(content: nil, expires_at: nil, valid_at: nil) - # @param content [String] The content of the certificate in PEM format. + # @param content [String] + # The content of the certificate in PEM format. # - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end # The object type. diff --git a/lib/openai/models/admin/organization/certificate_activate_response.rb b/lib/openai/models/admin/organization/certificate_activate_response.rb index fdd0d1b45..32e4f3cdb 100644 --- a/lib/openai/models/admin/organization/certificate_activate_response.rb +++ b/lib/openai/models/admin/organization/certificate_activate_response.rb @@ -47,17 +47,22 @@ class CertificateActivateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.certificate") # Represents an individual certificate configured at the organization level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the organization level. + # @param active [Boolean] + # Whether the certificate is currently active at the organization level. # # @param certificate_details [OpenAI::Models::Admin::Organization::CertificateActivateResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.certificate"] The object type, which is always `organization.certificate`. + # @param object [Symbol, :"organization.certificate"] + # The object type, which is always `organization.certificate`. # @see OpenAI::Models::Admin::Organization::CertificateActivateResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -74,9 +79,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/certificate_create_params.rb b/lib/openai/models/admin/organization/certificate_create_params.rb index 1c4f9cc40..89648a2b6 100644 --- a/lib/openai/models/admin/organization/certificate_create_params.rb +++ b/lib/openai/models/admin/organization/certificate_create_params.rb @@ -22,9 +22,11 @@ class CertificateCreateParams < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(certificate:, name: nil, request_options: {}) - # @param certificate [String] The certificate content in PEM format + # @param certificate [String] + # The certificate content in PEM format # - # @param name [String] An optional name for the certificate + # @param name [String] + # An optional name for the certificate # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/certificate_deactivate_response.rb b/lib/openai/models/admin/organization/certificate_deactivate_response.rb index 18cdbc5d5..47521f0b1 100644 --- a/lib/openai/models/admin/organization/certificate_deactivate_response.rb +++ b/lib/openai/models/admin/organization/certificate_deactivate_response.rb @@ -47,17 +47,22 @@ class CertificateDeactivateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.certificate") # Represents an individual certificate configured at the organization level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the organization level. + # @param active [Boolean] + # Whether the certificate is currently active at the organization level. # # @param certificate_details [OpenAI::Models::Admin::Organization::CertificateDeactivateResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.certificate"] The object type, which is always `organization.certificate`. + # @param object [Symbol, :"organization.certificate"] + # The object type, which is always `organization.certificate`. # @see OpenAI::Models::Admin::Organization::CertificateDeactivateResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -74,9 +79,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/certificate_delete_response.rb b/lib/openai/models/admin/organization/certificate_delete_response.rb index f9c05d4d6..52f6f6339 100644 --- a/lib/openai/models/admin/organization/certificate_delete_response.rb +++ b/lib/openai/models/admin/organization/certificate_delete_response.rb @@ -19,9 +19,11 @@ class CertificateDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, const: :"certificate.deleted" # @!method initialize(id:, object: :"certificate.deleted") - # @param id [String] The ID of the certificate that was deleted. + # @param id [String] + # The ID of the certificate that was deleted. # - # @param object [Symbol, :"certificate.deleted"] The object type, must be `certificate.deleted`. + # @param object [Symbol, :"certificate.deleted"] + # The object type, must be `certificate.deleted`. end end end diff --git a/lib/openai/models/admin/organization/certificate_list_params.rb b/lib/openai/models/admin/organization/certificate_list_params.rb index 9989e0778..00740e69e 100644 --- a/lib/openai/models/admin/organization/certificate_list_params.rb +++ b/lib/openai/models/admin/organization/certificate_list_params.rb @@ -33,14 +33,19 @@ class CertificateListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::CertificateListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::CertificateListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 - # - # @param order [Symbol, OpenAI::Models::Admin::Organization::CertificateListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Admin::Organization::CertificateListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/certificate_list_response.rb b/lib/openai/models/admin/organization/certificate_list_response.rb index 610b904bd..c9aa0555e 100644 --- a/lib/openai/models/admin/organization/certificate_list_response.rb +++ b/lib/openai/models/admin/organization/certificate_list_response.rb @@ -47,17 +47,22 @@ class CertificateListResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.certificate") # Represents an individual certificate configured at the organization level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the organization level. + # @param active [Boolean] + # Whether the certificate is currently active at the organization level. # # @param certificate_details [OpenAI::Models::Admin::Organization::CertificateListResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.certificate"] The object type, which is always `organization.certificate`. + # @param object [Symbol, :"organization.certificate"] + # The object type, which is always `organization.certificate`. # @see OpenAI::Models::Admin::Organization::CertificateListResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -74,9 +79,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/certificate_retrieve_params.rb b/lib/openai/models/admin/organization/certificate_retrieve_params.rb index 5fa5b9668..cee542e0c 100644 --- a/lib/openai/models/admin/organization/certificate_retrieve_params.rb +++ b/lib/openai/models/admin/organization/certificate_retrieve_params.rb @@ -27,13 +27,11 @@ class CertificateRetrieveParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(certificate_id:, include: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::CertificateRetrieveParams} for more - # details. - # # @param certificate_id [String] # - # @param include [Array] A list of additional fields to include in the response. Currently the only suppo + # @param include [Array] + # A list of additional fields to include in the response. Currently the only + # supported value is `content` to fetch the PEM content of the certificate. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/certificate_update_params.rb b/lib/openai/models/admin/organization/certificate_update_params.rb index 08f00a365..1d69d2289 100644 --- a/lib/openai/models/admin/organization/certificate_update_params.rb +++ b/lib/openai/models/admin/organization/certificate_update_params.rb @@ -23,7 +23,8 @@ class CertificateUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(certificate_id:, name: nil, request_options: {}) # @param certificate_id [String] # - # @param name [String] The updated name for the certificate + # @param name [String] + # The updated name for the certificate # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/data_retention_update_params.rb b/lib/openai/models/admin/organization/data_retention_update_params.rb index a69a5c652..2fe036e83 100644 --- a/lib/openai/models/admin/organization/data_retention_update_params.rb +++ b/lib/openai/models/admin/organization/data_retention_update_params.rb @@ -19,7 +19,8 @@ class DataRetentionUpdateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(retention_type:, request_options: {}) - # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::DataRetentionUpdateParams::RetentionType] The desired organization data retention type. + # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::DataRetentionUpdateParams::RetentionType] + # The desired organization data retention type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/group.rb b/lib/openai/models/admin/organization/group.rb index 1ea140276..7b949bdf5 100644 --- a/lib/openai/models/admin/organization/group.rb +++ b/lib/openai/models/admin/organization/group.rb @@ -38,20 +38,23 @@ class Group < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(id:, created_at:, group_type:, is_scim_managed:, name:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Group} for more details. - # # Details about an organization group. # - # @param id [String] Identifier for the group. + # @param id [String] + # Identifier for the group. # - # @param created_at [Integer] Unix timestamp (in seconds) when the group was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the group was created. # - # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Group::GroupType] The type of the group. + # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Group::GroupType] + # The type of the group. # - # @param is_scim_managed [Boolean] Whether the group is managed through SCIM and controlled by your identity provid + # @param is_scim_managed [Boolean] + # Whether the group is managed through SCIM and controlled by your identity + # provider. # - # @param name [String] Display name of the group. + # @param name [String] + # Display name of the group. # The type of the group. # diff --git a/lib/openai/models/admin/organization/group_create_params.rb b/lib/openai/models/admin/organization/group_create_params.rb index 7a8bd7e0f..1481a8f3b 100644 --- a/lib/openai/models/admin/organization/group_create_params.rb +++ b/lib/openai/models/admin/organization/group_create_params.rb @@ -16,7 +16,8 @@ class GroupCreateParams < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(name:, request_options: {}) - # @param name [String] Human readable name for the group. + # @param name [String] + # Human readable name for the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/group_delete_response.rb b/lib/openai/models/admin/organization/group_delete_response.rb index c75292f84..cb55fe6fe 100644 --- a/lib/openai/models/admin/organization/group_delete_response.rb +++ b/lib/openai/models/admin/organization/group_delete_response.rb @@ -27,11 +27,14 @@ class GroupDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"group.deleted") # Confirmation payload returned after deleting a group. # - # @param id [String] Identifier of the deleted group. + # @param id [String] + # Identifier of the deleted group. # - # @param deleted [Boolean] Whether the group was deleted. + # @param deleted [Boolean] + # Whether the group was deleted. # - # @param object [Symbol, :"group.deleted"] Always `group.deleted`. + # @param object [Symbol, :"group.deleted"] + # Always `group.deleted`. end end end diff --git a/lib/openai/models/admin/organization/group_list_params.rb b/lib/openai/models/admin/organization/group_list_params.rb index 8ebe39ce8..ecef8320d 100644 --- a/lib/openai/models/admin/organization/group_list_params.rb +++ b/lib/openai/models/admin/organization/group_list_params.rb @@ -32,14 +32,18 @@ class GroupListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::GroupListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::GroupListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is a group ID that defines your place in + # the list. For instance, if you make a list request and receive 100 objects, + # ending with group_abc, your subsequent call can include `after=group_abc` in + # order to fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is a group ID that defines your place in + # @param limit [Integer] + # A limit on the number of groups to be returned. Limit can range between 0 and + # 1000, and the default is 100. # - # @param limit [Integer] A limit on the number of groups to be returned. Limit can range between 0 and 10 - # - # @param order [Symbol, OpenAI::Models::Admin::Organization::GroupListParams::Order] Specifies the sort order of the returned groups. + # @param order [Symbol, OpenAI::Models::Admin::Organization::GroupListParams::Order] + # Specifies the sort order of the returned groups. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/group_update_params.rb b/lib/openai/models/admin/organization/group_update_params.rb index 758fa8462..1370d7647 100644 --- a/lib/openai/models/admin/organization/group_update_params.rb +++ b/lib/openai/models/admin/organization/group_update_params.rb @@ -23,7 +23,8 @@ class GroupUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(group_id:, name:, request_options: {}) # @param group_id [String] # - # @param name [String] New display name for the group. + # @param name [String] + # New display name for the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/group_update_response.rb b/lib/openai/models/admin/organization/group_update_response.rb index 80904370d..f942e7c6e 100644 --- a/lib/openai/models/admin/organization/group_update_response.rb +++ b/lib/openai/models/admin/organization/group_update_response.rb @@ -32,18 +32,20 @@ class GroupUpdateResponse < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(id:, created_at:, is_scim_managed:, name:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::GroupUpdateResponse} for more details. - # # Response returned after updating a group. # - # @param id [String] Identifier for the group. + # @param id [String] + # Identifier for the group. # - # @param created_at [Integer] Unix timestamp (in seconds) when the group was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the group was created. # - # @param is_scim_managed [Boolean] Whether the group is managed through SCIM and controlled by your identity provid + # @param is_scim_managed [Boolean] + # Whether the group is managed through SCIM and controlled by your identity + # provider. # - # @param name [String] Updated display name for the group. + # @param name [String] + # Updated display name for the group. end end end diff --git a/lib/openai/models/admin/organization/groups/organization_group_user.rb b/lib/openai/models/admin/organization/groups/organization_group_user.rb index d6232373a..124587451 100644 --- a/lib/openai/models/admin/organization/groups/organization_group_user.rb +++ b/lib/openai/models/admin/organization/groups/organization_group_user.rb @@ -28,11 +28,14 @@ class OrganizationGroupUser < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, email:, name:) # Represents an individual user returned when inspecting group membership. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param email [String, nil] The email address of the user. + # @param email [String, nil] + # The email address of the user. # - # @param name [String] The name of the user. + # @param name [String] + # The name of the user. end end end diff --git a/lib/openai/models/admin/organization/groups/role_create_params.rb b/lib/openai/models/admin/organization/groups/role_create_params.rb index fb92573d1..12d367132 100644 --- a/lib/openai/models/admin/organization/groups/role_create_params.rb +++ b/lib/openai/models/admin/organization/groups/role_create_params.rb @@ -24,7 +24,8 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(group_id:, role_id:, request_options: {}) # @param group_id [String] # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/groups/role_create_response.rb b/lib/openai/models/admin/organization/groups/role_create_response.rb index 71a2307e0..959816eaa 100644 --- a/lib/openai/models/admin/organization/groups/role_create_response.rb +++ b/lib/openai/models/admin/organization/groups/role_create_response.rb @@ -28,11 +28,14 @@ class RoleCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(group:, role:, object: :"group.role") # Role assignment linking a group to a role. # - # @param group [OpenAI::Models::Admin::Organization::Groups::RoleCreateResponse::Group] Summary information about a group returned in role assignment responses. + # @param group [OpenAI::Models::Admin::Organization::Groups::RoleCreateResponse::Group] + # Summary information about a group returned in role assignment responses. # - # @param role [OpenAI::Models::Admin::Organization::Role] Details about a role that can be assigned through the public Roles API. + # @param role [OpenAI::Models::Admin::Organization::Role] + # Details about a role that can be assigned through the public Roles API. # - # @param object [Symbol, :"group.role"] Always `group.role`. + # @param object [Symbol, :"group.role"] + # Always `group.role`. # @see OpenAI::Models::Admin::Organization::Groups::RoleCreateResponse#group class Group < OpenAI::Internal::Type::BaseModel @@ -69,15 +72,20 @@ class Group < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, name:, scim_managed:, object: :group) # Summary information about a group returned in role assignment responses. # - # @param id [String] Identifier for the group. + # @param id [String] + # Identifier for the group. # - # @param created_at [Integer] Unix timestamp (in seconds) when the group was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the group was created. # - # @param name [String] Display name of the group. + # @param name [String] + # Display name of the group. # - # @param scim_managed [Boolean] Whether the group is managed through SCIM. + # @param scim_managed [Boolean] + # Whether the group is managed through SCIM. # - # @param object [Symbol, :group] Always `group`. + # @param object [Symbol, :group] + # Always `group`. end end end diff --git a/lib/openai/models/admin/organization/groups/role_delete_response.rb b/lib/openai/models/admin/organization/groups/role_delete_response.rb index 4cf3ee4aa..dce66680d 100644 --- a/lib/openai/models/admin/organization/groups/role_delete_response.rb +++ b/lib/openai/models/admin/organization/groups/role_delete_response.rb @@ -21,15 +21,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, String # @!method initialize(deleted:, object:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Groups::RoleDeleteResponse} for more - # details. - # # Confirmation payload returned after unassigning a role. # - # @param deleted [Boolean] Whether the assignment was removed. + # @param deleted [Boolean] + # Whether the assignment was removed. # - # @param object [String] Identifier for the deleted assignment, such as `group.role.deleted` or `user.rol + # @param object [String] + # Identifier for the deleted assignment, such as `group.role.deleted` or + # `user.role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/groups/role_list_params.rb b/lib/openai/models/admin/organization/groups/role_list_params.rb index aaadc3d00..5fa9a8180 100644 --- a/lib/openai/models/admin/organization/groups/role_list_params.rb +++ b/lib/openai/models/admin/organization/groups/role_list_params.rb @@ -35,16 +35,17 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Groups::RoleListParams::Order } # @!method initialize(group_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Groups::RoleListParams} for more details. - # # @param group_id [String] # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing organization roles. # - # @param limit [Integer] A limit on the number of organization role assignments to return. + # @param limit [Integer] + # A limit on the number of organization role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::RoleListParams::Order] Sort order for the returned organization roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::RoleListParams::Order] + # Sort order for the returned organization roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/groups/role_list_response.rb b/lib/openai/models/admin/organization/groups/role_list_response.rb index 4d32014ec..62f197139 100644 --- a/lib/openai/models/admin/organization/groups/role_list_response.rb +++ b/lib/openai/models/admin/organization/groups/role_list_response.rb @@ -95,30 +95,41 @@ class RoleListResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/groups/role_retrieve_response.rb b/lib/openai/models/admin/organization/groups/role_retrieve_response.rb index 14e7bd9d4..12888094c 100644 --- a/lib/openai/models/admin/organization/groups/role_retrieve_response.rb +++ b/lib/openai/models/admin/organization/groups/role_retrieve_response.rb @@ -95,30 +95,41 @@ class RoleRetrieveResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/groups/user_create_params.rb b/lib/openai/models/admin/organization/groups/user_create_params.rb index b03032db4..998ef010b 100644 --- a/lib/openai/models/admin/organization/groups/user_create_params.rb +++ b/lib/openai/models/admin/organization/groups/user_create_params.rb @@ -24,7 +24,8 @@ class UserCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(group_id:, user_id:, request_options: {}) # @param group_id [String] # - # @param user_id [String] Identifier of the user to add to the group. + # @param user_id [String] + # Identifier of the user to add to the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/groups/user_create_response.rb b/lib/openai/models/admin/organization/groups/user_create_response.rb index c1f1d8e7e..214588f50 100644 --- a/lib/openai/models/admin/organization/groups/user_create_response.rb +++ b/lib/openai/models/admin/organization/groups/user_create_response.rb @@ -28,11 +28,14 @@ class UserCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(group_id:, user_id:, object: :"group.user") # Confirmation payload returned after adding a user to a group. # - # @param group_id [String] Identifier of the group the user was added to. + # @param group_id [String] + # Identifier of the group the user was added to. # - # @param user_id [String] Identifier of the user that was added. + # @param user_id [String] + # Identifier of the user that was added. # - # @param object [Symbol, :"group.user"] Always `group.user`. + # @param object [Symbol, :"group.user"] + # Always `group.user`. end end end diff --git a/lib/openai/models/admin/organization/groups/user_delete_response.rb b/lib/openai/models/admin/organization/groups/user_delete_response.rb index e0a467073..cc02e8920 100644 --- a/lib/openai/models/admin/organization/groups/user_delete_response.rb +++ b/lib/openai/models/admin/organization/groups/user_delete_response.rb @@ -22,9 +22,11 @@ class UserDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(deleted:, object: :"group.user.deleted") # Confirmation payload returned after removing a user from a group. # - # @param deleted [Boolean] Whether the group membership was removed. + # @param deleted [Boolean] + # Whether the group membership was removed. # - # @param object [Symbol, :"group.user.deleted"] Always `group.user.deleted`. + # @param object [Symbol, :"group.user.deleted"] + # Always `group.user.deleted`. end end end diff --git a/lib/openai/models/admin/organization/groups/user_list_params.rb b/lib/openai/models/admin/organization/groups/user_list_params.rb index e0c3106a0..5b2aff62d 100644 --- a/lib/openai/models/admin/organization/groups/user_list_params.rb +++ b/lib/openai/models/admin/organization/groups/user_list_params.rb @@ -36,16 +36,18 @@ class UserListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Groups::UserListParams::Order } # @!method initialize(group_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Groups::UserListParams} for more details. - # # @param group_id [String] # - # @param after [String] A cursor for use in pagination. Provide the ID of the last user from the previou + # @param after [String] + # A cursor for use in pagination. Provide the ID of the last user from the + # previous list response to retrieve the next page. # - # @param limit [Integer] A limit on the number of users to be returned. Limit can range between 0 and 100 + # @param limit [Integer] + # A limit on the number of users to be returned. Limit can range between 0 and + # 1000, and the default is 100. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::UserListParams::Order] Specifies the sort order of users in the list. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::UserListParams::Order] + # Specifies the sort order of users in the list. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/groups/user_retrieve_response.rb b/lib/openai/models/admin/organization/groups/user_retrieve_response.rb index 8160cba22..93fc05f0c 100644 --- a/lib/openai/models/admin/organization/groups/user_retrieve_response.rb +++ b/lib/openai/models/admin/organization/groups/user_retrieve_response.rb @@ -49,17 +49,23 @@ class UserRetrieveResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, email:, is_service_account:, name:, picture:, user_type:) # Details about a user returned from an organization group membership lookup. # - # @param id [String] Identifier for the user. + # @param id [String] + # Identifier for the user. # - # @param email [String, nil] Email address of the user, or `null` for users without an email. + # @param email [String, nil] + # Email address of the user, or `null` for users without an email. # - # @param is_service_account [Boolean, nil] Whether the user is a service account. + # @param is_service_account [Boolean, nil] + # Whether the user is a service account. # - # @param name [String] Display name of the user. + # @param name [String] + # Display name of the user. # - # @param picture [String, nil] URL of the user's profile picture, if available. + # @param picture [String, nil] + # URL of the user's profile picture, if available. # - # @param user_type [Symbol, OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::UserType] The type of user. + # @param user_type [Symbol, OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::UserType] + # The type of user. # The type of user. # diff --git a/lib/openai/models/admin/organization/invite.rb b/lib/openai/models/admin/organization/invite.rb index 2db8c688c..73b3b6ec0 100644 --- a/lib/openai/models/admin/organization/invite.rb +++ b/lib/openai/models/admin/organization/invite.rb @@ -63,24 +63,32 @@ class Invite < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, email:, projects:, role:, status:, accepted_at: nil, expires_at: nil, object: :"organization.invite") # Represents an individual `invite` to the organization. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the invite was sent. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the invite was sent. # - # @param email [String] The email address of the individual to whom the invite was sent + # @param email [String] + # The email address of the individual to whom the invite was sent # - # @param projects [Array] The projects that were granted membership upon acceptance of the invite. + # @param projects [Array] + # The projects that were granted membership upon acceptance of the invite. # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Invite::Role] `owner` or `reader` + # @param role [Symbol, OpenAI::Models::Admin::Organization::Invite::Role] + # `owner` or `reader` # - # @param status [Symbol, OpenAI::Models::Admin::Organization::Invite::Status] `accepted`,`expired`, or `pending` + # @param status [Symbol, OpenAI::Models::Admin::Organization::Invite::Status] + # `accepted`,`expired`, or `pending` # - # @param accepted_at [Integer, nil] The Unix timestamp (in seconds) of when the invite was accepted. + # @param accepted_at [Integer, nil] + # The Unix timestamp (in seconds) of when the invite was accepted. # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) of when the invite expires. + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) of when the invite expires. # - # @param object [Symbol, :"organization.invite"] The object type, which is always `organization.invite` - + # @param object [Symbol, :"organization.invite"] + # The object type, which is always `organization.invite` class Project < OpenAI::Internal::Type::BaseModel # @!attribute id # Project's public ID @@ -95,9 +103,11 @@ class Project < OpenAI::Internal::Type::BaseModel required :role, enum: -> { OpenAI::Admin::Organization::Invite::Project::Role } # @!method initialize(id:, role:) - # @param id [String] Project's public ID + # @param id [String] + # Project's public ID # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Invite::Project::Role] Project membership role + # @param role [Symbol, OpenAI::Models::Admin::Organization::Invite::Project::Role] + # Project membership role # Project membership role # diff --git a/lib/openai/models/admin/organization/invite_create_params.rb b/lib/openai/models/admin/organization/invite_create_params.rb index 94fe72ffb..228c8a785 100644 --- a/lib/openai/models/admin/organization/invite_create_params.rb +++ b/lib/openai/models/admin/organization/invite_create_params.rb @@ -34,14 +34,17 @@ class InviteCreateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(email:, role:, projects: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::InviteCreateParams} for more details. + # @param email [String] + # Send an email to this address # - # @param email [String] Send an email to this address + # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Role] + # `owner` or `reader` # - # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Role] `owner` or `reader` - # - # @param projects [Array] An array of projects to which membership is granted at the same time the org inv + # @param projects [Array] + # An array of projects to which membership is granted at the same time the org + # invite is accepted. If omitted, the user will be invited to the default project + # for compatibility with legacy behavior. If empty list is passed, the user will + # not be invited to any projects, including the default one. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -70,9 +73,11 @@ class Project < OpenAI::Internal::Type::BaseModel required :role, enum: -> { OpenAI::Admin::Organization::InviteCreateParams::Project::Role } # @!method initialize(id:, role:) - # @param id [String] Project's public ID + # @param id [String] + # Project's public ID # - # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Project::Role] Project membership role + # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Project::Role] + # Project membership role # Project membership role # diff --git a/lib/openai/models/admin/organization/invite_delete_response.rb b/lib/openai/models/admin/organization/invite_delete_response.rb index db94df74c..ede85dd96 100644 --- a/lib/openai/models/admin/organization/invite_delete_response.rb +++ b/lib/openai/models/admin/organization/invite_delete_response.rb @@ -27,7 +27,8 @@ class InviteDeleteResponse < OpenAI::Internal::Type::BaseModel # # @param deleted [Boolean] # - # @param object [Symbol, :"organization.invite.deleted"] The object type, which is always `organization.invite.deleted` + # @param object [Symbol, :"organization.invite.deleted"] + # The object type, which is always `organization.invite.deleted` end end end diff --git a/lib/openai/models/admin/organization/invite_list_params.rb b/lib/openai/models/admin/organization/invite_list_params.rb index a718de461..d4b085175 100644 --- a/lib/openai/models/admin/organization/invite_list_params.rb +++ b/lib/openai/models/admin/organization/invite_list_params.rb @@ -26,12 +26,15 @@ class InviteListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(after: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::InviteListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/organization_data_retention.rb b/lib/openai/models/admin/organization/organization_data_retention.rb index 981790379..4d740a6d4 100644 --- a/lib/openai/models/admin/organization/organization_data_retention.rb +++ b/lib/openai/models/admin/organization/organization_data_retention.rb @@ -21,9 +21,11 @@ class OrganizationDataRetention < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, object: :"organization.data_retention") # Represents the organization's data retention control setting. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::OrganizationDataRetention::Type] The configured organization data retention type. + # @param type [Symbol, OpenAI::Models::Admin::Organization::OrganizationDataRetention::Type] + # The configured organization data retention type. # - # @param object [Symbol, :"organization.data_retention"] The object type, which is always `organization.data_retention`. + # @param object [Symbol, :"organization.data_retention"] + # The object type, which is always `organization.data_retention`. # The configured organization data retention type. # diff --git a/lib/openai/models/admin/organization/organization_spend_alert.rb b/lib/openai/models/admin/organization/organization_spend_alert.rb index 70dc23e68..36c7458db 100644 --- a/lib/openai/models/admin/organization/organization_spend_alert.rb +++ b/lib/openai/models/admin/organization/organization_spend_alert.rb @@ -48,17 +48,23 @@ class OrganizationSpendAlert < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, currency:, interval:, notification_channel:, threshold_amount:, object: :"organization.spend_alert") # Represents a spend alert configured at the organization level. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::OrganizationSpendAlert::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::OrganizationSpendAlert::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # - # @param object [Symbol, :"organization.spend_alert"] The object type, which is always `organization.spend_alert`. + # @param object [Symbol, :"organization.spend_alert"] + # The object type, which is always `organization.spend_alert`. # The currency for the threshold amount. # @@ -107,11 +113,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/organization_spend_alert_deleted.rb b/lib/openai/models/admin/organization/organization_spend_alert_deleted.rb index 09446ae18..db4a0bf83 100644 --- a/lib/openai/models/admin/organization/organization_spend_alert_deleted.rb +++ b/lib/openai/models/admin/organization/organization_spend_alert_deleted.rb @@ -27,11 +27,14 @@ class OrganizationSpendAlertDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"organization.spend_alert.deleted") # Confirmation payload returned after deleting an organization spend alert. # - # @param id [String] The deleted spend alert ID. + # @param id [String] + # The deleted spend alert ID. # - # @param deleted [Boolean] Whether the spend alert was deleted. + # @param deleted [Boolean] + # Whether the spend alert was deleted. # - # @param object [Symbol, :"organization.spend_alert.deleted"] Always `organization.spend_alert.deleted`. + # @param object [Symbol, :"organization.spend_alert.deleted"] + # Always `organization.spend_alert.deleted`. end end diff --git a/lib/openai/models/admin/organization/organization_spend_limit.rb b/lib/openai/models/admin/organization/organization_spend_limit.rb index 7a5a4a32c..63bde7735 100644 --- a/lib/openai/models/admin/organization/organization_spend_limit.rb +++ b/lib/openai/models/admin/organization/organization_spend_limit.rb @@ -38,20 +38,23 @@ class OrganizationSpendLimit < OpenAI::Internal::Type::BaseModel required :threshold_amount, Integer # @!method initialize(currency:, enforcement:, interval:, threshold_amount:, object: :"organization.spend_limit") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::OrganizationSpendLimit} for more details. - # # Represents a hard spend limit configured at the organization level. # - # @param currency [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param currency [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param enforcement [OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement] The current enforcement state of the hard spend limit. + # @param enforcement [OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement] + # The current enforcement state of the hard spend limit. # - # @param interval [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Interval] The time interval for evaluating spend against the threshold. Currently, only `m + # @param interval [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # - # @param object [Symbol, :"organization.spend_limit"] The object type, which is always `organization.spend_limit`. + # @param object [Symbol, :"organization.spend_limit"] + # The object type, which is always `organization.spend_limit`. # The currency for the threshold amount. Currently, only `USD` is supported. # @@ -90,7 +93,8 @@ class Enforcement < OpenAI::Internal::Type::BaseModel # @!method initialize(status:) # The current enforcement state of the hard spend limit. # - # @param status [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status] Whether the hard spend limit is currently enforcing. + # @param status [String, Symbol, OpenAI::Models::Admin::Organization::OrganizationSpendLimit::Enforcement::Status] + # Whether the hard spend limit is currently enforcing. # Whether the hard spend limit is currently enforcing. # diff --git a/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb b/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb index 3afbb8504..2297af858 100644 --- a/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb +++ b/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb @@ -21,9 +21,11 @@ class OrganizationSpendLimitDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(deleted:, object: :"organization.spend_limit.deleted") # Confirmation payload returned after deleting an organization hard spend limit. # - # @param deleted [Boolean] Whether the hard spend limit was deleted. + # @param deleted [Boolean] + # Whether the hard spend limit was deleted. # - # @param object [Symbol, :"organization.spend_limit.deleted"] The object type, which is always `organization.spend_limit.deleted`. + # @param object [Symbol, :"organization.spend_limit.deleted"] + # The object type, which is always `organization.spend_limit.deleted`. end end diff --git a/lib/openai/models/admin/organization/organization_user.rb b/lib/openai/models/admin/organization/organization_user.rb index d535ecf17..8a945a215 100644 --- a/lib/openai/models/admin/organization/organization_user.rb +++ b/lib/openai/models/admin/organization/organization_user.rb @@ -105,37 +105,53 @@ class OrganizationUser < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, added_at:, api_key_last_used_at: nil, created: nil, developer_persona: nil, email: nil, is_default: nil, is_scale_tier_authorized_purchaser: nil, is_scim_managed: nil, is_service_account: nil, name: nil, projects: nil, role: nil, technical_level: nil, user: nil, object: :"organization.user") # Represents an individual `user` within an organization. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param added_at [Integer] The Unix timestamp (in seconds) of when the user was added. + # @param added_at [Integer] + # The Unix timestamp (in seconds) of when the user was added. # - # @param api_key_last_used_at [Integer, nil] The Unix timestamp (in seconds) of the user's last API key usage. + # @param api_key_last_used_at [Integer, nil] + # The Unix timestamp (in seconds) of the user's last API key usage. # - # @param created [Integer] The Unix timestamp (in seconds) of when the user was created. + # @param created [Integer] + # The Unix timestamp (in seconds) of when the user was created. # - # @param developer_persona [String, nil] The developer persona metadata for the user. + # @param developer_persona [String, nil] + # The developer persona metadata for the user. # - # @param email [String, nil] The email address of the user + # @param email [String, nil] + # The email address of the user # - # @param is_default [Boolean] Whether this is the organization's default user. + # @param is_default [Boolean] + # Whether this is the organization's default user. # - # @param is_scale_tier_authorized_purchaser [Boolean, nil] Whether the user is an authorized purchaser for Scale Tier. + # @param is_scale_tier_authorized_purchaser [Boolean, nil] + # Whether the user is an authorized purchaser for Scale Tier. # - # @param is_scim_managed [Boolean] Whether the user is managed through SCIM. + # @param is_scim_managed [Boolean] + # Whether the user is managed through SCIM. # - # @param is_service_account [Boolean] Whether the user is a service account. + # @param is_service_account [Boolean] + # Whether the user is a service account. # - # @param name [String, nil] The name of the user + # @param name [String, nil] + # The name of the user # - # @param projects [OpenAI::Models::Admin::Organization::OrganizationUser::Projects, nil] Projects associated with the user, if included. + # @param projects [OpenAI::Models::Admin::Organization::OrganizationUser::Projects, nil] + # Projects associated with the user, if included. # - # @param role [String, nil] `owner` or `reader` + # @param role [String, nil] + # `owner` or `reader` # - # @param technical_level [String, nil] The technical level metadata for the user. + # @param technical_level [String, nil] + # The technical level metadata for the user. # - # @param user [OpenAI::Models::Admin::Organization::OrganizationUser::User] Nested user details. + # @param user [OpenAI::Models::Admin::Organization::OrganizationUser::User] + # Nested user details. # - # @param object [Symbol, :"organization.user"] The object type, which is always `organization.user` + # @param object [Symbol, :"organization.user"] + # The object type, which is always `organization.user` # @see OpenAI::Models::Admin::Organization::OrganizationUser#projects class Projects < OpenAI::Internal::Type::BaseModel diff --git a/lib/openai/models/admin/organization/project.rb b/lib/openai/models/admin/organization/project.rb index 32093c795..0a890b489 100644 --- a/lib/openai/models/admin/organization/project.rb +++ b/lib/openai/models/admin/organization/project.rb @@ -57,21 +57,29 @@ class Project < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, archived_at: nil, external_key_id: nil, name: nil, residency: nil, status: nil, object: :"organization.project") # Represents an individual project. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the project was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the project was created. # - # @param archived_at [Integer, nil] The Unix timestamp (in seconds) of when the project was archived or `null`. + # @param archived_at [Integer, nil] + # The Unix timestamp (in seconds) of when the project was archived or `null`. # - # @param external_key_id [String, nil] The external key associated with the project. + # @param external_key_id [String, nil] + # The external key associated with the project. # - # @param name [String, nil] The name of the project. This appears in reporting. + # @param name [String, nil] + # The name of the project. This appears in reporting. # - # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency] The residency configuration for the project. + # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency] + # The residency configuration for the project. # - # @param status [String, nil] `active` or `archived` + # @param status [String, nil] + # `active` or `archived` # - # @param object [Symbol, :"organization.project"] The object type, which is always `organization.project` + # @param object [Symbol, :"organization.project"] + # The object type, which is always `organization.project` end end end diff --git a/lib/openai/models/admin/organization/project_create_params.rb b/lib/openai/models/admin/organization/project_create_params.rb index b02725875..a124081c7 100644 --- a/lib/openai/models/admin/organization/project_create_params.rb +++ b/lib/openai/models/admin/organization/project_create_params.rb @@ -26,7 +26,7 @@ class ProjectCreateParams < OpenAI::Internal::Type::BaseModel # # Create the project with the specified data residency region. Your organization # must have access to Data residency functionality in order to use. See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. Deprecated: # use `residency` instead. Do not provide both `geography` and `residency`. # @@ -37,23 +37,32 @@ class ProjectCreateParams < OpenAI::Internal::Type::BaseModel # Create the project with the specified residency configuration. Your organization # must have access to the requested residency configuration in order to use it. # See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. # # @return [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency, nil] optional :residency, enum: -> { OpenAI::Admin::Organization::ProjectResidency }, nil?: true # @!method initialize(name:, external_key_id: nil, geography: nil, residency: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectCreateParams} for more details. + # @param name [String] + # The friendly name of the project, this name appears in reports. # - # @param name [String] The friendly name of the project, this name appears in reports. + # @param external_key_id [String, nil] + # External key ID to associate with the project. # - # @param external_key_id [String, nil] External key ID to associate with the project. + # @param geography [String, nil] + # Create the project with the specified data residency region. Your organization + # must have access to Data residency functionality in order to use. See + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) + # to review the functionality and limitations of setting this field. Deprecated: + # use `residency` instead. Do not provide both `geography` and `residency`. # - # @param geography [String, nil] Create the project with the specified data residency region. Your organization m - # - # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency, nil] Create the project with the specified residency configuration. Your organization + # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency, nil] + # Create the project with the specified residency configuration. Your organization + # must have access to the requested residency configuration in order to use it. + # See + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) + # to review the functionality and limitations of setting this field. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/project_list_params.rb b/lib/openai/models/admin/organization/project_list_params.rb index d1aaf79b6..0d4b6a8ea 100644 --- a/lib/openai/models/admin/organization/project_list_params.rb +++ b/lib/openai/models/admin/organization/project_list_params.rb @@ -33,14 +33,19 @@ class ProjectListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(after: nil, include_archived: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param include_archived [Boolean] + # If `true` returns all projects including those that have been `archived`. + # Archived projects are not included by default. # - # @param include_archived [Boolean] If `true` returns all projects including those that have been `archived`. Archiv - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/project_update_params.rb b/lib/openai/models/admin/organization/project_update_params.rb index 6a4784f2d..63b607e25 100644 --- a/lib/openai/models/admin/organization/project_update_params.rb +++ b/lib/openai/models/admin/organization/project_update_params.rb @@ -36,16 +36,17 @@ class ProjectUpdateParams < OpenAI::Internal::Type::BaseModel optional :name, String, nil?: true # @!method initialize(project_id:, external_key_id: nil, geography: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectUpdateParams} for more details. - # # @param project_id [String] # - # @param external_key_id [String, nil] External key ID to associate with the project. + # @param external_key_id [String, nil] + # External key ID to associate with the project. # - # @param geography [String, nil] Geography for the project. + # @param geography [String, nil] + # Geography for the project. Deprecated: use `residency` when creating a project + # to configure data residency. This field is retained for backward compatibility. # - # @param name [String, nil] The updated name of the project, this name appears in reports. + # @param name [String, nil] + # The updated name of the project, this name appears in reports. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/api_key_list_params.rb b/lib/openai/models/admin/organization/projects/api_key_list_params.rb index 7bced974a..4e3baca8a 100644 --- a/lib/openai/models/admin/organization/projects/api_key_list_params.rb +++ b/lib/openai/models/admin/organization/projects/api_key_list_params.rb @@ -45,17 +45,24 @@ class APIKeyListParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(project_id:, after: nil, limit: nil, owner_project_access: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::APIKeyListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::APIKeyListParams::OwnerProjectAccess] Filter API keys by whether the owner currently has effective access to the proje + # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::APIKeyListParams::OwnerProjectAccess] + # Filter API keys by whether the owner currently has effective access to the + # project. Use `active` for owners with access, `inactive` for owners without + # access, or `any` for all enabled project API keys. If omitted, the endpoint + # applies its existing membership-based visibility rules, which may exclude some + # enabled keys. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/certificate_activate_response.rb b/lib/openai/models/admin/organization/projects/certificate_activate_response.rb index d77056461..bf02e61e1 100644 --- a/lib/openai/models/admin/organization/projects/certificate_activate_response.rb +++ b/lib/openai/models/admin/organization/projects/certificate_activate_response.rb @@ -48,17 +48,22 @@ class CertificateActivateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.project.certificate") # Represents an individual certificate configured at the project level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the project level. + # @param active [Boolean] + # Whether the certificate is currently active at the project level. # # @param certificate_details [OpenAI::Models::Admin::Organization::Projects::CertificateActivateResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.project.certificate"] The object type, which is always `organization.project.certificate`. + # @param object [Symbol, :"organization.project.certificate"] + # The object type, which is always `organization.project.certificate`. # @see OpenAI::Models::Admin::Organization::Projects::CertificateActivateResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -75,9 +80,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/projects/certificate_deactivate_response.rb b/lib/openai/models/admin/organization/projects/certificate_deactivate_response.rb index cabe723f7..7047298f7 100644 --- a/lib/openai/models/admin/organization/projects/certificate_deactivate_response.rb +++ b/lib/openai/models/admin/organization/projects/certificate_deactivate_response.rb @@ -48,17 +48,22 @@ class CertificateDeactivateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.project.certificate") # Represents an individual certificate configured at the project level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the project level. + # @param active [Boolean] + # Whether the certificate is currently active at the project level. # # @param certificate_details [OpenAI::Models::Admin::Organization::Projects::CertificateDeactivateResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.project.certificate"] The object type, which is always `organization.project.certificate`. + # @param object [Symbol, :"organization.project.certificate"] + # The object type, which is always `organization.project.certificate`. # @see OpenAI::Models::Admin::Organization::Projects::CertificateDeactivateResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -75,9 +80,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/projects/certificate_list_params.rb b/lib/openai/models/admin/organization/projects/certificate_list_params.rb index 6cabca969..7bfcbd7e6 100644 --- a/lib/openai/models/admin/organization/projects/certificate_list_params.rb +++ b/lib/openai/models/admin/organization/projects/certificate_list_params.rb @@ -39,17 +39,21 @@ class CertificateListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::CertificateListParams::Order } # @!method initialize(project_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::CertificateListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::CertificateListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::CertificateListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/certificate_list_response.rb b/lib/openai/models/admin/organization/projects/certificate_list_response.rb index f366fc90f..f1774be61 100644 --- a/lib/openai/models/admin/organization/projects/certificate_list_response.rb +++ b/lib/openai/models/admin/organization/projects/certificate_list_response.rb @@ -48,17 +48,22 @@ class CertificateListResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, active:, certificate_details:, created_at:, name:, object: :"organization.project.certificate") # Represents an individual certificate configured at the project level. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param active [Boolean] Whether the certificate is currently active at the project level. + # @param active [Boolean] + # Whether the certificate is currently active at the project level. # # @param certificate_details [OpenAI::Models::Admin::Organization::Projects::CertificateListResponse::CertificateDetails] # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the certificate was uploaded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the certificate was uploaded. # - # @param name [String, nil] The name of the certificate. + # @param name [String, nil] + # The name of the certificate. # - # @param object [Symbol, :"organization.project.certificate"] The object type, which is always `organization.project.certificate`. + # @param object [Symbol, :"organization.project.certificate"] + # The object type, which is always `organization.project.certificate`. # @see OpenAI::Models::Admin::Organization::Projects::CertificateListResponse#certificate_details class CertificateDetails < OpenAI::Internal::Type::BaseModel @@ -75,9 +80,11 @@ class CertificateDetails < OpenAI::Internal::Type::BaseModel optional :valid_at, Integer # @!method initialize(expires_at: nil, valid_at: nil) - # @param expires_at [Integer] The Unix timestamp (in seconds) of when the certificate expires. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) of when the certificate expires. # - # @param valid_at [Integer] The Unix timestamp (in seconds) of when the certificate becomes valid. + # @param valid_at [Integer] + # The Unix timestamp (in seconds) of when the certificate becomes valid. end end end diff --git a/lib/openai/models/admin/organization/projects/data_retention_update_params.rb b/lib/openai/models/admin/organization/projects/data_retention_update_params.rb index dff9d50af..89aa2410e 100644 --- a/lib/openai/models/admin/organization/projects/data_retention_update_params.rb +++ b/lib/openai/models/admin/organization/projects/data_retention_update_params.rb @@ -27,7 +27,8 @@ class DataRetentionUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, retention_type:, request_options: {}) # @param project_id [String] # - # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::Projects::DataRetentionUpdateParams::RetentionType] The desired project data retention type. + # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::Projects::DataRetentionUpdateParams::RetentionType] + # The desired project data retention type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/group_create_params.rb b/lib/openai/models/admin/organization/projects/group_create_params.rb index d837d4c76..00a4822ce 100644 --- a/lib/openai/models/admin/organization/projects/group_create_params.rb +++ b/lib/openai/models/admin/organization/projects/group_create_params.rb @@ -30,9 +30,11 @@ class GroupCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, group_id:, role:, request_options: {}) # @param project_id [String] # - # @param group_id [String] Identifier of the group to add to the project. + # @param group_id [String] + # Identifier of the group to add to the project. # - # @param role [String] Identifier of the project role to grant to the group. + # @param role [String] + # Identifier of the project role to grant to the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/group_delete_response.rb b/lib/openai/models/admin/organization/projects/group_delete_response.rb index e3fb74e0d..e5e93d205 100644 --- a/lib/openai/models/admin/organization/projects/group_delete_response.rb +++ b/lib/openai/models/admin/organization/projects/group_delete_response.rb @@ -22,9 +22,11 @@ class GroupDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(deleted:, object: :"project.group.deleted") # Confirmation payload returned after removing a group from a project. # - # @param deleted [Boolean] Whether the group membership in the project was removed. + # @param deleted [Boolean] + # Whether the group membership in the project was removed. # - # @param object [Symbol, :"project.group.deleted"] Always `project.group.deleted`. + # @param object [Symbol, :"project.group.deleted"] + # Always `project.group.deleted`. end end end diff --git a/lib/openai/models/admin/organization/projects/group_list_params.rb b/lib/openai/models/admin/organization/projects/group_list_params.rb index d41acc712..895b2d6ee 100644 --- a/lib/openai/models/admin/organization/projects/group_list_params.rb +++ b/lib/openai/models/admin/organization/projects/group_list_params.rb @@ -35,17 +35,17 @@ class GroupListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::GroupListParams::Order } # @!method initialize(project_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::GroupListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] Cursor for pagination. Provide the ID of the last group from the previous respon + # @param after [String] + # Cursor for pagination. Provide the ID of the last group from the previous + # response to fetch the next page. # - # @param limit [Integer] A limit on the number of project groups to return. Defaults to 20. + # @param limit [Integer] + # A limit on the number of project groups to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupListParams::Order] Sort order for the returned groups. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupListParams::Order] + # Sort order for the returned groups. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/group_retrieve_params.rb b/lib/openai/models/admin/organization/projects/group_retrieve_params.rb index 5a05acf47..05f57f6a7 100644 --- a/lib/openai/models/admin/organization/projects/group_retrieve_params.rb +++ b/lib/openai/models/admin/organization/projects/group_retrieve_params.rb @@ -31,7 +31,8 @@ class GroupRetrieveParams < OpenAI::Internal::Type::BaseModel # # @param group_id [String] # - # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupRetrieveParams::GroupType] The type of group to retrieve. + # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupRetrieveParams::GroupType] + # The type of group to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/groups/role_create_params.rb b/lib/openai/models/admin/organization/projects/groups/role_create_params.rb index 991b0f88f..ee4be9c12 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_create_params.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_create_params.rb @@ -32,7 +32,8 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel # # @param group_id [String] # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/groups/role_create_response.rb b/lib/openai/models/admin/organization/projects/groups/role_create_response.rb index 0a7efbfcb..94c4e411b 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_create_response.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_create_response.rb @@ -29,11 +29,14 @@ class RoleCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(group:, role:, object: :"group.role") # Role assignment linking a group to a role. # - # @param group [OpenAI::Models::Admin::Organization::Projects::Groups::RoleCreateResponse::Group] Summary information about a group returned in role assignment responses. + # @param group [OpenAI::Models::Admin::Organization::Projects::Groups::RoleCreateResponse::Group] + # Summary information about a group returned in role assignment responses. # - # @param role [OpenAI::Models::Admin::Organization::Role] Details about a role that can be assigned through the public Roles API. + # @param role [OpenAI::Models::Admin::Organization::Role] + # Details about a role that can be assigned through the public Roles API. # - # @param object [Symbol, :"group.role"] Always `group.role`. + # @param object [Symbol, :"group.role"] + # Always `group.role`. # @see OpenAI::Models::Admin::Organization::Projects::Groups::RoleCreateResponse#group class Group < OpenAI::Internal::Type::BaseModel @@ -70,15 +73,20 @@ class Group < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, name:, scim_managed:, object: :group) # Summary information about a group returned in role assignment responses. # - # @param id [String] Identifier for the group. + # @param id [String] + # Identifier for the group. # - # @param created_at [Integer] Unix timestamp (in seconds) when the group was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the group was created. # - # @param name [String] Display name of the group. + # @param name [String] + # Display name of the group. # - # @param scim_managed [Boolean] Whether the group is managed through SCIM. + # @param scim_managed [Boolean] + # Whether the group is managed through SCIM. # - # @param object [Symbol, :group] Always `group`. + # @param object [Symbol, :group] + # Always `group`. end end end diff --git a/lib/openai/models/admin/organization/projects/groups/role_delete_response.rb b/lib/openai/models/admin/organization/projects/groups/role_delete_response.rb index 7ba501b99..d8be8f993 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_delete_response.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_delete_response.rb @@ -22,15 +22,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, String # @!method initialize(deleted:, object:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Groups::RoleDeleteResponse} for - # more details. - # # Confirmation payload returned after unassigning a role. # - # @param deleted [Boolean] Whether the assignment was removed. + # @param deleted [Boolean] + # Whether the assignment was removed. # - # @param object [String] Identifier for the deleted assignment, such as `group.role.deleted` or `user.rol + # @param object [String] + # Identifier for the deleted assignment, such as `group.role.deleted` or + # `user.role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/projects/groups/role_list_params.rb b/lib/openai/models/admin/organization/projects/groups/role_list_params.rb index 5a56d15b3..963b209f1 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_list_params.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_list_params.rb @@ -41,19 +41,19 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::Groups::RoleListParams::Order } # @!method initialize(project_id:, group_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams} for more - # details. - # # @param project_id [String] # # @param group_id [String] # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing project roles. # - # @param limit [Integer] A limit on the number of project role assignments to return. + # @param limit [Integer] + # A limit on the number of project role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams::Order] Sort order for the returned project roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams::Order] + # Sort order for the returned project roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/groups/role_list_response.rb b/lib/openai/models/admin/organization/projects/groups/role_list_response.rb index f4d5fa56d..c254902e7 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_list_response.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_list_response.rb @@ -96,30 +96,41 @@ class RoleListResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb b/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb index 2bc29c005..a189693b0 100644 --- a/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb +++ b/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb @@ -96,30 +96,41 @@ class RoleRetrieveResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rb b/lib/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rb index 9d00cae69..3ef74c4ae 100644 --- a/lib/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rb +++ b/lib/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rb @@ -76,15 +76,20 @@ class HostedToolPermissionUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, code_interpreter: nil, file_search: nil, image_generation: nil, mcp: nil, web_search: nil, request_options: {}) # @param project_id [String] # - # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::CodeInterpreter, nil] The code interpreter permission update. + # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::CodeInterpreter, nil] + # The code interpreter permission update. # - # @param file_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::FileSearch, nil] The file search permission update. + # @param file_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::FileSearch, nil] + # The file search permission update. # - # @param image_generation [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::ImageGeneration, nil] The image generation permission update. + # @param image_generation [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::ImageGeneration, nil] + # The image generation permission update. # - # @param mcp [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::Mcp, nil] The MCP permission update. + # @param mcp [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::Mcp, nil] + # The MCP permission update. # - # @param web_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::WebSearch, nil] The web search permission update. + # @param web_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::WebSearch, nil] + # The web search permission update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -98,7 +103,8 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # The code interpreter permission update. # - # @param enabled [Boolean] Whether to enable the hosted tool for the project. + # @param enabled [Boolean] + # Whether to enable the hosted tool for the project. end class FileSearch < OpenAI::Internal::Type::BaseModel @@ -111,7 +117,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # The file search permission update. # - # @param enabled [Boolean] Whether to enable the hosted tool for the project. + # @param enabled [Boolean] + # Whether to enable the hosted tool for the project. end class ImageGeneration < OpenAI::Internal::Type::BaseModel @@ -124,7 +131,8 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # The image generation permission update. # - # @param enabled [Boolean] Whether to enable the hosted tool for the project. + # @param enabled [Boolean] + # Whether to enable the hosted tool for the project. end class Mcp < OpenAI::Internal::Type::BaseModel @@ -137,7 +145,8 @@ class Mcp < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # The MCP permission update. # - # @param enabled [Boolean] Whether to enable the hosted tool for the project. + # @param enabled [Boolean] + # Whether to enable the hosted tool for the project. end class WebSearch < OpenAI::Internal::Type::BaseModel @@ -150,7 +159,8 @@ class WebSearch < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # The web search permission update. # - # @param enabled [Boolean] Whether to enable the hosted tool for the project. + # @param enabled [Boolean] + # Whether to enable the hosted tool for the project. end end end diff --git a/lib/openai/models/admin/organization/projects/model_permission_update_params.rb b/lib/openai/models/admin/organization/projects/model_permission_update_params.rb index 2cb7dfa1d..83cf05b90 100644 --- a/lib/openai/models/admin/organization/projects/model_permission_update_params.rb +++ b/lib/openai/models/admin/organization/projects/model_permission_update_params.rb @@ -30,9 +30,11 @@ class ModelPermissionUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, mode:, model_ids:, request_options: {}) # @param project_id [String] # - # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ModelPermissionUpdateParams::Mode] The model permissions mode to apply. + # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ModelPermissionUpdateParams::Mode] + # The model permissions mode to apply. # - # @param model_ids [Array] The model IDs included in this permissions policy. + # @param model_ids [Array] + # The model IDs included in this permissions policy. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/project_api_key.rb b/lib/openai/models/admin/organization/projects/project_api_key.rb index 41f96993b..d217e2fec 100644 --- a/lib/openai/models/admin/organization/projects/project_api_key.rb +++ b/lib/openai/models/admin/organization/projects/project_api_key.rb @@ -57,24 +57,42 @@ class ProjectAPIKey < OpenAI::Internal::Type::BaseModel # @return [String] required :redacted_value, String - # @!method initialize(id:, created_at:, last_used_at:, name:, owner:, owner_project_access:, redacted_value:, object: :"organization.project.api_key") + # @!attribute expires_at + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + # + # @return [Integer, nil] + optional :expires_at, Integer, nil?: true + + # @!method initialize(id:, created_at:, last_used_at:, name:, owner:, owner_project_access:, redacted_value:, expires_at: nil, object: :"organization.project.api_key") # Represents an individual API key in a project. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the API key was created + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the API key was created # - # @param last_used_at [Integer, nil] The Unix timestamp (in seconds) of when the API key was last used. + # @param last_used_at [Integer, nil] + # The Unix timestamp (in seconds) of when the API key was last used. # - # @param name [String] The name of the API key + # @param name [String] + # The name of the API key # # @param owner [OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner] # - # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::OwnerProjectAccess] Whether the API key's owner currently has effective access to the project. + # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::OwnerProjectAccess] + # Whether the API key's owner currently has effective access to the project. + # + # @param redacted_value [String] + # The redacted value of the API key # - # @param redacted_value [String] The redacted value of the API key + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. # - # @param object [Symbol, :"organization.project.api_key"] The object type, which is always `organization.project.api_key` + # @param object [Symbol, :"organization.project.api_key"] + # The object type, which is always `organization.project.api_key` # @see OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey#owner class Owner < OpenAI::Internal::Type::BaseModel @@ -100,11 +118,14 @@ class Owner < OpenAI::Internal::Type::BaseModel optional :user, -> { OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner::User } # @!method initialize(service_account: nil, type: nil, user: nil) - # @param service_account [OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::ServiceAccount] The service account that owns a project API key. + # @param service_account [OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::ServiceAccount] + # The service account that owns a project API key. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::Type] `user` or `service_account` + # @param type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::Type] + # `user` or `service_account` # - # @param user [OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::User] The user that owns a project API key. + # @param user [OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner::User] + # The user that owns a project API key. # @see OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::Owner#service_account class ServiceAccount < OpenAI::Internal::Type::BaseModel @@ -135,13 +156,17 @@ class ServiceAccount < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, name:, role:) # The service account that owns a project API key. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the service account was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the service account was created. # - # @param name [String] The name of the service account. + # @param name [String] + # The name of the service account. # - # @param role [String] The service account's project role. + # @param role [String] + # The service account's project role. end # `user` or `service_account` @@ -192,15 +217,20 @@ class User < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, email:, name:, role:) # The user that owns a project API key. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the user was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the user was created. # - # @param email [String] The email address of the user. + # @param email [String] + # The email address of the user. # - # @param name [String] The name of the user. + # @param name [String] + # The name of the user. # - # @param role [String] The user's project role. + # @param role [String] + # The user's project role. end end diff --git a/lib/openai/models/admin/organization/projects/project_data_retention.rb b/lib/openai/models/admin/organization/projects/project_data_retention.rb index 9152041fe..17d8c782a 100644 --- a/lib/openai/models/admin/organization/projects/project_data_retention.rb +++ b/lib/openai/models/admin/organization/projects/project_data_retention.rb @@ -22,9 +22,11 @@ class ProjectDataRetention < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, object: :"project.data_retention") # Represents a project's data retention control setting. # - # @param type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectDataRetention::Type] The configured project data retention type. + # @param type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectDataRetention::Type] + # The configured project data retention type. # - # @param object [Symbol, :"project.data_retention"] The object type, which is always `project.data_retention`. + # @param object [Symbol, :"project.data_retention"] + # The object type, which is always `project.data_retention`. # The configured project data retention type. # diff --git a/lib/openai/models/admin/organization/projects/project_group.rb b/lib/openai/models/admin/organization/projects/project_group.rb index 92a7b487f..b1a0a55f5 100644 --- a/lib/openai/models/admin/organization/projects/project_group.rb +++ b/lib/openai/models/admin/organization/projects/project_group.rb @@ -46,17 +46,23 @@ class ProjectGroup < OpenAI::Internal::Type::BaseModel # @!method initialize(created_at:, group_id:, group_name:, group_type:, project_id:, object: :"project.group") # Details about a group's membership in a project. # - # @param created_at [Integer] Unix timestamp (in seconds) when the group was granted project access. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the group was granted project access. # - # @param group_id [String] Identifier of the group that has access to the project. + # @param group_id [String] + # Identifier of the group that has access to the project. # - # @param group_name [String] Display name of the group. + # @param group_name [String] + # Display name of the group. # - # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectGroup::GroupType] The type of the group. + # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectGroup::GroupType] + # The type of the group. # - # @param project_id [String] Identifier of the project. + # @param project_id [String] + # Identifier of the project. # - # @param object [Symbol, :"project.group"] Always `project.group`. + # @param object [Symbol, :"project.group"] + # Always `project.group`. # The type of the group. # diff --git a/lib/openai/models/admin/organization/projects/project_hosted_tool_permissions.rb b/lib/openai/models/admin/organization/projects/project_hosted_tool_permissions.rb index a929e25b9..b728a38b9 100644 --- a/lib/openai/models/admin/organization/projects/project_hosted_tool_permissions.rb +++ b/lib/openai/models/admin/organization/projects/project_hosted_tool_permissions.rb @@ -52,15 +52,20 @@ class ProjectHostedToolPermissions < OpenAI::Internal::Type::BaseModel # @!method initialize(code_interpreter:, file_search:, image_generation:, mcp:, web_search:) # Represents hosted tool permissions for a project. # - # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::CodeInterpreter] Permission state for a single hosted tool on a project. + # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::CodeInterpreter] + # Permission state for a single hosted tool on a project. # - # @param file_search [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::FileSearch] Permission state for a single hosted tool on a project. + # @param file_search [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::FileSearch] + # Permission state for a single hosted tool on a project. # - # @param image_generation [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::ImageGeneration] Permission state for a single hosted tool on a project. + # @param image_generation [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::ImageGeneration] + # Permission state for a single hosted tool on a project. # - # @param mcp [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::Mcp] Permission state for a single hosted tool on a project. + # @param mcp [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::Mcp] + # Permission state for a single hosted tool on a project. # - # @param web_search [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::WebSearch] Permission state for a single hosted tool on a project. + # @param web_search [OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions::WebSearch] + # Permission state for a single hosted tool on a project. # @see OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel @@ -73,7 +78,8 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Permission state for a single hosted tool on a project. # - # @param enabled [Boolean] Whether the hosted tool is enabled for the project. + # @param enabled [Boolean] + # Whether the hosted tool is enabled for the project. end # @see OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions#file_search @@ -87,7 +93,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Permission state for a single hosted tool on a project. # - # @param enabled [Boolean] Whether the hosted tool is enabled for the project. + # @param enabled [Boolean] + # Whether the hosted tool is enabled for the project. end # @see OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions#image_generation @@ -101,7 +108,8 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Permission state for a single hosted tool on a project. # - # @param enabled [Boolean] Whether the hosted tool is enabled for the project. + # @param enabled [Boolean] + # Whether the hosted tool is enabled for the project. end # @see OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions#mcp @@ -115,7 +123,8 @@ class Mcp < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Permission state for a single hosted tool on a project. # - # @param enabled [Boolean] Whether the hosted tool is enabled for the project. + # @param enabled [Boolean] + # Whether the hosted tool is enabled for the project. end # @see OpenAI::Models::Admin::Organization::Projects::ProjectHostedToolPermissions#web_search @@ -129,7 +138,8 @@ class WebSearch < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Permission state for a single hosted tool on a project. # - # @param enabled [Boolean] Whether the hosted tool is enabled for the project. + # @param enabled [Boolean] + # Whether the hosted tool is enabled for the project. end end end diff --git a/lib/openai/models/admin/organization/projects/project_model_permissions.rb b/lib/openai/models/admin/organization/projects/project_model_permissions.rb index dc6899cf2..a2a562d12 100644 --- a/lib/openai/models/admin/organization/projects/project_model_permissions.rb +++ b/lib/openai/models/admin/organization/projects/project_model_permissions.rb @@ -28,11 +28,14 @@ class ProjectModelPermissions < OpenAI::Internal::Type::BaseModel # @!method initialize(mode:, model_ids:, object: :"project.model_permissions") # Represents the model allowlist or denylist policy for a project. # - # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectModelPermissions::Mode] Whether the project uses an allowlist or a denylist. + # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectModelPermissions::Mode] + # Whether the project uses an allowlist or a denylist. # - # @param model_ids [Array] The model IDs included in the model permissions policy. + # @param model_ids [Array] + # The model IDs included in the model permissions policy. # - # @param object [Symbol, :"project.model_permissions"] The object type, which is always `project.model_permissions`. + # @param object [Symbol, :"project.model_permissions"] + # The object type, which is always `project.model_permissions`. # Whether the project uses an allowlist or a denylist. # diff --git a/lib/openai/models/admin/organization/projects/project_model_permissions_deleted.rb b/lib/openai/models/admin/organization/projects/project_model_permissions_deleted.rb index fdc796efa..a3dea0bf0 100644 --- a/lib/openai/models/admin/organization/projects/project_model_permissions_deleted.rb +++ b/lib/openai/models/admin/organization/projects/project_model_permissions_deleted.rb @@ -22,9 +22,11 @@ class ProjectModelPermissionsDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(deleted:, object: :"project.model_permissions.deleted") # Confirmation payload returned after deleting project model permissions. # - # @param deleted [Boolean] Whether the project model permissions were deleted. + # @param deleted [Boolean] + # Whether the project model permissions were deleted. # - # @param object [Symbol, :"project.model_permissions.deleted"] The object type, which is always `project.model_permissions.deleted`. + # @param object [Symbol, :"project.model_permissions.deleted"] + # The object type, which is always `project.model_permissions.deleted`. end end diff --git a/lib/openai/models/admin/organization/projects/project_rate_limit.rb b/lib/openai/models/admin/organization/projects/project_rate_limit.rb index 81671954e..b62774fef 100644 --- a/lib/openai/models/admin/organization/projects/project_rate_limit.rb +++ b/lib/openai/models/admin/organization/projects/project_rate_limit.rb @@ -64,23 +64,32 @@ class ProjectRateLimit < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, max_requests_per_1_minute:, max_tokens_per_1_minute:, model:, batch_1_day_max_input_tokens: nil, max_audio_megabytes_per_1_minute: nil, max_images_per_1_minute: nil, max_requests_per_1_day: nil, object: :"project.rate_limit") # Represents a project rate limit config. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param max_requests_per_1_minute [Integer] The maximum requests per minute. + # @param max_requests_per_1_minute [Integer] + # The maximum requests per minute. # - # @param max_tokens_per_1_minute [Integer] The maximum tokens per minute. + # @param max_tokens_per_1_minute [Integer] + # The maximum tokens per minute. # - # @param model [String] The model this rate limit applies to. + # @param model [String] + # The model this rate limit applies to. # - # @param batch_1_day_max_input_tokens [Integer] The maximum batch input tokens per day. Only present for relevant models. + # @param batch_1_day_max_input_tokens [Integer] + # The maximum batch input tokens per day. Only present for relevant models. # - # @param max_audio_megabytes_per_1_minute [Integer] The maximum audio megabytes per minute. Only present for relevant models. + # @param max_audio_megabytes_per_1_minute [Integer] + # The maximum audio megabytes per minute. Only present for relevant models. # - # @param max_images_per_1_minute [Integer] The maximum images per minute. Only present for relevant models. + # @param max_images_per_1_minute [Integer] + # The maximum images per minute. Only present for relevant models. # - # @param max_requests_per_1_day [Integer] The maximum requests per day. Only present for relevant models. + # @param max_requests_per_1_day [Integer] + # The maximum requests per day. Only present for relevant models. # - # @param object [Symbol, :"project.rate_limit"] The object type, which is always `project.rate_limit` + # @param object [Symbol, :"project.rate_limit"] + # The object type, which is always `project.rate_limit` end end diff --git a/lib/openai/models/admin/organization/projects/project_service_account.rb b/lib/openai/models/admin/organization/projects/project_service_account.rb index aac1591c8..867b5dece 100644 --- a/lib/openai/models/admin/organization/projects/project_service_account.rb +++ b/lib/openai/models/admin/organization/projects/project_service_account.rb @@ -40,15 +40,20 @@ class ProjectServiceAccount < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, name:, role:, object: :"organization.project.service_account") # Represents an individual service account in a project. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the service account was created + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the service account was created # - # @param name [String] The name of the service account + # @param name [String] + # The name of the service account # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectServiceAccount::Role] `owner`, `member`, or `none` + # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectServiceAccount::Role] + # `owner`, `member`, or `none` # - # @param object [Symbol, :"organization.project.service_account"] The object type, which is always `organization.project.service_account` + # @param object [Symbol, :"organization.project.service_account"] + # The object type, which is always `organization.project.service_account` # `owner`, `member`, or `none` # diff --git a/lib/openai/models/admin/organization/projects/project_spend_alert.rb b/lib/openai/models/admin/organization/projects/project_spend_alert.rb index 937198c23..5542129d4 100644 --- a/lib/openai/models/admin/organization/projects/project_spend_alert.rb +++ b/lib/openai/models/admin/organization/projects/project_spend_alert.rb @@ -49,17 +49,23 @@ class ProjectSpendAlert < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, currency:, interval:, notification_channel:, threshold_amount:, object: :"project.spend_alert") # Represents a spend alert configured at the project level. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # - # @param object [Symbol, :"project.spend_alert"] The object type, which is always `project.spend_alert`. + # @param object [Symbol, :"project.spend_alert"] + # The object type, which is always `project.spend_alert`. # The currency for the threshold amount. # @@ -108,11 +114,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/projects/project_spend_alert_deleted.rb b/lib/openai/models/admin/organization/projects/project_spend_alert_deleted.rb index 3a71f730f..aa709f253 100644 --- a/lib/openai/models/admin/organization/projects/project_spend_alert_deleted.rb +++ b/lib/openai/models/admin/organization/projects/project_spend_alert_deleted.rb @@ -28,11 +28,14 @@ class ProjectSpendAlertDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"project.spend_alert.deleted") # Confirmation payload returned after deleting a project spend alert. # - # @param id [String] The deleted spend alert ID. + # @param id [String] + # The deleted spend alert ID. # - # @param deleted [Boolean] Whether the spend alert was deleted. + # @param deleted [Boolean] + # Whether the spend alert was deleted. # - # @param object [Symbol, :"project.spend_alert.deleted"] Always `project.spend_alert.deleted`. + # @param object [Symbol, :"project.spend_alert.deleted"] + # Always `project.spend_alert.deleted`. end end diff --git a/lib/openai/models/admin/organization/projects/project_spend_limit.rb b/lib/openai/models/admin/organization/projects/project_spend_limit.rb index 34d52ce86..557dedd92 100644 --- a/lib/openai/models/admin/organization/projects/project_spend_limit.rb +++ b/lib/openai/models/admin/organization/projects/project_spend_limit.rb @@ -39,21 +39,23 @@ class ProjectSpendLimit < OpenAI::Internal::Type::BaseModel required :threshold_amount, Integer # @!method initialize(currency:, enforcement:, interval:, threshold_amount:, object: :"project.spend_limit") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit} for more - # details. - # # Represents a hard spend limit configured at the project level. # - # @param currency [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param currency [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param enforcement [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement] The current enforcement state of the hard spend limit. + # @param enforcement [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement] + # The current enforcement state of the hard spend limit. # - # @param interval [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Interval] The time interval for evaluating spend against the threshold. Currently, only `m + # @param interval [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # - # @param object [Symbol, :"project.spend_limit"] The object type, which is always `project.spend_limit`. + # @param object [Symbol, :"project.spend_limit"] + # The object type, which is always `project.spend_limit`. # The currency for the threshold amount. Currently, only `USD` is supported. # @@ -95,7 +97,8 @@ class Enforcement < OpenAI::Internal::Type::BaseModel # @!method initialize(status:) # The current enforcement state of the hard spend limit. # - # @param status [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status] Whether the hard spend limit is currently enforcing. + # @param status [String, Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::Enforcement::Status] + # Whether the hard spend limit is currently enforcing. # Whether the hard spend limit is currently enforcing. # diff --git a/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb b/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb index a127f022f..0a4396088 100644 --- a/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb +++ b/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb @@ -22,9 +22,11 @@ class ProjectSpendLimitDeleted < OpenAI::Internal::Type::BaseModel # @!method initialize(deleted:, object: :"project.spend_limit.deleted") # Confirmation payload returned after deleting a project hard spend limit. # - # @param deleted [Boolean] Whether the hard spend limit was deleted. + # @param deleted [Boolean] + # Whether the hard spend limit was deleted. # - # @param object [Symbol, :"project.spend_limit.deleted"] The object type, which is always `project.spend_limit.deleted`. + # @param object [Symbol, :"project.spend_limit.deleted"] + # The object type, which is always `project.spend_limit.deleted`. end end diff --git a/lib/openai/models/admin/organization/projects/project_user.rb b/lib/openai/models/admin/organization/projects/project_user.rb index 9502b4217..bce007e48 100644 --- a/lib/openai/models/admin/organization/projects/project_user.rb +++ b/lib/openai/models/admin/organization/projects/project_user.rb @@ -46,17 +46,23 @@ class ProjectUser < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, added_at:, role:, email: nil, name: nil, object: :"organization.project.user") # Represents an individual user in a project. # - # @param id [String] The identifier, which can be referenced in API endpoints + # @param id [String] + # The identifier, which can be referenced in API endpoints # - # @param added_at [Integer] The Unix timestamp (in seconds) of when the project was added. + # @param added_at [Integer] + # The Unix timestamp (in seconds) of when the project was added. # - # @param role [String] `owner` or `member` + # @param role [String] + # `owner` or `member` # - # @param email [String, nil] The email address of the user + # @param email [String, nil] + # The email address of the user # - # @param name [String, nil] The name of the user + # @param name [String, nil] + # The name of the user # - # @param object [Symbol, :"organization.project.user"] The object type, which is always `organization.project.user` + # @param object [Symbol, :"organization.project.user"] + # The object type, which is always `organization.project.user` end end diff --git a/lib/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rb b/lib/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rb index bc11c1104..f1b56ac2d 100644 --- a/lib/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rb +++ b/lib/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rb @@ -40,17 +40,22 @@ class RateLimitListRateLimitsParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(project_id:, after: nil, before: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::RateLimitListRateLimitsParams} - # for more details. - # # @param project_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # beginning with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. The default is 100. + # @param limit [Integer] + # A limit on the number of objects to be returned. The default is 100. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rb b/lib/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rb index 3adda6d18..1cc202861 100644 --- a/lib/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rb +++ b/lib/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rb @@ -61,17 +61,23 @@ class RateLimitUpdateRateLimitParams < OpenAI::Internal::Type::BaseModel # # @param rate_limit_id [String] # - # @param batch_1_day_max_input_tokens [Integer] The maximum batch input tokens per day. Only relevant for certain models. + # @param batch_1_day_max_input_tokens [Integer] + # The maximum batch input tokens per day. Only relevant for certain models. # - # @param max_audio_megabytes_per_1_minute [Integer] The maximum audio megabytes per minute. Only relevant for certain models. + # @param max_audio_megabytes_per_1_minute [Integer] + # The maximum audio megabytes per minute. Only relevant for certain models. # - # @param max_images_per_1_minute [Integer] The maximum images per minute. Only relevant for certain models. + # @param max_images_per_1_minute [Integer] + # The maximum images per minute. Only relevant for certain models. # - # @param max_requests_per_1_day [Integer] The maximum requests per day. Only relevant for certain models. + # @param max_requests_per_1_day [Integer] + # The maximum requests per day. Only relevant for certain models. # - # @param max_requests_per_1_minute [Integer] The maximum requests per minute. + # @param max_requests_per_1_minute [Integer] + # The maximum requests per minute. # - # @param max_tokens_per_1_minute [Integer] The maximum tokens per minute. + # @param max_tokens_per_1_minute [Integer] + # The maximum tokens per minute. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/role_create_params.rb b/lib/openai/models/admin/organization/projects/role_create_params.rb index da4a636bf..c5367ed42 100644 --- a/lib/openai/models/admin/organization/projects/role_create_params.rb +++ b/lib/openai/models/admin/organization/projects/role_create_params.rb @@ -36,11 +36,14 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, permissions:, role_name:, description: nil, request_options: {}) # @param project_id [String] # - # @param permissions [Array] Permissions to grant to the role. + # @param permissions [Array] + # Permissions to grant to the role. # - # @param role_name [String] Unique name for the role. + # @param role_name [String] + # Unique name for the role. # - # @param description [String, nil] Optional description of the role. + # @param description [String, nil] + # Optional description of the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/role_delete_response.rb b/lib/openai/models/admin/organization/projects/role_delete_response.rb index 2cec042ee..6a1b442bc 100644 --- a/lib/openai/models/admin/organization/projects/role_delete_response.rb +++ b/lib/openai/models/admin/organization/projects/role_delete_response.rb @@ -28,11 +28,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"role.deleted") # Confirmation payload returned after deleting a role. # - # @param id [String] Identifier of the deleted role. + # @param id [String] + # Identifier of the deleted role. # - # @param deleted [Boolean] Whether the role was deleted. + # @param deleted [Boolean] + # Whether the role was deleted. # - # @param object [Symbol, :"role.deleted"] Always `role.deleted`. + # @param object [Symbol, :"role.deleted"] + # Always `role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/projects/role_list_params.rb b/lib/openai/models/admin/organization/projects/role_list_params.rb index 5c171fdcf..46aa1ff6e 100644 --- a/lib/openai/models/admin/organization/projects/role_list_params.rb +++ b/lib/openai/models/admin/organization/projects/role_list_params.rb @@ -35,17 +35,17 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::RoleListParams::Order } # @!method initialize(project_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::RoleListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing roles. # - # @param limit [Integer] A limit on the number of roles to return. Defaults to 1000. + # @param limit [Integer] + # A limit on the number of roles to return. Defaults to 1000. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::RoleListParams::Order] Sort order for the returned roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::RoleListParams::Order] + # Sort order for the returned roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/role_update_params.rb b/lib/openai/models/admin/organization/projects/role_update_params.rb index e142ee39f..018d4104a 100644 --- a/lib/openai/models/admin/organization/projects/role_update_params.rb +++ b/lib/openai/models/admin/organization/projects/role_update_params.rb @@ -43,11 +43,14 @@ class RoleUpdateParams < OpenAI::Internal::Type::BaseModel # # @param role_id [String] # - # @param description [String, nil] New description for the role. + # @param description [String, nil] + # New description for the role. # - # @param permissions [Array, nil] Updated set of permissions for the role. + # @param permissions [Array, nil] + # Updated set of permissions for the role. # - # @param role_name [String, nil] New name for the role. + # @param role_name [String, nil] + # New name for the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/service_account_create_params.rb b/lib/openai/models/admin/organization/projects/service_account_create_params.rb index b336026b6..fa05e8ce0 100644 --- a/lib/openai/models/admin/organization/projects/service_account_create_params.rb +++ b/lib/openai/models/admin/organization/projects/service_account_create_params.rb @@ -27,12 +27,31 @@ class ServiceAccountCreateParams < OpenAI::Internal::Type::BaseModel # @return [Boolean, nil] optional :create_service_account_only, OpenAI::Internal::Type::Boolean, nil?: true - # @!method initialize(project_id:, name:, create_service_account_only: nil, request_options: {}) + # @!attribute expires_in_seconds + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. + # + # @return [Integer, nil] + optional :expires_in_seconds, Integer, nil?: true + + # @!method initialize(project_id:, name:, create_service_account_only: nil, expires_in_seconds: nil, request_options: {}) # @param project_id [String] # - # @param name [String] The name of the service account being created. + # @param name [String] + # The name of the service account being created. + # + # @param create_service_account_only [Boolean, nil] + # Create the service account without default roles or an API key. # - # @param create_service_account_only [Boolean, nil] Create the service account without default roles or an API key. + # @param expires_in_seconds [Integer, nil] + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/service_account_create_response.rb b/lib/openai/models/admin/organization/projects/service_account_create_response.rb index a04aaba6e..59ee554cb 100644 --- a/lib/openai/models/admin/organization/projects/service_account_create_response.rb +++ b/lib/openai/models/admin/organization/projects/service_account_create_response.rb @@ -47,10 +47,6 @@ class ServiceAccountCreateResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, api_key:, created_at:, name:, role:, object: :"organization.project.service_account") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse} - # for more details. - # # @param id [String] # # @param api_key [OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse::APIKey, nil] @@ -59,7 +55,9 @@ class ServiceAccountCreateResponse < OpenAI::Internal::Type::BaseModel # # @param name [String] # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse::Role] Service accounts created with default project membership have role `member`. Acc + # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse::Role] + # Service accounts created with default project membership have role `member`. + # Accounts created with `create_service_account_only` have role `none`. # # @param object [Symbol, :"organization.project.service_account"] @@ -91,7 +89,14 @@ class APIKey < OpenAI::Internal::Type::BaseModel # @return [String] required :value, String - # @!method initialize(id:, created_at:, name:, value:, object: :"organization.project.service_account.api_key") + # @!attribute expires_at + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + # + # @return [Integer, nil] + optional :expires_at, Integer, nil?: true + + # @!method initialize(id:, created_at:, name:, value:, expires_at: nil, object: :"organization.project.service_account.api_key") # @param id [String] # # @param created_at [Integer] @@ -100,7 +105,12 @@ class APIKey < OpenAI::Internal::Type::BaseModel # # @param value [String] # - # @param object [Symbol, :"organization.project.service_account.api_key"] The object type, which is always `organization.project.service_account.api_key` + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + # + # @param object [Symbol, :"organization.project.service_account.api_key"] + # The object type, which is always `organization.project.service_account.api_key` end # Service accounts created with default project membership have role `member`. diff --git a/lib/openai/models/admin/organization/projects/service_account_list_params.rb b/lib/openai/models/admin/organization/projects/service_account_list_params.rb index d4f89b412..22e81b73a 100644 --- a/lib/openai/models/admin/organization/projects/service_account_list_params.rb +++ b/lib/openai/models/admin/organization/projects/service_account_list_params.rb @@ -32,15 +32,17 @@ class ServiceAccountListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(project_id:, after: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::ServiceAccountListParams} for - # more details. - # # @param project_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/service_account_update_params.rb b/lib/openai/models/admin/organization/projects/service_account_update_params.rb index f3729e33d..a6e12aef7 100644 --- a/lib/openai/models/admin/organization/projects/service_account_update_params.rb +++ b/lib/openai/models/admin/organization/projects/service_account_update_params.rb @@ -37,9 +37,11 @@ class ServiceAccountUpdateParams < OpenAI::Internal::Type::BaseModel # # @param service_account_id [String] # - # @param name [String] The updated service account name. + # @param name [String] + # The updated service account name. # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountUpdateParams::Role] The updated service account role. + # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountUpdateParams::Role] + # The updated service account role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb b/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb index 788f3546d..9a7464356 100644 --- a/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb +++ b/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb @@ -42,15 +42,20 @@ class APIKeyCreateParams < OpenAI::Internal::Type::BaseModel optional :scopes, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(project_id:, service_account_id:, expires_in_seconds: nil, name: nil, scopes: nil, request_options: {}) - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param service_account_id [String] The ID of the service account. + # @param service_account_id [String] + # The ID of the service account. # - # @param expires_in_seconds [Integer, nil] Number of seconds until the API key expires. + # @param expires_in_seconds [Integer, nil] + # Number of seconds until the API key expires. # - # @param name [String] API key name. + # @param name [String] + # API key name. # - # @param scopes [Array] API key scopes. + # @param scopes [Array] + # API key scopes. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb b/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb index 5dfd6d337..d8f05e116 100644 --- a/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb +++ b/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb @@ -46,21 +46,24 @@ class APIKeyCreateResponse < OpenAI::Internal::Type::BaseModel optional :expires_at, Integer, nil?: true # @!method initialize(id:, created_at:, name:, value:, expires_at: nil, object: :"organization.project.service_account.api_key") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::ServiceAccounts::APIKeyCreateResponse} - # for more details. + # @param id [String] + # The identifier of the API key. # - # @param id [String] The identifier of the API key. + # @param created_at [Integer] + # The Unix timestamp (in seconds) when the API key was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) when the API key was created. + # @param name [String] + # The name of the API key. # - # @param name [String] The name of the API key. + # @param value [String] + # The unredacted API key value. # - # @param value [String] The unredacted API key value. + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) when the API key expires, or null if it does not - # - # @param object [Symbol, :"organization.project.service_account.api_key"] The object type, which is always `organization.project.service_account.api_key` + # @param object [Symbol, :"organization.project.service_account.api_key"] + # The object type, which is always `organization.project.service_account.api_key` end end end diff --git a/lib/openai/models/admin/organization/projects/spend_alert_create_params.rb b/lib/openai/models/admin/organization/projects/spend_alert_create_params.rb index ead2d28c8..10e2ce943 100644 --- a/lib/openai/models/admin/organization/projects/spend_alert_create_params.rb +++ b/lib/openai/models/admin/organization/projects/spend_alert_create_params.rb @@ -45,13 +45,17 @@ class SpendAlertCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # @param project_id [String] # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -97,11 +101,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/projects/spend_alert_list_params.rb b/lib/openai/models/admin/organization/projects/spend_alert_list_params.rb index f6e93d458..0b8b51d92 100644 --- a/lib/openai/models/admin/organization/projects/spend_alert_list_params.rb +++ b/lib/openai/models/admin/organization/projects/spend_alert_list_params.rb @@ -42,19 +42,21 @@ class SpendAlertListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::SpendAlertListParams::Order } # @!method initialize(project_id:, after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] Cursor for pagination. Provide the ID of the last spend alert from the previous + # @param after [String] + # Cursor for pagination. Provide the ID of the last spend alert from the previous + # response to fetch the next page. # - # @param before [String] Cursor for pagination. Provide the ID of the first spend alert from the previous + # @param before [String] + # Cursor for pagination. Provide the ID of the first spend alert from the previous + # response to fetch the previous page. # - # @param limit [Integer] A limit on the number of spend alerts to return. Defaults to 20. + # @param limit [Integer] + # A limit on the number of spend alerts to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams::Order] Sort order for the returned spend alerts. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams::Order] + # Sort order for the returned spend alerts. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/spend_alert_update_params.rb b/lib/openai/models/admin/organization/projects/spend_alert_update_params.rb index e0a4bd003..20e4b9f6b 100644 --- a/lib/openai/models/admin/organization/projects/spend_alert_update_params.rb +++ b/lib/openai/models/admin/organization/projects/spend_alert_update_params.rb @@ -52,13 +52,17 @@ class SpendAlertUpdateParams < OpenAI::Internal::Type::BaseModel # # @param alert_id [String] # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -104,11 +108,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb b/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb index 89706e8b2..0a7cdd7d7 100644 --- a/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +++ b/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb @@ -35,17 +35,17 @@ class SpendLimitUpdateParams < OpenAI::Internal::Type::BaseModel required :threshold_amount, Integer # @!method initialize(project_id:, currency:, interval:, threshold_amount:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams} for more - # details. - # # @param project_id [String] # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/user_create_params.rb b/lib/openai/models/admin/organization/projects/user_create_params.rb index 50a131226..3c23c1245 100644 --- a/lib/openai/models/admin/organization/projects/user_create_params.rb +++ b/lib/openai/models/admin/organization/projects/user_create_params.rb @@ -36,11 +36,14 @@ class UserCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(project_id:, role:, email: nil, user_id: nil, request_options: {}) # @param project_id [String] # - # @param role [String] `owner` or `member` + # @param role [String] + # `owner` or `member` # - # @param email [String, nil] Email of the user to add. + # @param email [String, nil] + # Email of the user to add. # - # @param user_id [String, nil] The ID of the user. + # @param user_id [String, nil] + # The ID of the user. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/user_list_params.rb b/lib/openai/models/admin/organization/projects/user_list_params.rb index 8139245ee..46524cda2 100644 --- a/lib/openai/models/admin/organization/projects/user_list_params.rb +++ b/lib/openai/models/admin/organization/projects/user_list_params.rb @@ -32,15 +32,17 @@ class UserListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(project_id:, after: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::UserListParams} for more - # details. - # # @param project_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/user_update_params.rb b/lib/openai/models/admin/organization/projects/user_update_params.rb index a3c8517e9..b35be9fd3 100644 --- a/lib/openai/models/admin/organization/projects/user_update_params.rb +++ b/lib/openai/models/admin/organization/projects/user_update_params.rb @@ -31,7 +31,8 @@ class UserUpdateParams < OpenAI::Internal::Type::BaseModel # # @param user_id [String] # - # @param role [String, nil] `owner` or `member` + # @param role [String, nil] + # `owner` or `member` # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/users/role_create_params.rb b/lib/openai/models/admin/organization/projects/users/role_create_params.rb index 588c3dccc..4c4527dd7 100644 --- a/lib/openai/models/admin/organization/projects/users/role_create_params.rb +++ b/lib/openai/models/admin/organization/projects/users/role_create_params.rb @@ -32,7 +32,8 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel # # @param user_id [String] # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/projects/users/role_create_response.rb b/lib/openai/models/admin/organization/projects/users/role_create_response.rb index 070afd4e4..992c3b868 100644 --- a/lib/openai/models/admin/organization/projects/users/role_create_response.rb +++ b/lib/openai/models/admin/organization/projects/users/role_create_response.rb @@ -29,11 +29,14 @@ class RoleCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(role:, user:, object: :"user.role") # Role assignment linking a user to a role. # - # @param role [OpenAI::Models::Admin::Organization::Role] Details about a role that can be assigned through the public Roles API. + # @param role [OpenAI::Models::Admin::Organization::Role] + # Details about a role that can be assigned through the public Roles API. # - # @param user [OpenAI::Models::Admin::Organization::OrganizationUser] Represents an individual `user` within an organization. + # @param user [OpenAI::Models::Admin::Organization::OrganizationUser] + # Represents an individual `user` within an organization. # - # @param object [Symbol, :"user.role"] Always `user.role`. + # @param object [Symbol, :"user.role"] + # Always `user.role`. end end end diff --git a/lib/openai/models/admin/organization/projects/users/role_delete_response.rb b/lib/openai/models/admin/organization/projects/users/role_delete_response.rb index 88118098d..3b15b916b 100644 --- a/lib/openai/models/admin/organization/projects/users/role_delete_response.rb +++ b/lib/openai/models/admin/organization/projects/users/role_delete_response.rb @@ -22,15 +22,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, String # @!method initialize(deleted:, object:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Users::RoleDeleteResponse} for - # more details. - # # Confirmation payload returned after unassigning a role. # - # @param deleted [Boolean] Whether the assignment was removed. + # @param deleted [Boolean] + # Whether the assignment was removed. # - # @param object [String] Identifier for the deleted assignment, such as `group.role.deleted` or `user.rol + # @param object [String] + # Identifier for the deleted assignment, such as `group.role.deleted` or + # `user.role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/projects/users/role_list_params.rb b/lib/openai/models/admin/organization/projects/users/role_list_params.rb index 02483a9f2..39322d8bd 100644 --- a/lib/openai/models/admin/organization/projects/users/role_list_params.rb +++ b/lib/openai/models/admin/organization/projects/users/role_list_params.rb @@ -41,19 +41,19 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Projects::Users::RoleListParams::Order } # @!method initialize(project_id:, user_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams} for more - # details. - # # @param project_id [String] # # @param user_id [String] # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing project roles. # - # @param limit [Integer] A limit on the number of project role assignments to return. + # @param limit [Integer] + # A limit on the number of project role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams::Order] Sort order for the returned project roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams::Order] + # Sort order for the returned project roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/projects/users/role_list_response.rb b/lib/openai/models/admin/organization/projects/users/role_list_response.rb index 9ffaba210..6ce70f9c9 100644 --- a/lib/openai/models/admin/organization/projects/users/role_list_response.rb +++ b/lib/openai/models/admin/organization/projects/users/role_list_response.rb @@ -96,30 +96,41 @@ class RoleListResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb b/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb index 048bb1416..7cd11ffbe 100644 --- a/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb +++ b/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb @@ -96,30 +96,41 @@ class RoleRetrieveResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/role.rb b/lib/openai/models/admin/organization/role.rb index f6ce83ec5..162600505 100644 --- a/lib/openai/models/admin/organization/role.rb +++ b/lib/openai/models/admin/organization/role.rb @@ -50,24 +50,29 @@ class Role < OpenAI::Internal::Type::BaseModel required :resource_type, String # @!method initialize(id:, description:, name:, permissions:, predefined_role:, resource_type:, object: :role) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Role} for more details. - # # Details about a role that can be assigned through the public Roles API. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param description [String, nil] Optional description of the role. + # @param description [String, nil] + # Optional description of the role. # - # @param name [String] Unique name for the role. + # @param name [String] + # Unique name for the role. # - # @param permissions [Array] Permissions granted by the role. + # @param permissions [Array] + # Permissions granted by the role. # - # @param predefined_role [Boolean] Whether the role is predefined and managed by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined and managed by OpenAI. # - # @param resource_type [String] Resource type the role is bound to (for example `api.organization` or `api.proje + # @param resource_type [String] + # Resource type the role is bound to (for example `api.organization` or + # `api.project`). # - # @param object [Symbol, :role] Always `role`. + # @param object [Symbol, :role] + # Always `role`. end end end diff --git a/lib/openai/models/admin/organization/role_create_params.rb b/lib/openai/models/admin/organization/role_create_params.rb index 1507b8526..7004adf94 100644 --- a/lib/openai/models/admin/organization/role_create_params.rb +++ b/lib/openai/models/admin/organization/role_create_params.rb @@ -28,11 +28,14 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(permissions:, role_name:, description: nil, request_options: {}) - # @param permissions [Array] Permissions to grant to the role. + # @param permissions [Array] + # Permissions to grant to the role. # - # @param role_name [String] Unique name for the role. + # @param role_name [String] + # Unique name for the role. # - # @param description [String, nil] Optional description of the role. + # @param description [String, nil] + # Optional description of the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/role_delete_response.rb b/lib/openai/models/admin/organization/role_delete_response.rb index f7e56d470..51c0fd2c4 100644 --- a/lib/openai/models/admin/organization/role_delete_response.rb +++ b/lib/openai/models/admin/organization/role_delete_response.rb @@ -27,11 +27,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"role.deleted") # Confirmation payload returned after deleting a role. # - # @param id [String] Identifier of the deleted role. + # @param id [String] + # Identifier of the deleted role. # - # @param deleted [Boolean] Whether the role was deleted. + # @param deleted [Boolean] + # Whether the role was deleted. # - # @param object [Symbol, :"role.deleted"] Always `role.deleted`. + # @param object [Symbol, :"role.deleted"] + # Always `role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/role_list_params.rb b/lib/openai/models/admin/organization/role_list_params.rb index 9c63c09df..ba160ab9f 100644 --- a/lib/openai/models/admin/organization/role_list_params.rb +++ b/lib/openai/models/admin/organization/role_list_params.rb @@ -29,14 +29,15 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::RoleListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::RoleListParams} for more details. + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing roles. # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param limit [Integer] + # A limit on the number of roles to return. Defaults to 1000. # - # @param limit [Integer] A limit on the number of roles to return. Defaults to 1000. - # - # @param order [Symbol, OpenAI::Models::Admin::Organization::RoleListParams::Order] Sort order for the returned roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::RoleListParams::Order] + # Sort order for the returned roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/role_update_params.rb b/lib/openai/models/admin/organization/role_update_params.rb index 13dfcb14f..b22ab7d95 100644 --- a/lib/openai/models/admin/organization/role_update_params.rb +++ b/lib/openai/models/admin/organization/role_update_params.rb @@ -35,11 +35,14 @@ class RoleUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(role_id:, description: nil, permissions: nil, role_name: nil, request_options: {}) # @param role_id [String] # - # @param description [String, nil] New description for the role. + # @param description [String, nil] + # New description for the role. # - # @param permissions [Array, nil] Updated set of permissions for the role. + # @param permissions [Array, nil] + # Updated set of permissions for the role. # - # @param role_name [String, nil] New name for the role. + # @param role_name [String, nil] + # New name for the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/spend_alert_create_params.rb b/lib/openai/models/admin/organization/spend_alert_create_params.rb index cf7a3851e..1925b8317 100644 --- a/lib/openai/models/admin/organization/spend_alert_create_params.rb +++ b/lib/openai/models/admin/organization/spend_alert_create_params.rb @@ -37,13 +37,17 @@ class SpendAlertCreateParams < OpenAI::Internal::Type::BaseModel required :threshold_amount, Integer # @!method initialize(currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertCreateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertCreateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -89,11 +93,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/spend_alert_list_params.rb b/lib/openai/models/admin/organization/spend_alert_list_params.rb index 9affa2bc9..01ec0c18d 100644 --- a/lib/openai/models/admin/organization/spend_alert_list_params.rb +++ b/lib/openai/models/admin/organization/spend_alert_list_params.rb @@ -36,16 +36,19 @@ class SpendAlertListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::SpendAlertListParams::Order } # @!method initialize(after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::SpendAlertListParams} for more details. + # @param after [String] + # Cursor for pagination. Provide the ID of the last spend alert from the previous + # response to fetch the next page. # - # @param after [String] Cursor for pagination. Provide the ID of the last spend alert from the previous + # @param before [String] + # Cursor for pagination. Provide the ID of the first spend alert from the previous + # response to fetch the previous page. # - # @param before [String] Cursor for pagination. Provide the ID of the first spend alert from the previous + # @param limit [Integer] + # A limit on the number of spend alerts to return. Defaults to 20. # - # @param limit [Integer] A limit on the number of spend alerts to return. Defaults to 20. - # - # @param order [Symbol, OpenAI::Models::Admin::Organization::SpendAlertListParams::Order] Sort order for the returned spend alerts. + # @param order [Symbol, OpenAI::Models::Admin::Organization::SpendAlertListParams::Order] + # Sort order for the returned spend alerts. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/spend_alert_update_params.rb b/lib/openai/models/admin/organization/spend_alert_update_params.rb index 0a2485a7c..4cbb773eb 100644 --- a/lib/openai/models/admin/organization/spend_alert_update_params.rb +++ b/lib/openai/models/admin/organization/spend_alert_update_params.rb @@ -44,13 +44,17 @@ class SpendAlertUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(alert_id:, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # @param alert_id [String] # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -96,11 +100,14 @@ class NotificationChannel < OpenAI::Internal::Type::BaseModel # @!method initialize(recipients:, subject_prefix: nil, type: :email) # Email notification settings for a spend alert. # - # @param recipients [Array] Email addresses that receive the spend alert notification. + # @param recipients [Array] + # Email addresses that receive the spend alert notification. # - # @param subject_prefix [String, nil] Optional subject prefix for alert emails. + # @param subject_prefix [String, nil] + # Optional subject prefix for alert emails. # - # @param type [Symbol, :email] The notification channel type. Currently only `email` is supported. + # @param type [Symbol, :email] + # The notification channel type. Currently only `email` is supported. end end end diff --git a/lib/openai/models/admin/organization/spend_limit_update_params.rb b/lib/openai/models/admin/organization/spend_limit_update_params.rb index ca6de045b..e36992012 100644 --- a/lib/openai/models/admin/organization/spend_limit_update_params.rb +++ b/lib/openai/models/admin/organization/spend_limit_update_params.rb @@ -29,14 +29,15 @@ class SpendLimitUpdateParams < OpenAI::Internal::Type::BaseModel required :threshold_amount, Integer # @!method initialize(currency:, interval:, threshold_amount:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::SpendLimitUpdateParams} for more details. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m - # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_audio_speeches_params.rb b/lib/openai/models/admin/organization/usage_audio_speeches_params.rb index c2d27dbe8..e90ff3c84 100644 --- a/lib/openai/models/admin/organization/usage_audio_speeches_params.rb +++ b/lib/openai/models/admin/organization/usage_audio_speeches_params.rb @@ -82,29 +82,42 @@ class UsageAudioSpeechesParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams} for more - # details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_audio_speeches_response.rb b/lib/openai/models/admin/organization/usage_audio_speeches_response.rb index 9d53c1ca9..403593f90 100644 --- a/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +++ b/lib/openai/models/admin/organization/usage_audio_speeches_response.rb @@ -311,53 +311,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -409,23 +439,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -477,23 +513,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -559,27 +601,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -631,23 +683,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -699,23 +757,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -740,15 +804,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -773,16 +836,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -828,21 +890,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -901,25 +968,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -983,23 +1058,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1020,9 +1102,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_audio_transcriptions_params.rb b/lib/openai/models/admin/organization/usage_audio_transcriptions_params.rb index 7bb4d1836..b1ed611bc 100644 --- a/lib/openai/models/admin/organization/usage_audio_transcriptions_params.rb +++ b/lib/openai/models/admin/organization/usage_audio_transcriptions_params.rb @@ -87,29 +87,42 @@ class UsageAudioTranscriptionsParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams} for more - # details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb b/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb index 1c8ac2d2f..a7a59962c 100644 --- a/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +++ b/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb @@ -313,53 +313,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -411,23 +441,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -479,23 +515,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -561,27 +603,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -633,23 +685,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -701,23 +759,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -742,15 +806,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -775,16 +838,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -830,21 +892,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -903,25 +970,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -985,23 +1060,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1022,9 +1104,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_code_interpreter_sessions_params.rb b/lib/openai/models/admin/organization/usage_code_interpreter_sessions_params.rb index 16fc8186f..57689dc7b 100644 --- a/lib/openai/models/admin/organization/usage_code_interpreter_sessions_params.rb +++ b/lib/openai/models/admin/organization/usage_code_interpreter_sessions_params.rb @@ -69,23 +69,33 @@ class UsageCodeInterpreterSessionsParams < OpenAI::Internal::Type::BaseModel optional :project_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams} for - # more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb b/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb index a3025d625..c5e135a6b 100644 --- a/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +++ b/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb @@ -313,53 +313,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -411,23 +441,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -479,23 +515,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -561,27 +603,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -633,23 +685,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -701,23 +759,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -742,15 +806,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -775,16 +838,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -830,21 +892,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -903,25 +970,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -985,23 +1060,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1022,9 +1104,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_completions_params.rb b/lib/openai/models/admin/organization/usage_completions_params.rb index d58c08fe2..084151341 100644 --- a/lib/openai/models/admin/organization/usage_completions_params.rb +++ b/lib/openai/models/admin/organization/usage_completions_params.rb @@ -88,30 +88,47 @@ class UsageCompletionsParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, batch: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param batch [Boolean] + # If `true`, return batch jobs only. If `false`, return non-batch jobs only. By + # default, return both. # - # @param batch [Boolean] If `true`, return batch jobs only. If `false`, return non-batch jobs only. By de + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any + # combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_completions_response.rb b/lib/openai/models/admin/organization/usage_completions_response.rb index 2c65864e1..2799f4518 100644 --- a/lib/openai/models/admin/organization/usage_completions_response.rb +++ b/lib/openai/models/admin/organization/usage_completions_response.rb @@ -309,53 +309,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -407,23 +437,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -475,23 +511,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -557,27 +599,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -629,23 +681,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -697,23 +755,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -738,15 +802,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -771,16 +834,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -826,21 +888,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -899,25 +966,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -981,23 +1056,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageCompletionsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1018,9 +1100,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_costs_params.rb b/lib/openai/models/admin/organization/usage_costs_params.rb index 560372d65..4b3884ce1 100644 --- a/lib/openai/models/admin/organization/usage_costs_params.rb +++ b/lib/openai/models/admin/organization/usage_costs_params.rb @@ -72,26 +72,37 @@ class UsageCostsParams < OpenAI::Internal::Type::BaseModel optional :project_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, line_items: nil, page: nil, project_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only costs for these API keys. # - # @param api_key_ids [Array] Return only costs for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::BucketWidth] + # Width of each time bucket in response. Currently only `1d` is supported, default + # to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::BucketWidth] Width of each time bucket in response. Currently only `1d` is supported, default + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the costs by the specified fields. Support fields include `project_id`, + # `line_item`, `api_key_id` and any combination of them. # - # @param group_by [Array] Group the costs by the specified fields. Support fields include `project_id`, `l + # @param limit [Integer] + # A limit on the number of buckets to be returned. Limit can range between 1 and + # 180, and the default is 7. # - # @param limit [Integer] A limit on the number of buckets to be returned. Limit can range between 1 and 1 + # @param line_items [Array] + # Return only costs for these exact line item names. Each value must match the + # complete `line_item` value, for example `gpt-6-astra, input_tokens`. # - # @param line_items [Array] Return only costs for these exact line item names. Each value must match the com + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the - # - # @param project_ids [Array] Return only costs for these projects. + # @param project_ids [Array] + # Return only costs for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_costs_response.rb b/lib/openai/models/admin/organization/usage_costs_response.rb index 86de07175..6836348cc 100644 --- a/lib/openai/models/admin/organization/usage_costs_response.rb +++ b/lib/openai/models/admin/organization/usage_costs_response.rb @@ -307,53 +307,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -405,23 +435,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -473,23 +509,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -555,27 +597,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -627,23 +679,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -695,23 +753,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -736,15 +800,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -769,16 +832,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -824,21 +886,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -897,25 +964,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -979,23 +1054,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1016,9 +1098,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_embeddings_params.rb b/lib/openai/models/admin/organization/usage_embeddings_params.rb index d51c1098c..08cfeb39b 100644 --- a/lib/openai/models/admin/organization/usage_embeddings_params.rb +++ b/lib/openai/models/admin/organization/usage_embeddings_params.rb @@ -80,28 +80,42 @@ class UsageEmbeddingsParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_embeddings_response.rb b/lib/openai/models/admin/organization/usage_embeddings_response.rb index 699aecb82..b81f3ded0 100644 --- a/lib/openai/models/admin/organization/usage_embeddings_response.rb +++ b/lib/openai/models/admin/organization/usage_embeddings_response.rb @@ -309,53 +309,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -407,23 +437,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -475,23 +511,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -557,27 +599,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -629,23 +681,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -697,23 +755,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -738,15 +802,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -771,16 +834,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -826,21 +888,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -899,25 +966,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -981,23 +1056,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1018,9 +1100,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_file_search_calls_params.rb b/lib/openai/models/admin/organization/usage_file_search_calls_params.rb index 191ea5081..c54cdb1b7 100644 --- a/lib/openai/models/admin/organization/usage_file_search_calls_params.rb +++ b/lib/openai/models/admin/organization/usage_file_search_calls_params.rb @@ -83,29 +83,43 @@ class UsageFileSearchCallsParams < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, user_ids: nil, vector_store_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams} for more - # details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `vector_store_id` or any combination of + # them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # - # @param vector_store_ids [Array] Return only usage for these vector stores. + # @param vector_store_ids [Array] + # Return only usage for these vector stores. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_file_search_calls_response.rb b/lib/openai/models/admin/organization/usage_file_search_calls_response.rb index e35b8d600..5eec2b81d 100644 --- a/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +++ b/lib/openai/models/admin/organization/usage_file_search_calls_response.rb @@ -311,53 +311,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -409,23 +439,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -477,23 +513,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -559,27 +601,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -631,23 +683,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -699,23 +757,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -740,15 +804,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -773,16 +836,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -828,21 +890,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -901,25 +968,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -983,23 +1058,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1020,9 +1102,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_images_params.rb b/lib/openai/models/admin/organization/usage_images_params.rb index c6a9c4394..f2f2e58cd 100644 --- a/lib/openai/models/admin/organization/usage_images_params.rb +++ b/lib/openai/models/admin/organization/usage_images_params.rb @@ -101,32 +101,51 @@ class UsageImagesParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, sizes: nil, sources: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageImagesParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageImagesParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any + # combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param sizes [Array] Return only usages for these image sizes. Possible values are `256x256`, `512x51 + # @param sizes [Array] + # Return only usages for these image sizes. Possible values are `256x256`, + # `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them. # - # @param sources [Array] Return only usages for these sources. Possible values are `image.generation`, `i + # @param sources [Array] + # Return only usages for these sources. Possible values are `image.generation`, + # `image.edit`, `image.variation` or any combination of them. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_images_response.rb b/lib/openai/models/admin/organization/usage_images_response.rb index 9eafa549b..1df3afd6c 100644 --- a/lib/openai/models/admin/organization/usage_images_response.rb +++ b/lib/openai/models/admin/organization/usage_images_response.rb @@ -307,53 +307,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -405,23 +435,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -473,23 +509,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -555,27 +597,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -627,23 +679,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -695,23 +753,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -736,15 +800,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -769,16 +832,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -824,21 +886,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -897,25 +964,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -979,23 +1054,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1016,9 +1098,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_moderations_params.rb b/lib/openai/models/admin/organization/usage_moderations_params.rb index a281b342e..f59b6637f 100644 --- a/lib/openai/models/admin/organization/usage_moderations_params.rb +++ b/lib/openai/models/admin/organization/usage_moderations_params.rb @@ -80,28 +80,42 @@ class UsageModerationsParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageModerationsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageModerationsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_moderations_response.rb b/lib/openai/models/admin/organization/usage_moderations_response.rb index 8e37aa0fe..cf84d625e 100644 --- a/lib/openai/models/admin/organization/usage_moderations_response.rb +++ b/lib/openai/models/admin/organization/usage_moderations_response.rb @@ -309,53 +309,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -407,23 +437,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -475,23 +511,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -557,27 +599,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -629,23 +681,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -697,23 +755,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -738,15 +802,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -771,16 +834,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -826,21 +888,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -899,25 +966,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -981,23 +1056,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageModerationsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1018,9 +1100,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_vector_stores_params.rb b/lib/openai/models/admin/organization/usage_vector_stores_params.rb index aa5322e59..9ba9522dc 100644 --- a/lib/openai/models/admin/organization/usage_vector_stores_params.rb +++ b/lib/openai/models/admin/organization/usage_vector_stores_params.rb @@ -62,22 +62,33 @@ class UsageVectorStoresParams < OpenAI::Internal::Type::BaseModel optional :project_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresParams} for more details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageVectorStoresParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageVectorStoresParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_vector_stores_response.rb b/lib/openai/models/admin/organization/usage_vector_stores_response.rb index 1c3d5647b..dbc818da7 100644 --- a/lib/openai/models/admin/organization/usage_vector_stores_response.rb +++ b/lib/openai/models/admin/organization/usage_vector_stores_response.rb @@ -311,53 +311,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -409,23 +439,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -477,23 +513,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -559,27 +601,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -631,23 +683,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -699,23 +757,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -740,15 +804,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -773,16 +836,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -828,21 +890,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -901,25 +968,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -983,23 +1058,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1020,9 +1102,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/usage_web_search_calls_params.rb b/lib/openai/models/admin/organization/usage_web_search_calls_params.rb index 1a3946bb1..b116795ed 100644 --- a/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +++ b/lib/openai/models/admin/organization/usage_web_search_calls_params.rb @@ -96,31 +96,46 @@ class UsageWebSearchCallsParams < OpenAI::Internal::Type::BaseModel optional :user_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(start_time:, api_key_ids: nil, bucket_width: nil, context_levels: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams} for more - # details. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param context_levels [Array] + # Return only web search usage for these context levels. # - # @param context_levels [Array] Return only web search usage for these context levels. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or any + # combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/usage_web_search_calls_response.rb b/lib/openai/models/admin/organization/usage_web_search_calls_response.rb index 758f8cab3..3c431526e 100644 --- a/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +++ b/lib/openai/models/admin/organization/usage_web_search_calls_response.rb @@ -311,53 +311,83 @@ class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult} - # for more details. - # # The aggregated completions usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok + # @param input_tokens [Integer] + # The aggregated number of input tokens used, including cached and cache-write + # tokens. This includes text, audio, and image tokens. For customers subscribed to + # Scale Tier, this includes Scale Tier tokens. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output + # @param output_tokens [Integer] + # The aggregated number of output tokens used across text, audio, and image + # outputs. For customers subscribed to Scale Tier, this includes Scale Tier + # tokens. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc + # @param batch [Boolean, nil] + # When `group_by=batch`, this field tells whether the grouped usage result is + # batch or not. # - # @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used. + # @param input_audio_tokens [Integer] + # The aggregated number of uncached audio input tokens used. # - # @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache. + # @param input_cache_write_tokens [Integer] + # The aggregated number of input tokens written to the cache. # - # @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used. + # @param input_cached_audio_tokens [Integer] + # The aggregated number of cached audio input tokens used. # - # @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used. + # @param input_cached_image_tokens [Integer] + # The aggregated number of cached image input tokens used. # - # @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used. + # @param input_cached_text_tokens [Integer] + # The aggregated number of cached text input tokens used. # - # @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image + # @param input_cached_tokens [Integer] + # The aggregated number of cached input tokens used across text, audio, and image + # inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens. # - # @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used. + # @param input_image_tokens [Integer] + # The aggregated number of uncached image input tokens used. # - # @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write + # @param input_text_tokens [Integer] + # The aggregated number of uncached text input tokens used, excluding cache-write + # tokens. # - # @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag + # @param input_uncached_tokens [Integer] + # The aggregated number of uncached input tokens used across text, audio, and + # image inputs, excluding cache-write tokens. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param output_audio_tokens [Integer] The aggregated number of audio output tokens used. + # @param output_audio_tokens [Integer] + # The aggregated number of audio output tokens used. # - # @param output_image_tokens [Integer] The aggregated number of image output tokens used. + # @param output_image_tokens [Integer] + # The aggregated number of image output tokens used. # - # @param output_text_tokens [Integer] The aggregated number of text output tokens used. + # @param output_text_tokens [Integer] + # The aggregated number of text output tokens used. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe + # @param service_tier [String, nil] + # When `group_by=service_tier`, this field provides the service tier of the + # grouped usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.completions.result"] end @@ -409,23 +439,29 @@ class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.embeddings.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageEmbeddingsResult} - # for more details. - # # The aggregated embeddings usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.embeddings.result"] end @@ -477,23 +513,29 @@ class OrganizationUsageModerationsResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(input_tokens:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.moderations.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageModerationsResult} - # for more details. - # # The aggregated moderations usage details of the specific time bucket. # - # @param input_tokens [Integer] The aggregated number of input tokens used. + # @param input_tokens [Integer] + # The aggregated number of input tokens used. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.moderations.result"] end @@ -559,27 +601,37 @@ class OrganizationUsageImagesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(images:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, size: nil, source: nil, user_id: nil, object: :"organization.usage.images.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageImagesResult} - # for more details. - # # The aggregated images usage details of the specific time bucket. # - # @param images [Integer] The number of images processed. + # @param images [Integer] + # The number of images processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param size [String, nil] When `group_by=size`, this field provides the image size of the grouped usage re + # @param size [String, nil] + # When `group_by=size`, this field provides the image size of the grouped usage + # result. # - # @param source [String, nil] When `group_by=source`, this field provides the source of the grouped usage resu + # @param source [String, nil] + # When `group_by=source`, this field provides the source of the grouped usage + # result, possible values are `image.generation`, `image.edit`, `image.variation`. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.images.result"] end @@ -631,23 +683,29 @@ class OrganizationUsageAudioSpeechesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(characters:, num_model_requests:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_speeches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageAudioSpeechesResult} - # for more details. - # # The aggregated audio speeches usage details of the specific time bucket. # - # @param characters [Integer] The number of characters processed. + # @param characters [Integer] + # The number of characters processed. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_speeches.result"] end @@ -699,23 +757,29 @@ class OrganizationUsageAudioTranscriptionsResult < OpenAI::Internal::Type::BaseM optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, seconds:, api_key_id: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.audio_transcriptions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult} - # for more details. - # # The aggregated audio transcriptions usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of requests made to the model. + # @param num_model_requests [Integer] + # The count of requests made to the model. # - # @param seconds [Integer] The number of seconds processed. + # @param seconds [Integer] + # The number of seconds processed. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.audio_transcriptions.result"] end @@ -740,15 +804,14 @@ class OrganizationUsageVectorStoresResult < OpenAI::Internal::Type::BaseModel optional :project_id, String, nil?: true # @!method initialize(usage_bytes:, project_id: nil, object: :"organization.usage.vector_stores.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageVectorStoresResult} - # for more details. - # # The aggregated vector stores usage details of the specific time bucket. # - # @param usage_bytes [Integer] The vector stores usage in bytes. + # @param usage_bytes [Integer] + # The vector stores usage in bytes. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.vector_stores.result"] end @@ -773,16 +836,15 @@ class OrganizationUsageCodeInterpreterSessionsResult < OpenAI::Internal::Type::B optional :project_id, String, nil?: true # @!method initialize(num_sessions:, project_id: nil, object: :"organization.usage.code_interpreter_sessions.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult} - # for more details. - # # The aggregated code interpreter sessions usage details of the specific time # bucket. # - # @param num_sessions [Integer] The number of code interpreter sessions. + # @param num_sessions [Integer] + # The number of code interpreter sessions. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # # @param object [Symbol, :"organization.usage.code_interpreter_sessions.result"] end @@ -828,21 +890,26 @@ class OrganizationUsageFileSearchesResult < OpenAI::Internal::Type::BaseModel optional :vector_store_id, String, nil?: true # @!method initialize(num_requests:, api_key_id: nil, project_id: nil, user_id: nil, vector_store_id: nil, object: :"organization.usage.file_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageFileSearchesResult} - # for more details. - # # The aggregated file search calls usage details of the specific time bucket. # - # @param num_requests [Integer] The count of file search calls. + # @param num_requests [Integer] + # The count of file search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # - # @param vector_store_id [String, nil] When `group_by=vector_store_id`, this field provides the vector store ID of the + # @param vector_store_id [String, nil] + # When `group_by=vector_store_id`, this field provides the vector store ID of the + # grouped usage result. # # @param object [Symbol, :"organization.usage.file_searches.result"] end @@ -901,25 +968,33 @@ class OrganizationUsageWebSearchesResult < OpenAI::Internal::Type::BaseModel optional :user_id, String, nil?: true # @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult} - # for more details. - # # The aggregated web search calls usage details of the specific time bucket. # - # @param num_model_requests [Integer] The count of model requests. + # @param num_model_requests [Integer] + # The count of model requests. # - # @param num_requests [Integer] The count of web search calls. + # @param num_requests [Integer] + # The count of web search calls. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API key ID of the grouped + # usage result. # - # @param context_level [String, nil] When `group_by=context_level`, this field provides the search context size of th + # @param context_level [String, nil] + # When `group_by=context_level`, this field provides the search context size of + # the grouped usage result. # - # @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r + # @param model [String, nil] + # When `group_by=model`, this field provides the model name of the grouped usage + # result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # usage result. # - # @param user_id [String, nil] When `group_by=user_id`, this field provides the user ID of the grouped usage re + # @param user_id [String, nil] + # When `group_by=user_id`, this field provides the user ID of the grouped usage + # result. # # @param object [Symbol, :"organization.usage.web_searches.result"] end @@ -983,23 +1058,30 @@ class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel ) # @!method initialize(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult} - # for more details. - # # The aggregated costs details of the specific time bucket. # - # @param amount [OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount] The monetary value in its associated currency. + # @param amount [OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount] + # The monetary value in its associated currency. # - # @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API Key ID of the grouped co + # @param api_key_id [String, nil] + # When `group_by=api_key_id`, this field provides the API Key ID of the grouped + # costs result. # - # @param line_item [String, nil] When `group_by=line_item`, this field provides the line item of the grouped cost + # @param line_item [String, nil] + # When `group_by=line_item`, this field provides the line item of the grouped + # costs result. # - # @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped co + # @param project_id [String, nil] + # When `group_by=project_id`, this field provides the project ID of the grouped + # costs result. # - # @param quantity [Float, nil] When `group_by=line_item`, this field provides the quantity of the grouped costs + # @param quantity [Float, nil] + # When `group_by=line_item`, this field provides the quantity of the grouped costs + # result. # - # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] The unit of the `quantity` value. If no single supported unit applies to the res + # @param quantity_unit [String, Symbol, OpenAI::Models::Admin::Organization::CostQuantityUnit, nil] + # The unit of the `quantity` value. If no single supported unit applies to the + # result, this field is `null`. # # @param object [Symbol, :"organization.costs.result"] @@ -1020,9 +1102,11 @@ class Amount < OpenAI::Internal::Type::BaseModel # @!method initialize(currency: nil, value: nil) # The monetary value in its associated currency. # - # @param currency [String] Lowercase ISO-4217 currency e.g. "usd" + # @param currency [String] + # Lowercase ISO-4217 currency e.g. "usd" # - # @param value [Float] The numeric value of the cost. + # @param value [Float] + # The numeric value of the cost. end end diff --git a/lib/openai/models/admin/organization/user_list_params.rb b/lib/openai/models/admin/organization/user_list_params.rb index 84526b1c7..0007212c4 100644 --- a/lib/openai/models/admin/organization/user_list_params.rb +++ b/lib/openai/models/admin/organization/user_list_params.rb @@ -32,14 +32,18 @@ class UserListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(after: nil, emails: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UserListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param emails [Array] + # Filter by the email address of users. # - # @param emails [Array] Filter by the email address of users. - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/user_update_params.rb b/lib/openai/models/admin/organization/user_update_params.rb index 58556ab7c..8a44b7fef 100644 --- a/lib/openai/models/admin/organization/user_update_params.rb +++ b/lib/openai/models/admin/organization/user_update_params.rb @@ -41,13 +41,17 @@ class UserUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(user_id:, developer_persona: nil, role: nil, role_id: nil, technical_level: nil, request_options: {}) # @param user_id [String] # - # @param developer_persona [String, nil] Developer persona metadata. + # @param developer_persona [String, nil] + # Developer persona metadata. # - # @param role [String, nil] `owner` or `reader` + # @param role [String, nil] + # `owner` or `reader` # - # @param role_id [String, nil] Role ID to assign to the user. + # @param role_id [String, nil] + # Role ID to assign to the user. # - # @param technical_level [String, nil] Technical level metadata. + # @param technical_level [String, nil] + # Technical level metadata. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/users/role_create_params.rb b/lib/openai/models/admin/organization/users/role_create_params.rb index 92eead05a..2e3f83cfd 100644 --- a/lib/openai/models/admin/organization/users/role_create_params.rb +++ b/lib/openai/models/admin/organization/users/role_create_params.rb @@ -24,7 +24,8 @@ class RoleCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(user_id:, role_id:, request_options: {}) # @param user_id [String] # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/admin/organization/users/role_create_response.rb b/lib/openai/models/admin/organization/users/role_create_response.rb index 0ddb02408..2cc096b0c 100644 --- a/lib/openai/models/admin/organization/users/role_create_response.rb +++ b/lib/openai/models/admin/organization/users/role_create_response.rb @@ -28,11 +28,14 @@ class RoleCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(role:, user:, object: :"user.role") # Role assignment linking a user to a role. # - # @param role [OpenAI::Models::Admin::Organization::Role] Details about a role that can be assigned through the public Roles API. + # @param role [OpenAI::Models::Admin::Organization::Role] + # Details about a role that can be assigned through the public Roles API. # - # @param user [OpenAI::Models::Admin::Organization::OrganizationUser] Represents an individual `user` within an organization. + # @param user [OpenAI::Models::Admin::Organization::OrganizationUser] + # Represents an individual `user` within an organization. # - # @param object [Symbol, :"user.role"] Always `user.role`. + # @param object [Symbol, :"user.role"] + # Always `user.role`. end end end diff --git a/lib/openai/models/admin/organization/users/role_delete_response.rb b/lib/openai/models/admin/organization/users/role_delete_response.rb index 4ddfc7117..babbe5bc6 100644 --- a/lib/openai/models/admin/organization/users/role_delete_response.rb +++ b/lib/openai/models/admin/organization/users/role_delete_response.rb @@ -21,15 +21,14 @@ class RoleDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, String # @!method initialize(deleted:, object:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Users::RoleDeleteResponse} for more - # details. - # # Confirmation payload returned after unassigning a role. # - # @param deleted [Boolean] Whether the assignment was removed. + # @param deleted [Boolean] + # Whether the assignment was removed. # - # @param object [String] Identifier for the deleted assignment, such as `group.role.deleted` or `user.rol + # @param object [String] + # Identifier for the deleted assignment, such as `group.role.deleted` or + # `user.role.deleted`. end end end diff --git a/lib/openai/models/admin/organization/users/role_list_params.rb b/lib/openai/models/admin/organization/users/role_list_params.rb index 0d000becb..3e40ce677 100644 --- a/lib/openai/models/admin/organization/users/role_list_params.rb +++ b/lib/openai/models/admin/organization/users/role_list_params.rb @@ -35,16 +35,17 @@ class RoleListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Admin::Organization::Users::RoleListParams::Order } # @!method initialize(user_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Users::RoleListParams} for more details. - # # @param user_id [String] # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing organization roles. # - # @param limit [Integer] A limit on the number of organization role assignments to return. + # @param limit [Integer] + # A limit on the number of organization role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Users::RoleListParams::Order] Sort order for the returned organization roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Users::RoleListParams::Order] + # Sort order for the returned organization roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/admin/organization/users/role_list_response.rb b/lib/openai/models/admin/organization/users/role_list_response.rb index 7df5b2170..c3f8e9543 100644 --- a/lib/openai/models/admin/organization/users/role_list_response.rb +++ b/lib/openai/models/admin/organization/users/role_list_response.rb @@ -95,30 +95,41 @@ class RoleListResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/admin/organization/users/role_retrieve_response.rb b/lib/openai/models/admin/organization/users/role_retrieve_response.rb index d38f847ad..4eb1a1a82 100644 --- a/lib/openai/models/admin/organization/users/role_retrieve_response.rb +++ b/lib/openai/models/admin/organization/users/role_retrieve_response.rb @@ -95,30 +95,41 @@ class RoleRetrieveResponse < OpenAI::Internal::Type::BaseModel # Detailed information about a role assignment entry returned when listing # assignments. # - # @param id [String] Identifier for the role. + # @param id [String] + # Identifier for the role. # - # @param assignment_sources [Array, nil] Principals from which the role assignment is inherited, when available. + # @param assignment_sources [Array, nil] + # Principals from which the role assignment is inherited, when available. # - # @param created_at [Integer, nil] When the role was created. + # @param created_at [Integer, nil] + # When the role was created. # - # @param created_by [String, nil] Identifier of the actor who created the role. + # @param created_by [String, nil] + # Identifier of the actor who created the role. # - # @param created_by_user_obj [Hash{Symbol=>Object}, nil] User details for the actor that created the role, when available. + # @param created_by_user_obj [Hash{Symbol=>Object}, nil] + # User details for the actor that created the role, when available. # - # @param description [String, nil] Description of the role. + # @param description [String, nil] + # Description of the role. # - # @param metadata [Hash{Symbol=>Object}, nil] Arbitrary metadata stored on the role. + # @param metadata [Hash{Symbol=>Object}, nil] + # Arbitrary metadata stored on the role. # - # @param name [String] Name of the role. + # @param name [String] + # Name of the role. # - # @param permissions [Array] Permissions associated with the role. + # @param permissions [Array] + # Permissions associated with the role. # - # @param predefined_role [Boolean] Whether the role is predefined by OpenAI. + # @param predefined_role [Boolean] + # Whether the role is predefined by OpenAI. # - # @param resource_type [String] Resource type the role applies to. + # @param resource_type [String] + # Resource type the role applies to. # - # @param updated_at [Integer, nil] When the role was last updated. - + # @param updated_at [Integer, nil] + # When the role was last updated. class AssignmentSource < OpenAI::Internal::Type::BaseModel # @!attribute principal_id # diff --git a/lib/openai/models/audio/speech_create_params.rb b/lib/openai/models/audio/speech_create_params.rb index dae2ecf86..d34534251 100644 --- a/lib/openai/models/audio/speech_create_params.rb +++ b/lib/openai/models/audio/speech_create_params.rb @@ -15,7 +15,8 @@ class SpeechCreateParams < OpenAI::Internal::Type::BaseModel required :input, String # @!attribute model - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. # # @return [String, Symbol, OpenAI::Models::Audio::SpeechModel] @@ -27,7 +28,7 @@ class SpeechCreateParams < OpenAI::Internal::Type::BaseModel # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). # # @return [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice] required :voice, union: -> { OpenAI::Audio::SpeechCreateParams::Voice } @@ -61,33 +62,49 @@ class SpeechCreateParams < OpenAI::Internal::Type::BaseModel optional :stream_format, enum: -> { OpenAI::Audio::SpeechCreateParams::StreamFormat } # @!method initialize(input:, model:, voice:, instructions: nil, response_format: nil, speed: nil, stream_format: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::SpeechCreateParams} for more details. + # @param input [String] + # The text to generate audio for. The maximum length is 4096 characters. # - # @param input [String] The text to generate audio for. The maximum length is 4096 characters. + # @param model [String, Symbol, OpenAI::Models::Audio::SpeechModel] + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): + # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. # - # @param model [String, Symbol, OpenAI::Models::Audio::SpeechModel] One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice] + # The voice to use when generating the audio. Supported built-in voices are + # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, + # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice + # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the + # voices are available in the + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). # - # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice] The voice to use when generating the audio. Supported built-in voices are `alloy + # @param instructions [String] + # Control the voice of your generated audio with additional instructions. Does not + # work with `tts-1` or `tts-1-hd`. # - # @param instructions [String] Control the voice of your generated audio with additional instructions. Does not + # @param response_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::ResponseFormat] + # The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, + # `wav`, and `pcm`. # - # @param response_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::ResponseFormat] The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav + # @param speed [Float] + # The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is + # the default. # - # @param speed [Float] The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is - # - # @param stream_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::StreamFormat] The format to stream the audio in. Supported formats are `sse` and `audio`. `sse + # @param stream_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::StreamFormat] + # The format to stream the audio in. Supported formats are `sse` and `audio`. + # `sse` is not supported for `tts-1` or `tts-1-hd`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. module Model extend OpenAI::Internal::Type::Union variant String - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + # One of the available [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. variant enum: -> { OpenAI::Audio::SpeechModel } # @!method self.variants @@ -99,7 +116,7 @@ module Model # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). module Voice extend OpenAI::Internal::Type::Union @@ -138,7 +155,8 @@ class ID < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Custom voice reference. # - # @param id [String] The custom voice ID, e.g. `voice_1234`. + # @param id [String] + # The custom voice ID, e.g. `voice_1234`. end # @!method self.variants diff --git a/lib/openai/models/audio/transcription.rb b/lib/openai/models/audio/transcription.rb index 64c7fff64..6aad21eea 100644 --- a/lib/openai/models/audio/transcription.rb +++ b/lib/openai/models/audio/transcription.rb @@ -32,20 +32,23 @@ class Transcription < OpenAI::Internal::Type::BaseModel optional :usage, union: -> { OpenAI::Audio::Transcription::Usage } # @!method initialize(text:, languages: nil, logprobs: nil, usage: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::Transcription} for more details. - # # Represents a transcription response returned by model, based on the provided # input. # - # @param text [String] The transcribed text. + # @param text [String] + # The transcribed text. # - # @param languages [Array] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra + # @param languages [Array] + # The languages detected in the audio. Returned by `gpt-transcribe`. An empty + # array indicates that no language could be reliably detected. # - # @param logprobs [Array] The log probabilities of the tokens in the transcription. Only returned with the + # @param logprobs [Array] + # The log probabilities of the tokens in the transcription. Only returned with the + # models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added + # to the `include` array. # - # @param usage [OpenAI::Models::Audio::Transcription::Usage::Tokens, OpenAI::Models::Audio::Transcription::Usage::Duration] Token usage statistics for the request. - + # @param usage [OpenAI::Models::Audio::Transcription::Usage::Tokens, OpenAI::Models::Audio::Transcription::Usage::Duration] + # Token usage statistics for the request. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # The token in the transcription. @@ -66,11 +69,14 @@ class Logprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, bytes: nil, logprob: nil) - # @param token [String] The token in the transcription. + # @param token [String] + # The token in the transcription. # - # @param bytes [Array] The bytes of the token. + # @param bytes [Array] + # The bytes of the token. # - # @param logprob [Float] The log probability of the token. + # @param logprob [Float] + # The log probability of the token. end # Token usage statistics for the request. @@ -121,15 +127,20 @@ class Tokens < OpenAI::Internal::Type::BaseModel # @!method initialize(input_tokens:, output_tokens:, total_tokens:, input_token_details: nil, type: :tokens) # Usage statistics for models billed by token usage. # - # @param input_tokens [Integer] Number of input tokens billed for this request. + # @param input_tokens [Integer] + # Number of input tokens billed for this request. # - # @param output_tokens [Integer] Number of output tokens generated. + # @param output_tokens [Integer] + # Number of output tokens generated. # - # @param total_tokens [Integer] Total number of tokens used (input + output). + # @param total_tokens [Integer] + # Total number of tokens used (input + output). # - # @param input_token_details [OpenAI::Models::Audio::Transcription::Usage::Tokens::InputTokenDetails] Details about the input tokens billed for this request. + # @param input_token_details [OpenAI::Models::Audio::Transcription::Usage::Tokens::InputTokenDetails] + # Details about the input tokens billed for this request. # - # @param type [Symbol, :tokens] The type of the usage object. Always `tokens` for this variant. + # @param type [Symbol, :tokens] + # The type of the usage object. Always `tokens` for this variant. # @see OpenAI::Models::Audio::Transcription::Usage::Tokens#input_token_details class InputTokenDetails < OpenAI::Internal::Type::BaseModel @@ -148,9 +159,11 @@ class InputTokenDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, text_tokens: nil) # Details about the input tokens billed for this request. # - # @param audio_tokens [Integer] Number of audio tokens billed for this request. + # @param audio_tokens [Integer] + # Number of audio tokens billed for this request. # - # @param text_tokens [Integer] Number of text tokens billed for this request. + # @param text_tokens [Integer] + # Number of text tokens billed for this request. end end @@ -170,9 +183,11 @@ class Duration < OpenAI::Internal::Type::BaseModel # @!method initialize(seconds:, type: :duration) # Usage statistics for models billed by audio input duration. # - # @param seconds [Float] Duration of the input audio in seconds. + # @param seconds [Float] + # Duration of the input audio in seconds. # - # @param type [Symbol, :duration] The type of the usage object. Always `duration` for this variant. + # @param type [Symbol, :duration] + # The type of the usage object. Always `duration` for this variant. end # @!method self.variants diff --git a/lib/openai/models/audio/transcription_create_params.rb b/lib/openai/models/audio/transcription_create_params.rb index 382b2060d..334b85197 100644 --- a/lib/openai/models/audio/transcription_create_params.rb +++ b/lib/openai/models/audio/transcription_create_params.rb @@ -102,7 +102,7 @@ class TranscriptionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should match the audio language. This field is not supported when using # `gpt-4o-transcribe-diarize`. # @@ -144,34 +144,92 @@ class TranscriptionCreateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file:, model:, chunking_strategy: nil, include: nil, keywords: nil, known_speaker_names: nil, known_speaker_references: nil, language: nil, languages: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionCreateParams} for more details. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The audio file object (not file name) to transcribe, in one of these formats: + # flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include + # enough format metadata for the file to be identified. We recommend an + # extension-bearing filename and an appropriate content type. # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) to transcribe, in one of these formats: fl + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, ` + # @param model [String, Symbol, OpenAI::Models::AudioModel] + # ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` + # (which is powered by our open source Whisper V2 model), and + # `gpt-4o-transcribe-diarize`. # - # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] Controls how the audio is cut into chunks. When set to `"auto"`, the server firs + # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] + # Controls how the audio is cut into chunks. When set to `"auto"`, the server + # first normalizes loudness and then uses voice activity detection (VAD) to choose + # boundaries. `server_vad` object can be provided to tweak VAD detection + # parameters manually. If unset, the audio is transcribed as a single block. + # Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 + # seconds. # - # @param include [Array] Additional information to include in the transcription response. + # @param include [Array] + # Additional information to include in the transcription response. `logprobs` will + # return the log probabilities of the tokens in the response to understand the + # model's confidence in the transcription. `logprobs` only works with + # response_format set to `json` and only with the models `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is + # not supported when using `gpt-4o-transcribe-diarize`. # - # @param keywords [Array] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr + # @param keywords [Array] + # Words or phrases to guide transcription of the input audio. Supported by + # `gpt-transcribe`. # - # @param known_speaker_names [Array] Optional list of speaker names that correspond to the audio samples provided in + # @param known_speaker_names [Array] + # Optional list of speaker names that correspond to the audio samples provided in + # `known_speaker_references[]`. Each entry should be a short identifier (for + # example `customer` or `agent`). Up to 4 speakers are supported. # - # @param known_speaker_references [Array] Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en- + # @param known_speaker_references [Array] + # Optional list of audio samples (as + # [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) + # that contain known speaker references matching `known_speaker_names[]`. Each + # sample must be between 2 and 10 seconds, and can use any of the same input audio + # formats supported by `file`. # - # @param language [String] The language of the input audio. Supplying the input language in [ISO-639-1](htt + # @param language [String] + # The language of the input audio. Supplying the input language in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) + # format will improve accuracy and latency. # - # @param languages [Array] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w + # @param languages [Array] + # Possible languages of the input audio, in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. + # Supported by `gpt-transcribe`. # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio segment + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. The + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + # should match the audio language. This field is not supported when using + # `gpt-4o-transcribe-diarize`. # - # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo + # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] + # The format of the output, in one of these options: `json`, `text`, `srt`, + # `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and + # `gpt-4o-mini-transcribe`, the only supported format is `json`. For + # `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and + # `diarized_json`, with `diarized_json` required to receive speaker annotations. # - # @param temperature [Float] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # @param temperature [Float] + # The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # output more random, while lower values like 0.2 will make it more focused and + # deterministic. If set to 0, the model will use + # [log probability](https://en.wikipedia.org/wiki/Log_probability) to + # automatically increase the temperature until certain thresholds are hit. # - # @param timestamp_granularities [Array] The timestamp granularities to populate for this transcription. `response_format + # @param timestamp_granularities [Array] + # The timestamp granularities to populate for this transcription. + # `response_format` must be set `verbose_json` to use timestamp granularities. + # Either or both of these options are supported: `word`, or `segment`. Note: There + # is no additional latency for segment timestamps, but generating word timestamps + # incurs additional latency. This option is not available for + # `gpt-4o-transcribe-diarize`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -235,17 +293,21 @@ class VadConfig < OpenAI::Internal::Type::BaseModel optional :threshold, Float # @!method initialize(type:, prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig} - # for more details. + # @param type [Symbol, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig::Type] + # Must be set to `server_vad` to enable manual chunking using server side VAD. # - # @param type [Symbol, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig::Type] Must be set to `server_vad` to enable manual chunking using server side VAD. + # @param prefix_padding_ms [Integer] + # Amount of audio to include before the VAD detected speech (in milliseconds). # - # @param prefix_padding_ms [Integer] Amount of audio to include before the VAD detected speech (in + # @param silence_duration_ms [Integer] + # Duration of silence to detect speech stop (in milliseconds). With shorter values + # the model will respond more quickly, but may jump in on short pauses from the + # user. # - # @param silence_duration_ms [Integer] Duration of silence to detect speech stop (in milliseconds). - # - # @param threshold [Float] Sensitivity threshold (0.0 to 1.0) for voice activity detection. A + # @param threshold [Float] + # Sensitivity threshold (0.0 to 1.0) for voice activity detection. A higher + # threshold will require louder audio to activate the model, and thus might + # perform better in noisy environments. # Must be set to `server_vad` to enable manual chunking using server side VAD. # diff --git a/lib/openai/models/audio/transcription_diarized.rb b/lib/openai/models/audio/transcription_diarized.rb index dc8b37348..852093728 100644 --- a/lib/openai/models/audio/transcription_diarized.rb +++ b/lib/openai/models/audio/transcription_diarized.rb @@ -38,15 +38,20 @@ class TranscriptionDiarized < OpenAI::Internal::Type::BaseModel # Represents a diarized transcription response returned by the model, including # the combined transcript and speaker-segment annotations. # - # @param duration [Float] Duration of the input audio in seconds. + # @param duration [Float] + # Duration of the input audio in seconds. # - # @param segments [Array] Segments of the transcript annotated with timestamps and speaker labels. + # @param segments [Array] + # Segments of the transcript annotated with timestamps and speaker labels. # - # @param text [String] The concatenated transcript text for the entire audio input. + # @param text [String] + # The concatenated transcript text for the entire audio input. # - # @param usage [OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens, OpenAI::Models::Audio::TranscriptionDiarized::Usage::Duration] Token or duration usage statistics for the request. + # @param usage [OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens, OpenAI::Models::Audio::TranscriptionDiarized::Usage::Duration] + # Token or duration usage statistics for the request. # - # @param task [Symbol, :transcribe] The type of task that was run. Always `transcribe`. + # @param task [Symbol, :transcribe] + # The type of task that was run. Always `transcribe`. # Token or duration usage statistics for the request. # @@ -99,15 +104,20 @@ class Tokens < OpenAI::Internal::Type::BaseModel # @!method initialize(input_tokens:, output_tokens:, total_tokens:, input_token_details: nil, type: :tokens) # Usage statistics for models billed by token usage. # - # @param input_tokens [Integer] Number of input tokens billed for this request. + # @param input_tokens [Integer] + # Number of input tokens billed for this request. # - # @param output_tokens [Integer] Number of output tokens generated. + # @param output_tokens [Integer] + # Number of output tokens generated. # - # @param total_tokens [Integer] Total number of tokens used (input + output). + # @param total_tokens [Integer] + # Total number of tokens used (input + output). # - # @param input_token_details [OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens::InputTokenDetails] Details about the input tokens billed for this request. + # @param input_token_details [OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens::InputTokenDetails] + # Details about the input tokens billed for this request. # - # @param type [Symbol, :tokens] The type of the usage object. Always `tokens` for this variant. + # @param type [Symbol, :tokens] + # The type of the usage object. Always `tokens` for this variant. # @see OpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens#input_token_details class InputTokenDetails < OpenAI::Internal::Type::BaseModel @@ -126,9 +136,11 @@ class InputTokenDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, text_tokens: nil) # Details about the input tokens billed for this request. # - # @param audio_tokens [Integer] Number of audio tokens billed for this request. + # @param audio_tokens [Integer] + # Number of audio tokens billed for this request. # - # @param text_tokens [Integer] Number of text tokens billed for this request. + # @param text_tokens [Integer] + # Number of text tokens billed for this request. end end @@ -148,9 +160,11 @@ class Duration < OpenAI::Internal::Type::BaseModel # @!method initialize(seconds:, type: :duration) # Usage statistics for models billed by audio input duration. # - # @param seconds [Float] Duration of the input audio in seconds. + # @param seconds [Float] + # Duration of the input audio in seconds. # - # @param type [Symbol, :duration] The type of the usage object. Always `duration` for this variant. + # @param type [Symbol, :duration] + # The type of the usage object. Always `duration` for this variant. end # @!method self.variants diff --git a/lib/openai/models/audio/transcription_diarized_segment.rb b/lib/openai/models/audio/transcription_diarized_segment.rb index bbdf721cc..73023b7ea 100644 --- a/lib/openai/models/audio/transcription_diarized_segment.rb +++ b/lib/openai/models/audio/transcription_diarized_segment.rb @@ -43,22 +43,27 @@ class TranscriptionDiarizedSegment < OpenAI::Internal::Type::BaseModel required :type, const: :"transcript.text.segment" # @!method initialize(id:, end_:, speaker:, start:, text:, type: :"transcript.text.segment") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionDiarizedSegment} for more details. - # # A segment of diarized transcript text with speaker metadata. # - # @param id [String] Unique identifier for the segment. + # @param id [String] + # Unique identifier for the segment. # - # @param end_ [Float] End timestamp of the segment in seconds. + # @param end_ [Float] + # End timestamp of the segment in seconds. # - # @param speaker [String] Speaker label for this segment. When known speakers are provided, the label matc + # @param speaker [String] + # Speaker label for this segment. When known speakers are provided, the label + # matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially + # using capital letters (`A`, `B`, ...). # - # @param start [Float] Start timestamp of the segment in seconds. + # @param start [Float] + # Start timestamp of the segment in seconds. # - # @param text [String] Transcript text for this segment. + # @param text [String] + # Transcript text for this segment. # - # @param type [Symbol, :"transcript.text.segment"] The type of the segment. Always `transcript.text.segment`. + # @param type [Symbol, :"transcript.text.segment"] + # The type of the segment. Always `transcript.text.segment`. end end end diff --git a/lib/openai/models/audio/transcription_language.rb b/lib/openai/models/audio/transcription_language.rb index 970804a5d..3c7f24ac4 100644 --- a/lib/openai/models/audio/transcription_language.rb +++ b/lib/openai/models/audio/transcription_language.rb @@ -13,7 +13,8 @@ class TranscriptionLanguage < OpenAI::Internal::Type::BaseModel # @!method initialize(code:) # A language detected in transcribed audio. # - # @param code [String] The code of a language detected in the audio. + # @param code [String] + # The code of a language detected in the audio. end end end diff --git a/lib/openai/models/audio/transcription_segment.rb b/lib/openai/models/audio/transcription_segment.rb index 3ca8d8671..548f73c24 100644 --- a/lib/openai/models/audio/transcription_segment.rb +++ b/lib/openai/models/audio/transcription_segment.rb @@ -68,28 +68,38 @@ class TranscriptionSegment < OpenAI::Internal::Type::BaseModel required :tokens, OpenAI::Internal::Type::ArrayOf[Integer] # @!method initialize(id:, avg_logprob:, compression_ratio:, end_:, no_speech_prob:, seek:, start:, temperature:, text:, tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionSegment} for more details. + # @param id [Integer] + # Unique identifier of the segment. # - # @param id [Integer] Unique identifier of the segment. + # @param avg_logprob [Float] + # Average logprob of the segment. If the value is lower than -1, consider the + # logprobs failed. # - # @param avg_logprob [Float] Average logprob of the segment. If the value is lower than -1, consider the logp + # @param compression_ratio [Float] + # Compression ratio of the segment. If the value is greater than 2.4, consider the + # compression failed. # - # @param compression_ratio [Float] Compression ratio of the segment. If the value is greater than 2.4, consider the + # @param end_ [Float] + # End time of the segment in seconds. # - # @param end_ [Float] End time of the segment in seconds. + # @param no_speech_prob [Float] + # Probability of no speech in the segment. If the value is higher than 1.0 and the + # `avg_logprob` is below -1, consider this segment silent. # - # @param no_speech_prob [Float] Probability of no speech in the segment. If the value is higher than 1.0 and the + # @param seek [Integer] + # Seek offset of the segment. # - # @param seek [Integer] Seek offset of the segment. + # @param start [Float] + # Start time of the segment in seconds. # - # @param start [Float] Start time of the segment in seconds. + # @param temperature [Float] + # Temperature parameter used for generating the segment. # - # @param temperature [Float] Temperature parameter used for generating the segment. + # @param text [String] + # Text content of the segment. # - # @param text [String] Text content of the segment. - # - # @param tokens [Array] Array of token IDs for the text content. + # @param tokens [Array] + # Array of token IDs for the text content. end end end diff --git a/lib/openai/models/audio/transcription_stream_event.rb b/lib/openai/models/audio/transcription_stream_event.rb index c34ec07a1..79646e7eb 100644 --- a/lib/openai/models/audio/transcription_stream_event.rb +++ b/lib/openai/models/audio/transcription_stream_event.rb @@ -5,20 +5,20 @@ module Models module Audio # Emitted when a diarized transcription returns a completed segment with speaker # information. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with `stream` set to `true` and `response_format` set to `diarized_json`. module TranscriptionStreamEvent extend OpenAI::Internal::Type::Union discriminator :type - # Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + # Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with `stream` set to `true` and `response_format` set to `diarized_json`. variant :"transcript.text.segment", -> { OpenAI::Audio::TranscriptionTextSegmentEvent } - # Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + # Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. variant :"transcript.text.delta", -> { OpenAI::Audio::TranscriptionTextDeltaEvent } - # Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + # Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) with the `Stream` parameter set to `true`. variant :"transcript.text.done", -> { OpenAI::Audio::TranscriptionTextDoneEvent } # @!method self.variants diff --git a/lib/openai/models/audio/transcription_text_delta_event.rb b/lib/openai/models/audio/transcription_text_delta_event.rb index 7e8ad71d3..bcb53f422 100644 --- a/lib/openai/models/audio/transcription_text_delta_event.rb +++ b/lib/openai/models/audio/transcription_text_delta_event.rb @@ -18,7 +18,7 @@ class TranscriptionTextDeltaEvent < OpenAI::Internal::Type::BaseModel # @!attribute logprobs # The log probabilities of the delta. Only included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. # # @return [Array, nil] @@ -35,22 +35,25 @@ class TranscriptionTextDeltaEvent < OpenAI::Internal::Type::BaseModel optional :segment_id, String # @!method initialize(delta:, logprobs: nil, segment_id: nil, type: :"transcript.text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionTextDeltaEvent} for more details. - # # Emitted when there is an additional text delta. This is also the first event # emitted when the transcription starts. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `Stream` parameter set to `true`. # - # @param delta [String] The text delta that was additionally transcribed. + # @param delta [String] + # The text delta that was additionally transcribed. # - # @param logprobs [Array] The log probabilities of the delta. Only included if you [create a transcription + # @param logprobs [Array] + # The log probabilities of the delta. Only included if you + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) + # with the `include[]` parameter set to `logprobs`. # - # @param segment_id [String] Identifier of the diarized segment that this delta belongs to. Only present when + # @param segment_id [String] + # Identifier of the diarized segment that this delta belongs to. Only present when + # using `gpt-4o-transcribe-diarize`. # - # @param type [Symbol, :"transcript.text.delta"] The type of the event. Always `transcript.text.delta`. - + # @param type [Symbol, :"transcript.text.delta"] + # The type of the event. Always `transcript.text.delta`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # The token that was used to generate the log probability. @@ -71,14 +74,14 @@ class Logprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, bytes: nil, logprob: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionTextDeltaEvent::Logprob} for more details. - # - # @param token [String] The token that was used to generate the log probability. + # @param token [String] + # The token that was used to generate the log probability. # - # @param bytes [Array] The bytes that were used to generate the log probability. + # @param bytes [Array] + # The bytes that were used to generate the log probability. # - # @param logprob [Float] The log probability of the token. + # @param logprob [Float] + # The log probability of the token. end end end diff --git a/lib/openai/models/audio/transcription_text_done_event.rb b/lib/openai/models/audio/transcription_text_done_event.rb index 1a1ba44e4..473eba8f4 100644 --- a/lib/openai/models/audio/transcription_text_done_event.rb +++ b/lib/openai/models/audio/transcription_text_done_event.rb @@ -26,7 +26,7 @@ class TranscriptionTextDoneEvent < OpenAI::Internal::Type::BaseModel # @!attribute logprobs # The log probabilities of the individual tokens in the transcription. Only # included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. # # @return [Array, nil] @@ -42,24 +42,29 @@ class TranscriptionTextDoneEvent < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::Audio::TranscriptionTextDoneEvent::Usage } # @!method initialize(text:, languages: nil, logprobs: nil, usage: nil, type: :"transcript.text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionTextDoneEvent} for more details. - # # Emitted when the transcription is complete. Contains the complete transcription # text. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `Stream` parameter set to `true`. # - # @param text [String] The text that was transcribed. + # @param text [String] + # The text that was transcribed. # - # @param languages [Array] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra + # @param languages [Array] + # The languages detected in the audio. Returned by `gpt-transcribe`. An empty + # array indicates that no language could be reliably detected. # - # @param logprobs [Array] The log probabilities of the individual tokens in the transcription. Only includ + # @param logprobs [Array] + # The log probabilities of the individual tokens in the transcription. Only + # included if you + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) + # with the `include[]` parameter set to `logprobs`. # - # @param usage [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage] Usage statistics for models billed by token usage. + # @param usage [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage] + # Usage statistics for models billed by token usage. # - # @param type [Symbol, :"transcript.text.done"] The type of the event. Always `transcript.text.done`. - + # @param type [Symbol, :"transcript.text.done"] + # The type of the event. Always `transcript.text.done`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # The token that was used to generate the log probability. @@ -80,14 +85,14 @@ class Logprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, bytes: nil, logprob: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionTextDoneEvent::Logprob} for more details. - # - # @param token [String] The token that was used to generate the log probability. + # @param token [String] + # The token that was used to generate the log probability. # - # @param bytes [Array] The bytes that were used to generate the log probability. + # @param bytes [Array] + # The bytes that were used to generate the log probability. # - # @param logprob [Float] The log probability of the token. + # @param logprob [Float] + # The log probability of the token. end # @see OpenAI::Models::Audio::TranscriptionTextDoneEvent#usage @@ -125,15 +130,20 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(input_tokens:, output_tokens:, total_tokens:, input_token_details: nil, type: :tokens) # Usage statistics for models billed by token usage. # - # @param input_tokens [Integer] Number of input tokens billed for this request. + # @param input_tokens [Integer] + # Number of input tokens billed for this request. # - # @param output_tokens [Integer] Number of output tokens generated. + # @param output_tokens [Integer] + # Number of output tokens generated. # - # @param total_tokens [Integer] Total number of tokens used (input + output). + # @param total_tokens [Integer] + # Total number of tokens used (input + output). # - # @param input_token_details [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage::InputTokenDetails] Details about the input tokens billed for this request. + # @param input_token_details [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage::InputTokenDetails] + # Details about the input tokens billed for this request. # - # @param type [Symbol, :tokens] The type of the usage object. Always `tokens` for this variant. + # @param type [Symbol, :tokens] + # The type of the usage object. Always `tokens` for this variant. # @see OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage#input_token_details class InputTokenDetails < OpenAI::Internal::Type::BaseModel @@ -152,9 +162,11 @@ class InputTokenDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, text_tokens: nil) # Details about the input tokens billed for this request. # - # @param audio_tokens [Integer] Number of audio tokens billed for this request. + # @param audio_tokens [Integer] + # Number of audio tokens billed for this request. # - # @param text_tokens [Integer] Number of text tokens billed for this request. + # @param text_tokens [Integer] + # Number of text tokens billed for this request. end end end diff --git a/lib/openai/models/audio/transcription_text_segment_event.rb b/lib/openai/models/audio/transcription_text_segment_event.rb index 289d69cc3..3074d35dc 100644 --- a/lib/openai/models/audio/transcription_text_segment_event.rb +++ b/lib/openai/models/audio/transcription_text_segment_event.rb @@ -43,20 +43,26 @@ class TranscriptionTextSegmentEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, end_:, speaker:, start:, text:, type: :"transcript.text.segment") # Emitted when a diarized transcription returns a completed segment with speaker # information. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with `stream` set to `true` and `response_format` set to `diarized_json`. # - # @param id [String] Unique identifier for the segment. + # @param id [String] + # Unique identifier for the segment. # - # @param end_ [Float] End timestamp of the segment in seconds. + # @param end_ [Float] + # End timestamp of the segment in seconds. # - # @param speaker [String] Speaker label for this segment. + # @param speaker [String] + # Speaker label for this segment. # - # @param start [Float] Start timestamp of the segment in seconds. + # @param start [Float] + # Start timestamp of the segment in seconds. # - # @param text [String] Transcript text for this segment. + # @param text [String] + # Transcript text for this segment. # - # @param type [Symbol, :"transcript.text.segment"] The type of the event. Always `transcript.text.segment`. + # @param type [Symbol, :"transcript.text.segment"] + # The type of the event. Always `transcript.text.segment`. end end end diff --git a/lib/openai/models/audio/transcription_verbose.rb b/lib/openai/models/audio/transcription_verbose.rb index 678f54dd6..b4f2865f4 100644 --- a/lib/openai/models/audio/transcription_verbose.rb +++ b/lib/openai/models/audio/transcription_verbose.rb @@ -44,17 +44,23 @@ class TranscriptionVerbose < OpenAI::Internal::Type::BaseModel # Represents a verbose json transcription response returned by model, based on the # provided input. # - # @param duration [Float] The duration of the input audio. + # @param duration [Float] + # The duration of the input audio. # - # @param language [String] The language of the input audio. + # @param language [String] + # The language of the input audio. # - # @param text [String] The transcribed text. + # @param text [String] + # The transcribed text. # - # @param segments [Array] Segments of the transcribed text and their corresponding details. + # @param segments [Array] + # Segments of the transcribed text and their corresponding details. # - # @param usage [OpenAI::Models::Audio::TranscriptionVerbose::Usage] Usage statistics for models billed by audio input duration. + # @param usage [OpenAI::Models::Audio::TranscriptionVerbose::Usage] + # Usage statistics for models billed by audio input duration. # - # @param words [Array] Extracted words and their corresponding timestamps. + # @param words [Array] + # Extracted words and their corresponding timestamps. # @see OpenAI::Models::Audio::TranscriptionVerbose#usage class Usage < OpenAI::Internal::Type::BaseModel @@ -73,9 +79,11 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(seconds:, type: :duration) # Usage statistics for models billed by audio input duration. # - # @param seconds [Float] Duration of the input audio in seconds. + # @param seconds [Float] + # Duration of the input audio in seconds. # - # @param type [Symbol, :duration] The type of the usage object. Always `duration` for this variant. + # @param type [Symbol, :duration] + # The type of the usage object. Always `duration` for this variant. end end end diff --git a/lib/openai/models/audio/transcription_word.rb b/lib/openai/models/audio/transcription_word.rb index b9e5da59b..4c67acf6d 100644 --- a/lib/openai/models/audio/transcription_word.rb +++ b/lib/openai/models/audio/transcription_word.rb @@ -23,11 +23,14 @@ class TranscriptionWord < OpenAI::Internal::Type::BaseModel required :word, String # @!method initialize(end_:, start:, word:) - # @param end_ [Float] End time of the word in seconds. + # @param end_ [Float] + # End time of the word in seconds. # - # @param start [Float] Start time of the word in seconds. + # @param start [Float] + # Start time of the word in seconds. # - # @param word [String] The text content of the word. + # @param word [String] + # The text content of the word. end end end diff --git a/lib/openai/models/audio/translation_create_params.rb b/lib/openai/models/audio/translation_create_params.rb index 604154571..0d67f4eff 100644 --- a/lib/openai/models/audio/translation_create_params.rb +++ b/lib/openai/models/audio/translation_create_params.rb @@ -31,7 +31,7 @@ class TranslationCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should be in English. # # @return [String, nil] @@ -55,18 +55,36 @@ class TranslationCreateParams < OpenAI::Internal::Type::BaseModel optional :temperature, Float # @!method initialize(file:, model:, prompt: nil, response_format: nil, temperature: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranslationCreateParams} for more details. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The audio file object (not file name) translate, in one of these formats: flac, + # mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include enough + # format metadata for the file to be identified. We recommend an extension-bearing + # filename and an appropriate content type. # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) translate, in one of these formats: flac, + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. Only `whisper-1` (which is powered by our open source Wh + # @param model [String, Symbol, OpenAI::Models::AudioModel] + # ID of the model to use. Only `whisper-1` (which is powered by our open source + # Whisper V2 model) is currently available. # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio segment + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. The + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + # should be in English. # - # @param response_format [Symbol, OpenAI::Models::Audio::TranslationCreateParams::ResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo + # @param response_format [Symbol, OpenAI::Models::Audio::TranslationCreateParams::ResponseFormat] + # The format of the output, in one of these options: `json`, `text`, `srt`, + # `verbose_json`, or `vtt`. # - # @param temperature [Float] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # @param temperature [Float] + # The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # output more random, while lower values like 0.2 will make it more focused and + # deterministic. If set to 0, the model will use + # [log probability](https://en.wikipedia.org/wiki/Log_probability) to + # automatically increase the temperature until certain thresholds are hit. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/audio/translation_verbose.rb b/lib/openai/models/audio/translation_verbose.rb index 1bb16b1ea..7a58e2156 100644 --- a/lib/openai/models/audio/translation_verbose.rb +++ b/lib/openai/models/audio/translation_verbose.rb @@ -29,13 +29,17 @@ class TranslationVerbose < OpenAI::Internal::Type::BaseModel optional :segments, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionSegment] } # @!method initialize(duration:, language:, text:, segments: nil) - # @param duration [Float] The duration of the input audio. + # @param duration [Float] + # The duration of the input audio. # - # @param language [String] The language of the output translation (always `english`). + # @param language [String] + # The language of the output translation (always `english`). # - # @param text [String] The translated text. + # @param text [String] + # The translated text. # - # @param segments [Array] Segments of the translated text and their corresponding details. + # @param segments [Array] + # Segments of the translated text and their corresponding details. end end end diff --git a/lib/openai/models/auto_file_chunking_strategy_param.rb b/lib/openai/models/auto_file_chunking_strategy_param.rb index 0bb7685ff..e82a50c1d 100644 --- a/lib/openai/models/auto_file_chunking_strategy_param.rb +++ b/lib/openai/models/auto_file_chunking_strategy_param.rb @@ -13,7 +13,8 @@ class AutoFileChunkingStrategyParam < OpenAI::Internal::Type::BaseModel # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of # `800` and `chunk_overlap_tokens` of `400`. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. end end end diff --git a/lib/openai/models/batch.rb b/lib/openai/models/batch.rb index c0737d893..a7c76e872 100644 --- a/lib/openai/models/batch.rb +++ b/lib/openai/models/batch.rb @@ -119,8 +119,8 @@ class Batch < OpenAI::Internal::Type::BaseModel # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, nil] optional :model, String @@ -146,52 +146,80 @@ class Batch < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::BatchUsage } # @!method initialize(id:, completion_window:, created_at:, endpoint:, input_file_id:, status:, cancelled_at: nil, cancelling_at: nil, completed_at: nil, error_file_id: nil, errors: nil, expired_at: nil, expires_at: nil, failed_at: nil, finalizing_at: nil, in_progress_at: nil, metadata: nil, model: nil, output_file_id: nil, request_counts: nil, usage: nil, object: :batch) - # Some parameter documentations has been truncated, see {OpenAI::Models::Batch} - # for more details. - # # @param id [String] # - # @param completion_window [String] The time frame within which the batch should be processed. + # @param completion_window [String] + # The time frame within which the batch should be processed. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the batch was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the batch was created. # - # @param endpoint [String] The OpenAI API endpoint used by the batch. + # @param endpoint [String] + # The OpenAI API endpoint used by the batch. # - # @param input_file_id [String] The ID of the input file for the batch. + # @param input_file_id [String] + # The ID of the input file for the batch. # - # @param status [Symbol, OpenAI::Models::Batch::Status] The current status of the batch. + # @param status [Symbol, OpenAI::Models::Batch::Status] + # The current status of the batch. # - # @param cancelled_at [Integer] The Unix timestamp (in seconds) for when the batch was cancelled. + # @param cancelled_at [Integer] + # The Unix timestamp (in seconds) for when the batch was cancelled. # - # @param cancelling_at [Integer] The Unix timestamp (in seconds) for when the batch started cancelling. + # @param cancelling_at [Integer] + # The Unix timestamp (in seconds) for when the batch started cancelling. # - # @param completed_at [Integer] The Unix timestamp (in seconds) for when the batch was completed. + # @param completed_at [Integer] + # The Unix timestamp (in seconds) for when the batch was completed. # - # @param error_file_id [String] The ID of the file containing the outputs of requests with errors. + # @param error_file_id [String] + # The ID of the file containing the outputs of requests with errors. # # @param errors [OpenAI::Models::Batch::Errors] # - # @param expired_at [Integer] The Unix timestamp (in seconds) for when the batch expired. + # @param expired_at [Integer] + # The Unix timestamp (in seconds) for when the batch expired. + # + # @param expires_at [Integer] + # The Unix timestamp (in seconds) for when the batch will expire. # - # @param expires_at [Integer] The Unix timestamp (in seconds) for when the batch will expire. + # @param failed_at [Integer] + # The Unix timestamp (in seconds) for when the batch failed. # - # @param failed_at [Integer] The Unix timestamp (in seconds) for when the batch failed. + # @param finalizing_at [Integer] + # The Unix timestamp (in seconds) for when the batch started finalizing. # - # @param finalizing_at [Integer] The Unix timestamp (in seconds) for when the batch started finalizing. + # @param in_progress_at [Integer] + # The Unix timestamp (in seconds) for when the batch started processing. # - # @param in_progress_at [Integer] The Unix timestamp (in seconds) for when the batch started processing. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param model [String] Model ID used to process the batch, like `gpt-6-astra`. OpenAI + # @param model [String] + # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param output_file_id [String] The ID of the file containing the outputs of successfully executed requests. + # @param output_file_id [String] + # The ID of the file containing the outputs of successfully executed requests. # - # @param request_counts [OpenAI::Models::BatchRequestCounts] The request counts for different statuses within the batch. + # @param request_counts [OpenAI::Models::BatchRequestCounts] + # The request counts for different statuses within the batch. # - # @param usage [OpenAI::Models::BatchUsage] Represents token usage details including input tokens, output tokens, a + # @param usage [OpenAI::Models::BatchUsage] + # Represents token usage details including input tokens, output tokens, a + # breakdown of output tokens, and the total tokens used. Only populated on batches + # created after September 7, 2025. # - # @param object [Symbol, :batch] The object type, which is always `batch`. + # @param object [Symbol, :batch] + # The object type, which is always `batch`. # The current status of the batch. # @@ -228,7 +256,8 @@ class Errors < OpenAI::Internal::Type::BaseModel # @!method initialize(data: nil, object: nil) # @param data [Array] # - # @param object [String] The object type, which is always `list`. + # @param object [String] + # The object type, which is always `list`. end end end diff --git a/lib/openai/models/batch_create_params.rb b/lib/openai/models/batch_create_params.rb index eaada4038..6a1d233d4 100644 --- a/lib/openai/models/batch_create_params.rb +++ b/lib/openai/models/batch_create_params.rb @@ -28,11 +28,12 @@ class BatchCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute input_file_id # The ID of an uploaded file that contains requests for the new batch. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your input file must be formatted as a - # [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 # requests, and can be up to 200 MB in size. # @@ -58,18 +59,41 @@ class BatchCreateParams < OpenAI::Internal::Type::BaseModel optional :output_expires_after, -> { OpenAI::BatchCreateParams::OutputExpiresAfter } # @!method initialize(completion_window:, endpoint:, input_file_id:, metadata: nil, output_expires_after: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchCreateParams} for more details. + # @param completion_window [Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow] + # The time frame within which the batch should be processed. Currently only `24h` + # is supported. # - # @param completion_window [Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow] The time frame within which the batch should be processed. Currently only `24h` + # @param endpoint [Symbol, OpenAI::Models::BatchCreateParams::Endpoint] + # The endpoint to be used for all requests in the batch. Currently + # `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, + # `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and + # `/v1/videos` are supported. Note that `/v1/embeddings` batches are also + # restricted to a maximum of 50,000 embedding inputs across all requests in the + # batch. # - # @param endpoint [Symbol, OpenAI::Models::BatchCreateParams::Endpoint] The endpoint to be used for all requests in the batch. Currently `/v1/responses` + # @param input_file_id [String] + # The ID of an uploaded file that contains requests for the new batch. # - # @param input_file_id [String] The ID of an uploaded file that contains requests for the new batch. + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) + # for how to upload a file. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Your input file must be formatted as a + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), + # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 + # requests, and can be up to 200 MB in size. # - # @param output_expires_after [OpenAI::Models::BatchCreateParams::OutputExpiresAfter] The expiration policy for the output and/or error file that are generated for a + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param output_expires_after [OpenAI::Models::BatchCreateParams::OutputExpiresAfter] + # The expiration policy for the output and/or error file that are generated for a + # batch. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -123,15 +147,17 @@ class OutputExpiresAfter < OpenAI::Internal::Type::BaseModel required :seconds, Integer # @!method initialize(seconds:, anchor: :created_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchCreateParams::OutputExpiresAfter} for more details. - # # The expiration policy for the output and/or error file that are generated for a # batch. # - # @param seconds [Integer] The number of seconds after the anchor time that the file will expire. Must be b + # @param seconds [Integer] + # The number of seconds after the anchor time that the file will expire. Must be + # between 3600 (1 hour) and 2592000 (30 days). # - # @param anchor [Symbol, :created_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :created_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `created_at`. Note that the anchor is the file creation time, not the time the + # batch is created. end end end diff --git a/lib/openai/models/batch_error.rb b/lib/openai/models/batch_error.rb index 538e11830..73780a2b3 100644 --- a/lib/openai/models/batch_error.rb +++ b/lib/openai/models/batch_error.rb @@ -28,13 +28,17 @@ class BatchError < OpenAI::Internal::Type::BaseModel optional :param, String, nil?: true # @!method initialize(code: nil, line: nil, message: nil, param: nil) - # @param code [String] An error code identifying the error type. + # @param code [String] + # An error code identifying the error type. # - # @param line [Integer, nil] The line number of the input file where the error occurred, if applicable. + # @param line [Integer, nil] + # The line number of the input file where the error occurred, if applicable. # - # @param message [String] A human-readable message providing more details about the error. + # @param message [String] + # A human-readable message providing more details about the error. # - # @param param [String, nil] The name of the parameter that caused the error, if applicable. + # @param param [String, nil] + # The name of the parameter that caused the error, if applicable. end end end diff --git a/lib/openai/models/batch_list_params.rb b/lib/openai/models/batch_list_params.rb index 1a01f061f..82963f890 100644 --- a/lib/openai/models/batch_list_params.rb +++ b/lib/openai/models/batch_list_params.rb @@ -24,12 +24,15 @@ class BatchListParams < OpenAI::Internal::Type::BaseModel optional :limit, Integer # @!method initialize(after: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/batch_request_counts.rb b/lib/openai/models/batch_request_counts.rb index e8e7caf02..a2b42db95 100644 --- a/lib/openai/models/batch_request_counts.rb +++ b/lib/openai/models/batch_request_counts.rb @@ -24,11 +24,14 @@ class BatchRequestCounts < OpenAI::Internal::Type::BaseModel # @!method initialize(completed:, failed:, total:) # The request counts for different statuses within the batch. # - # @param completed [Integer] Number of requests that have been completed successfully. + # @param completed [Integer] + # Number of requests that have been completed successfully. # - # @param failed [Integer] Number of requests that have failed. + # @param failed [Integer] + # Number of requests that have failed. # - # @param total [Integer] Total number of requests in the batch. + # @param total [Integer] + # Total number of requests in the batch. end end end diff --git a/lib/openai/models/batch_usage.rb b/lib/openai/models/batch_usage.rb index 003b102fa..e1ee4c3b4 100644 --- a/lib/openai/models/batch_usage.rb +++ b/lib/openai/models/batch_usage.rb @@ -38,32 +38,36 @@ class BatchUsage < OpenAI::Internal::Type::BaseModel # breakdown of output tokens, and the total tokens used. Only populated on batches # created after September 7, 2025. # - # @param input_tokens [Integer] The number of input tokens. + # @param input_tokens [Integer] + # The number of input tokens. # - # @param input_tokens_details [OpenAI::Models::BatchUsage::InputTokensDetails] A detailed breakdown of the input tokens. + # @param input_tokens_details [OpenAI::Models::BatchUsage::InputTokensDetails] + # A detailed breakdown of the input tokens. # - # @param output_tokens [Integer] The number of output tokens. + # @param output_tokens [Integer] + # The number of output tokens. # - # @param output_tokens_details [OpenAI::Models::BatchUsage::OutputTokensDetails] A detailed breakdown of the output tokens. + # @param output_tokens_details [OpenAI::Models::BatchUsage::OutputTokensDetails] + # A detailed breakdown of the output tokens. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. # @see OpenAI::Models::BatchUsage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!attribute cached_tokens # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [Integer] required :cached_tokens, Integer # @!method initialize(cached_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchUsage::InputTokensDetails} for more details. - # # A detailed breakdown of the input tokens. # - # @param cached_tokens [Integer] The number of tokens that were retrieved from the cache. [More on + # @param cached_tokens [Integer] + # The number of tokens that were retrieved from the cache. + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). end # @see OpenAI::Models::BatchUsage#output_tokens_details @@ -77,7 +81,8 @@ class OutputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(reasoning_tokens:) # A detailed breakdown of the output tokens. # - # @param reasoning_tokens [Integer] The number of reasoning tokens. + # @param reasoning_tokens [Integer] + # The number of reasoning tokens. end end end diff --git a/lib/openai/models/beta/assistant.rb b/lib/openai/models/beta/assistant.rb index 0538aa7e7..7cdee3565 100644 --- a/lib/openai/models/beta/assistant.rb +++ b/lib/openai/models/beta/assistant.rb @@ -45,10 +45,10 @@ class Assistant < OpenAI::Internal::Type::BaseModel # @!attribute model # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # # @return [String] required :model, String @@ -75,14 +75,14 @@ class Assistant < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -126,36 +126,86 @@ class Assistant < OpenAI::Internal::Type::BaseModel optional :top_p, Float, nil?: true # @!method initialize(id:, created_at:, description:, instructions:, metadata:, model:, name:, tools:, response_format: nil, temperature: nil, tool_resources: nil, top_p: nil, object: :assistant) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Assistant} for more details. - # # Represents an `assistant` that can call the model and use tools. # - # @param id [String] The identifier, which can be referenced in API endpoints. - # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the assistant was created. - # - # @param description [String, nil] The description of the assistant. The maximum length is 512 characters. - # - # @param instructions [String, nil] The system instructions that the assistant uses. The maximum length is 256,000 c - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String] ID of the model to use. You can use the [List models](https://platform.openai.co - # - # @param name [String, nil] The name of the assistant. The maximum length is 256 characters. - # - # @param tools [Array] A list of tool enabled on the assistant. There can be a maximum of 128 tools per - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_resources [OpenAI::Models::Beta::Assistant::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the - # - # @param object [Symbol, :assistant] The object type, which is always `assistant`. + # @param id [String] + # The identifier, which can be referenced in API endpoints. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the assistant was created. + # + # @param description [String, nil] + # The description of the assistant. The maximum length is 512 characters. + # + # @param instructions [String, nil] + # The system instructions that the assistant uses. The maximum length is 256,000 + # characters. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. + # + # @param name [String, nil] + # The name of the assistant. The maximum length is 256 characters. + # + # @param tools [Array] + # A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # assistant. Tools can be of types `code_interpreter`, `file_search`, or + # `function`. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param tool_resources [OpenAI::Models::Beta::Assistant::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param object [Symbol, :assistant] + # The object type, which is always `assistant`. # @see OpenAI::Models::Beta::Assistant#tool_resources class ToolResources < OpenAI::Internal::Type::BaseModel @@ -181,26 +231,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::Assistant::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter`` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Assistant::ToolResources::CodeInterpreter} for more - # details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::Assistant::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. # @@ -208,10 +257,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(vector_store_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Assistant::ToolResources::FileSearch} for more details. - # - # @param vector_store_ids [Array] The ID of the [vector store](https://platform.openai.com/docs/api-reference/vect + # @param vector_store_ids [Array] + # The ID of the + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this assistant. There can be a maximum of 1 vector store attached to + # the assistant. end end end diff --git a/lib/openai/models/beta/assistant_create_params.rb b/lib/openai/models/beta/assistant_create_params.rb index 9af4800d3..8529204c5 100644 --- a/lib/openai/models/beta/assistant_create_params.rb +++ b/lib/openai/models/beta/assistant_create_params.rb @@ -10,10 +10,10 @@ class AssistantCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # # @return [String, Symbol, OpenAI::Models::ChatModel] required :model, union: -> { OpenAI::Beta::AssistantCreateParams::Model } @@ -53,7 +53,7 @@ class AssistantCreateParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -61,14 +61,14 @@ class AssistantCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -120,44 +120,97 @@ class AssistantCreateParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float, nil?: true # @!method initialize(model:, description: nil, instructions: nil, metadata: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams} for more details. + # @param model [String, Symbol, OpenAI::Models::ChatModel] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # - # @param model [String, Symbol, OpenAI::Models::ChatModel] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param description [String, nil] + # The description of the assistant. The maximum length is 512 characters. # - # @param description [String, nil] The description of the assistant. The maximum length is 512 characters. + # @param instructions [String, nil] + # The system instructions that the assistant uses. The maximum length is 256,000 + # characters. # - # @param instructions [String, nil] The system instructions that the assistant uses. The maximum length is 256,000 c + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String, nil] The name of the assistant. The maximum length is 256 characters. + # @param name [String, nil] + # The name of the assistant. The maximum length is 256 characters. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. # - # @param tools [Array] A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array] + # A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # assistant. Tools can be of types `code_interpreter`, `file_search`, or + # `function`. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union variant String - # ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + # ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. variant enum: -> { OpenAI::ChatModel } # @!method self.variants @@ -187,26 +240,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::AssistantCreateParams::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams::ToolResources::CodeInterpreter} - # for more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::AssistantCreateParams::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. # @@ -215,7 +267,7 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_stores # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this assistant. There can be a maximum of 1 # vector store attached to the assistant. # @@ -230,14 +282,17 @@ class FileSearch < OpenAI::Internal::Type::BaseModel ) # @!method initialize(vector_store_ids: nil, vector_stores: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch} for - # more details. - # - # @param vector_store_ids [Array] The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/ + # @param vector_store_ids [Array] + # The + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this assistant. There can be a maximum of 1 vector store attached to + # the assistant. # - # @param vector_stores [Array] A helper to create a [vector store](https://platform.openai.com/docs/api-referen - + # @param vector_stores [Array] + # A helper to create a + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # with file_ids and attach it to this assistant. There can be a maximum of 1 + # vector store attached to the assistant. class VectorStore < OpenAI::Internal::Type::BaseModel # @!attribute chunking_strategy # The chunking strategy used to chunk the file(s). If not set, will use the `auto` @@ -252,10 +307,10 @@ class VectorStore < OpenAI::Internal::Type::BaseModel ) # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] @@ -272,15 +327,23 @@ class VectorStore < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(chunking_strategy: nil, file_ids: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore} - # for more details. + # @param chunking_strategy [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. # - # @param chunking_strategy [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to ad + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The chunking strategy used to chunk the file(s). If not set, will use the `auto` # strategy. @@ -317,7 +380,8 @@ class Auto < OpenAI::Internal::Type::BaseModel # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of # `800` and `chunk_overlap_tokens` of `400`. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. end class Static < OpenAI::Internal::Type::BaseModel @@ -340,7 +404,8 @@ class Static < OpenAI::Internal::Type::BaseModel # @!method initialize(static:, type: :static) # @param static [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static] # - # @param type [Symbol, :static] Always `static`. + # @param type [Symbol, :static] + # Always `static`. # @see OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static#static class Static < OpenAI::Internal::Type::BaseModel @@ -360,13 +425,14 @@ class Static < OpenAI::Internal::Type::BaseModel required :max_chunk_size_tokens, Integer # @!method initialize(chunk_overlap_tokens:, max_chunk_size_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static} - # for more details. + # @param chunk_overlap_tokens [Integer] + # The number of tokens that overlap between chunks. The default value is `400`. # - # @param chunk_overlap_tokens [Integer] The number of tokens that overlap between chunks. The default value is `400`. + # Note that the overlap must not exceed half of `max_chunk_size_tokens`. # - # @param max_chunk_size_tokens [Integer] The maximum number of tokens in each chunk. The default value is `800`. The mini + # @param max_chunk_size_tokens [Integer] + # The maximum number of tokens in each chunk. The default value is `800`. The + # minimum value is `100` and the maximum value is `4096`. end end diff --git a/lib/openai/models/beta/assistant_list_params.rb b/lib/openai/models/beta/assistant_list_params.rb index 752af1a6c..13d9be71b 100644 --- a/lib/openai/models/beta/assistant_list_params.rb +++ b/lib/openai/models/beta/assistant_list_params.rb @@ -41,16 +41,25 @@ class AssistantListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Beta::AssistantListParams::Order } # @!method initialize(after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 - # - # @param order [Symbol, OpenAI::Models::Beta::AssistantListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::AssistantListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/assistant_response_format_option.rb b/lib/openai/models/beta/assistant_response_format_option.rb index 7541c8b2a..7837c5cc2 100644 --- a/lib/openai/models/beta/assistant_response_format_option.rb +++ b/lib/openai/models/beta/assistant_response_format_option.rb @@ -4,14 +4,14 @@ module OpenAI module Models module Beta # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -39,7 +39,7 @@ module AssistantResponseFormatOption variant -> { OpenAI::ResponseFormatJSONObject } # JSON Schema response format. Used to generate structured JSON responses. - # Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). variant -> { OpenAI::ResponseFormatJSONSchema } # @!method self.variants diff --git a/lib/openai/models/beta/assistant_stream_event.rb b/lib/openai/models/beta/assistant_stream_event.rb index a4113b4ee..b43218f0e 100644 --- a/lib/openai/models/beta/assistant_stream_event.rb +++ b/lib/openai/models/beta/assistant_stream_event.rb @@ -21,89 +21,89 @@ module Beta # # We may add additional events over time, so we recommend handling unknown events # gracefully in your code. See the - # [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) + # [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) # to learn how to integrate the Assistants API with streaming. module AssistantStreamEvent extend OpenAI::Internal::Type::Union discriminator :event - # Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + # Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.created", -> { OpenAI::Beta::AssistantStreamEvent::ThreadCreated } - # Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.run.created", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunCreated } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status. variant :"thread.run.queued", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunQueued } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status. variant :"thread.run.in_progress", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunInProgress } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status. variant :"thread.run.requires_action", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunRequiresAction } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.run.completed", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunCompleted } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`. variant :"thread.run.incomplete", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunIncomplete } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails. variant :"thread.run.failed", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunFailed } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status. variant :"thread.run.cancelling", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunCancelling } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled. variant :"thread.run.cancelled", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunCancelled } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires. variant :"thread.run.expired", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunExpired } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.run.step.created", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepCreated } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. variant :"thread.run.step.in_progress", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepInProgress } - # Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + # Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed. variant :"thread.run.step.delta", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepDelta } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.run.step.completed", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepCompleted } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails. variant :"thread.run.step.failed", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepFailed } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled. variant :"thread.run.step.cancelled", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepCancelled } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires. variant :"thread.run.step.expired", -> { OpenAI::Beta::AssistantStreamEvent::ThreadRunStepExpired } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.message.created", -> { OpenAI::Beta::AssistantStreamEvent::ThreadMessageCreated } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. variant :"thread.message.in_progress", -> { OpenAI::Beta::AssistantStreamEvent::ThreadMessageInProgress } - # Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + # Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed. variant :"thread.message.delta", -> { OpenAI::Beta::AssistantStreamEvent::ThreadMessageDelta } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.message.completed", -> { OpenAI::Beta::AssistantStreamEvent::ThreadMessageCompleted } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed. variant :"thread.message.incomplete", -> { OpenAI::Beta::AssistantStreamEvent::ThreadMessageIncomplete } - # Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. + # Occurs when an [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. variant :error, -> { OpenAI::Beta::AssistantStreamEvent::ErrorEvent } class ThreadCreated < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Thread] required :data, -> { OpenAI::Beta::Thread } @@ -120,16 +120,16 @@ class ThreadCreated < OpenAI::Internal::Type::BaseModel optional :enabled, OpenAI::Internal::Type::Boolean # @!method initialize(data:, enabled: nil, event: :"thread.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadCreated} for more details. - # # Occurs when a new - # [thread](https://platform.openai.com/docs/api-reference/threads/object) is + # [thread](https://developers.openai.com/api/docs/assistants/migration) is # created. # - # @param data [OpenAI::Models::Beta::Thread] Represents a thread that contains [messages](https://platform.openai.com/docs/ap + # @param data [OpenAI::Models::Beta::Thread] + # Represents a thread that contains + # [messages](https://developers.openai.com/api/docs/assistants/migration). # - # @param enabled [Boolean] Whether to enable input audio transcription. + # @param enabled [Boolean] + # Whether to enable input audio transcription. # # @param event [Symbol, :"thread.created"] end @@ -137,7 +137,7 @@ class ThreadCreated < OpenAI::Internal::Type::BaseModel class ThreadRunCreated < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -148,13 +148,12 @@ class ThreadRunCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.created" # @!method initialize(data:, event: :"thread.run.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunCreated} for more details. - # # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.created"] end @@ -162,7 +161,7 @@ class ThreadRunCreated < OpenAI::Internal::Type::BaseModel class ThreadRunQueued < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -173,13 +172,12 @@ class ThreadRunQueued < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.queued" # @!method initialize(data:, event: :"thread.run.queued") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunQueued} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `queued` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.queued"] end @@ -187,7 +185,7 @@ class ThreadRunQueued < OpenAI::Internal::Type::BaseModel class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -198,14 +196,12 @@ class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.in_progress" # @!method initialize(data:, event: :"thread.run.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunInProgress} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to an `in_progress` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.in_progress"] end @@ -213,7 +209,7 @@ class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -224,14 +220,12 @@ class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.requires_action" # @!method initialize(data:, event: :"thread.run.requires_action") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunRequiresAction} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `requires_action` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.requires_action"] end @@ -239,7 +233,7 @@ class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -250,14 +244,12 @@ class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.completed" # @!method initialize(data:, event: :"thread.run.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunCompleted} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is completed. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.completed"] end @@ -265,7 +257,7 @@ class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -276,14 +268,12 @@ class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.incomplete" # @!method initialize(data:, event: :"thread.run.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunIncomplete} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # ends with status `incomplete`. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.incomplete"] end @@ -291,7 +281,7 @@ class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel class ThreadRunFailed < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -302,13 +292,12 @@ class ThreadRunFailed < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.failed" # @!method initialize(data:, event: :"thread.run.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunFailed} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # fails. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.failed"] end @@ -316,7 +305,7 @@ class ThreadRunFailed < OpenAI::Internal::Type::BaseModel class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -327,14 +316,12 @@ class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.cancelling" # @!method initialize(data:, event: :"thread.run.cancelling") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunCancelling} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `cancelling` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.cancelling"] end @@ -342,7 +329,7 @@ class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -353,14 +340,12 @@ class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.cancelled" # @!method initialize(data:, event: :"thread.run.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunCancelled} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is cancelled. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.cancelled"] end @@ -368,7 +353,7 @@ class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel class ThreadRunExpired < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -379,13 +364,12 @@ class ThreadRunExpired < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.expired" # @!method initialize(data:, event: :"thread.run.expired") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunExpired} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # expires. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.expired"] end @@ -403,15 +387,12 @@ class ThreadRunStepCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.created" # @!method initialize(data:, event: :"thread.run.step.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepCreated} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.created"] end @@ -429,15 +410,12 @@ class ThreadRunStepInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.in_progress" # @!method initialize(data:, event: :"thread.run.step.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepInProgress} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # moves to an `in_progress` state. + # [run step](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.in_progress"] end @@ -456,15 +434,13 @@ class ThreadRunStepDelta < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.delta" # @!method initialize(data:, event: :"thread.run.step.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepDelta} for more - # details. - # # Occurs when parts of a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # are being streamed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) are + # being streamed. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaEvent] Represents a run step delta i.e. any changed fields on a run step during streami + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaEvent] + # Represents a run step delta i.e. any changed fields on a run step during + # streaming. # # @param event [Symbol, :"thread.run.step.delta"] end @@ -482,15 +458,12 @@ class ThreadRunStepCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.completed" # @!method initialize(data:, event: :"thread.run.step.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepCompleted} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is completed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # completed. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.completed"] end @@ -508,15 +481,11 @@ class ThreadRunStepFailed < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.failed" # @!method initialize(data:, event: :"thread.run.step.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepFailed} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # fails. + # [run step](https://developers.openai.com/api/docs/assistants/migration) fails. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.failed"] end @@ -534,15 +503,12 @@ class ThreadRunStepCancelled < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.cancelled" # @!method initialize(data:, event: :"thread.run.step.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepCancelled} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is cancelled. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # cancelled. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.cancelled"] end @@ -560,15 +526,11 @@ class ThreadRunStepExpired < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.expired" # @!method initialize(data:, event: :"thread.run.step.expired") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadRunStepExpired} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # expires. + # [run step](https://developers.openai.com/api/docs/assistants/migration) expires. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.expired"] end @@ -576,7 +538,7 @@ class ThreadRunStepExpired < OpenAI::Internal::Type::BaseModel class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -587,15 +549,13 @@ class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.created" # @!method initialize(data:, event: :"thread.message.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadMessageCreated} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.created"] end @@ -603,7 +563,7 @@ class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel class ThreadMessageInProgress < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -614,15 +574,13 @@ class ThreadMessageInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.in_progress" # @!method initialize(data:, event: :"thread.message.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadMessageInProgress} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) moves - # to an `in_progress` state. + # [message](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.in_progress"] end @@ -641,15 +599,13 @@ class ThreadMessageDelta < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.delta" # @!method initialize(data:, event: :"thread.message.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadMessageDelta} for more - # details. - # # Occurs when parts of a - # [Message](https://platform.openai.com/docs/api-reference/messages/object) are - # being streamed. + # [Message](https://developers.openai.com/api/docs/assistants/migration) are being + # streamed. # - # @param data [OpenAI::Models::Beta::Threads::MessageDeltaEvent] Represents a message delta i.e. any changed fields on a message during streaming + # @param data [OpenAI::Models::Beta::Threads::MessageDeltaEvent] + # Represents a message delta i.e. any changed fields on a message during + # streaming. # # @param event [Symbol, :"thread.message.delta"] end @@ -657,7 +613,7 @@ class ThreadMessageDelta < OpenAI::Internal::Type::BaseModel class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -668,15 +624,13 @@ class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.completed" # @!method initialize(data:, event: :"thread.message.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadMessageCompleted} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # completed. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.completed"] end @@ -684,7 +638,7 @@ class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel class ThreadMessageIncomplete < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -695,15 +649,13 @@ class ThreadMessageIncomplete < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.incomplete" # @!method initialize(data:, event: :"thread.message.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantStreamEvent::ThreadMessageIncomplete} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) ends + # [message](https://developers.openai.com/api/docs/assistants/migration) ends # before it is completed. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.incomplete"] end @@ -721,8 +673,8 @@ class ErrorEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, event: :error) # Occurs when an - # [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. - # This can happen due to an internal server error or a timeout. + # [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) + # occurs. This can happen due to an internal server error or a timeout. # # @param data [OpenAI::Models::ErrorObject] # @param event [Symbol, :error] diff --git a/lib/openai/models/beta/assistant_tool_choice.rb b/lib/openai/models/beta/assistant_tool_choice.rb index a4fc7a032..71f31a438 100644 --- a/lib/openai/models/beta/assistant_tool_choice.rb +++ b/lib/openai/models/beta/assistant_tool_choice.rb @@ -19,7 +19,8 @@ class AssistantToolChoice < OpenAI::Internal::Type::BaseModel # Specifies a tool the model should use. Use to force the model to call a specific # tool. # - # @param type [Symbol, OpenAI::Models::Beta::AssistantToolChoice::Type] The type of the tool. If type is `function`, the function name must be set + # @param type [Symbol, OpenAI::Models::Beta::AssistantToolChoice::Type] + # The type of the tool. If type is `function`, the function name must be set # # @param function [OpenAI::Models::Beta::AssistantToolChoiceFunction] diff --git a/lib/openai/models/beta/assistant_tool_choice_function.rb b/lib/openai/models/beta/assistant_tool_choice_function.rb index 8440fb986..5d8346594 100644 --- a/lib/openai/models/beta/assistant_tool_choice_function.rb +++ b/lib/openai/models/beta/assistant_tool_choice_function.rb @@ -11,7 +11,8 @@ class AssistantToolChoiceFunction < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(name:) - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end end diff --git a/lib/openai/models/beta/assistant_update_params.rb b/lib/openai/models/beta/assistant_update_params.rb index c12158443..f23feca42 100644 --- a/lib/openai/models/beta/assistant_update_params.rb +++ b/lib/openai/models/beta/assistant_update_params.rb @@ -39,10 +39,10 @@ class AssistantUpdateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # # @return [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model, nil] optional :model, union: -> { OpenAI::Beta::AssistantUpdateParams::Model } @@ -58,7 +58,7 @@ class AssistantUpdateParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -66,14 +66,14 @@ class AssistantUpdateParams < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -125,40 +125,93 @@ class AssistantUpdateParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float, nil?: true # @!method initialize(assistant_id:, description: nil, instructions: nil, metadata: nil, model: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantUpdateParams} for more details. - # # @param assistant_id [String] # - # @param description [String, nil] The description of the assistant. The maximum length is 512 characters. + # @param description [String, nil] + # The description of the assistant. The maximum length is 512 characters. + # + # @param instructions [String, nil] + # The system instructions that the assistant uses. The maximum length is 256,000 + # characters. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param instructions [String, nil] The system instructions that the assistant uses. The maximum length is 256,000 c + # @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param name [String, nil] + # The name of the assistant. The maximum length is 256 characters. # - # @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param name [String, nil] The name of the assistant. The maximum length is 256 characters. + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. # - # @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. # - # @param tools [Array] A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # @param tools [Array] + # A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # assistant. Tools can be of types `code_interpreter`, `file_search`, or + # `function`. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union @@ -327,26 +380,26 @@ class ToolResources < OpenAI::Internal::Type::BaseModel class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids # Overrides the list of - # [file](https://platform.openai.com/docs/api-reference/files) IDs made available - # to the `code_interpreter` tool. There can be a maximum of 20 files associated - # with the tool. + # [file](https://developers.openai.com/api/reference/resources/files) IDs made + # available to the `code_interpreter` tool. There can be a maximum of 20 files + # associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::CodeInterpreter} - # for more details. - # - # @param file_ids [Array] Overrides the list of [file](https://platform.openai.com/docs/api-reference/file + # @param file_ids [Array] + # Overrides the list of + # [file](https://developers.openai.com/api/reference/resources/files) IDs made + # available to the `code_interpreter` tool. There can be a maximum of 20 files + # associated with the tool. end # @see OpenAI::Models::Beta::AssistantUpdateParams::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # Overrides the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. # @@ -354,11 +407,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(vector_store_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::FileSearch} for - # more details. - # - # @param vector_store_ids [Array] Overrides the [vector store](https://platform.openai.com/docs/api-reference/vect + # @param vector_store_ids [Array] + # Overrides the + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this assistant. There can be a maximum of 1 vector store attached to + # the assistant. end end end diff --git a/lib/openai/models/beta/beta_apply_patch_tool.rb b/lib/openai/models/beta/beta_apply_patch_tool.rb index 29f3902bb..0fe7e0d3d 100644 --- a/lib/openai/models/beta/beta_apply_patch_tool.rb +++ b/lib/openai/models/beta/beta_apply_patch_tool.rb @@ -25,10 +25,11 @@ class BetaApplyPatchTool < OpenAI::Internal::Type::BaseModel # @!method initialize(allowed_callers: nil, type: :apply_patch) # Allows the assistant to create, delete, or update files using unified diffs. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param type [Symbol, :apply_patch] The type of the tool. Always `apply_patch`. - + # @param type [Symbol, :apply_patch] + # The type of the tool. Always `apply_patch`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/beta/beta_compacted_response.rb b/lib/openai/models/beta/beta_compacted_response.rb index 346871fc8..d9c6493d9 100644 --- a/lib/openai/models/beta/beta_compacted_response.rb +++ b/lib/openai/models/beta/beta_compacted_response.rb @@ -38,18 +38,22 @@ class BetaCompactedResponse < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::Beta::BetaResponseUsage } # @!method initialize(id:, created_at:, output:, usage:, object: :"response.compaction") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaCompactedResponse} for more details. + # @param id [String] + # The unique identifier for the compacted response. # - # @param id [String] The unique identifier for the compacted response. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the compacted conversation was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the compacted conversation was created. + # @param output [Array] + # The compacted list of output items. This is a list of all user messages, + # followed by a single compaction item. # - # @param output [Array] The compacted list of output items. This is a list of all user messages, followe + # @param usage [OpenAI::Models::Beta::BetaResponseUsage] + # Token accounting for the compaction pass, including cached, reasoning, and total + # tokens. # - # @param usage [OpenAI::Models::Beta::BetaResponseUsage] Token accounting for the compaction pass, including cached, reasoning, and total - # - # @param object [Symbol, :"response.compaction"] The object type. Always `response.compaction`. + # @param object [Symbol, :"response.compaction"] + # The object type. Always `response.compaction`. end end diff --git a/lib/openai/models/beta/beta_computer_action.rb b/lib/openai/models/beta/beta_computer_action.rb index 012921e91..036bf3205 100644 --- a/lib/openai/models/beta/beta_computer_action.rb +++ b/lib/openai/models/beta/beta_computer_action.rb @@ -69,20 +69,23 @@ class Click < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(button:, x:, y_:, keys: nil, type: :click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Click} for more details. - # # A click action. # - # @param button [Symbol, OpenAI::Models::Beta::BetaComputerAction::Click::Button] Indicates which mouse button was pressed during the click. One of `left`, `right + # @param button [Symbol, OpenAI::Models::Beta::BetaComputerAction::Click::Button] + # Indicates which mouse button was pressed during the click. One of `left`, + # `right`, `wheel`, `back`, or `forward`. # - # @param x [Integer] The x-coordinate where the click occurred. + # @param x [Integer] + # The x-coordinate where the click occurred. # - # @param y_ [Integer] The y-coordinate where the click occurred. + # @param y_ [Integer] + # The y-coordinate where the click occurred. # - # @param keys [Array, nil] The keys being held while clicking. + # @param keys [Array, nil] + # The keys being held while clicking. # - # @param type [Symbol, :click] Specifies the event type. For a click action, this property is always `click`. + # @param type [Symbol, :click] + # Specifies the event type. For a click action, this property is always `click`. # Indicates which mouse button was pressed during the click. One of `left`, # `right`, `wheel`, `back`, or `forward`. @@ -129,18 +132,20 @@ class DoubleClick < OpenAI::Internal::Type::BaseModel required :y_, Integer, api_name: :y # @!method initialize(keys:, x:, y_:, type: :double_click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::DoubleClick} for more details. - # # A double click action. # - # @param keys [Array, nil] The keys being held while double-clicking. + # @param keys [Array, nil] + # The keys being held while double-clicking. # - # @param x [Integer] The x-coordinate where the double click occurred. + # @param x [Integer] + # The x-coordinate where the double click occurred. # - # @param y_ [Integer] The y-coordinate where the double click occurred. + # @param y_ [Integer] + # The y-coordinate where the double click occurred. # - # @param type [Symbol, :double_click] Specifies the event type. For a double click action, this property is always set + # @param type [Symbol, :double_click] + # Specifies the event type. For a double click action, this property is always set + # to `double_click`. end class Drag < OpenAI::Internal::Type::BaseModel @@ -172,17 +177,25 @@ class Drag < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(path:, keys: nil, type: :drag) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Drag} for more details. - # # A drag action. # - # @param path [Array] An array of coordinates representing the path of the drag action. Coordinates wi + # @param path [Array] + # An array of coordinates representing the path of the drag action. Coordinates + # will appear as an array of objects, eg # - # @param keys [Array, nil] The keys being held while dragging the mouse. + # ``` + # [ + # { x: 100, y: 200 }, + # { x: 200, y: 300 } + # ] + # ``` # - # @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra - + # @param keys [Array, nil] + # The keys being held while dragging the mouse. + # + # @param type [Symbol, :drag] + # Specifies the event type. For a drag action, this property is always set to + # `drag`. class Path < OpenAI::Internal::Type::BaseModel # @!attribute x # The x-coordinate. @@ -199,9 +212,11 @@ class Path < OpenAI::Internal::Type::BaseModel # @!method initialize(x:, y_:) # An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. # - # @param x [Integer] The x-coordinate. + # @param x [Integer] + # The x-coordinate. # - # @param y_ [Integer] The y-coordinate. + # @param y_ [Integer] + # The y-coordinate. end end @@ -221,14 +236,15 @@ class Keypress < OpenAI::Internal::Type::BaseModel required :type, const: :keypress # @!method initialize(keys:, type: :keypress) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Keypress} for more details. - # # A collection of keypresses the model would like to perform. # - # @param keys [Array] The combination of keys the model is requesting to be pressed. This is an array + # @param keys [Array] + # The combination of keys the model is requesting to be pressed. This is an array + # of strings, each representing a key. # - # @param type [Symbol, :keypress] Specifies the event type. For a keypress action, this property is always set to + # @param type [Symbol, :keypress] + # Specifies the event type. For a keypress action, this property is always set to + # `keypress`. end class Move < OpenAI::Internal::Type::BaseModel @@ -258,18 +274,20 @@ class Move < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(x:, y_:, keys: nil, type: :move) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Move} for more details. - # # A mouse move action. # - # @param x [Integer] The x-coordinate to move to. + # @param x [Integer] + # The x-coordinate to move to. # - # @param y_ [Integer] The y-coordinate to move to. + # @param y_ [Integer] + # The y-coordinate to move to. # - # @param keys [Array, nil] The keys being held while moving the mouse. + # @param keys [Array, nil] + # The keys being held while moving the mouse. # - # @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov + # @param type [Symbol, :move] + # Specifies the event type. For a move action, this property is always set to + # `move`. end class Screenshot < OpenAI::Internal::Type::BaseModel @@ -281,12 +299,11 @@ class Screenshot < OpenAI::Internal::Type::BaseModel required :type, const: :screenshot # @!method initialize(type: :screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Screenshot} for more details. - # # A screenshot action. # - # @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is always set t + # @param type [Symbol, :screenshot] + # Specifies the event type. For a screenshot action, this property is always set + # to `screenshot`. end class Scroll < OpenAI::Internal::Type::BaseModel @@ -328,22 +345,26 @@ class Scroll < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(scroll_x:, scroll_y:, x:, y_:, keys: nil, type: :scroll) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Scroll} for more details. - # # A scroll action. # - # @param scroll_x [Integer] The horizontal scroll distance. + # @param scroll_x [Integer] + # The horizontal scroll distance. # - # @param scroll_y [Integer] The vertical scroll distance. + # @param scroll_y [Integer] + # The vertical scroll distance. # - # @param x [Integer] The x-coordinate where the scroll occurred. + # @param x [Integer] + # The x-coordinate where the scroll occurred. # - # @param y_ [Integer] The y-coordinate where the scroll occurred. + # @param y_ [Integer] + # The y-coordinate where the scroll occurred. # - # @param keys [Array, nil] The keys being held while scrolling. + # @param keys [Array, nil] + # The keys being held while scrolling. # - # @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s + # @param type [Symbol, :scroll] + # Specifies the event type. For a scroll action, this property is always set to + # `scroll`. end class Type < OpenAI::Internal::Type::BaseModel @@ -361,14 +382,14 @@ class Type < OpenAI::Internal::Type::BaseModel required :type, const: :type # @!method initialize(text:, type: :type) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Type} for more details. - # # An action to type in text. # - # @param text [String] The text to type. + # @param text [String] + # The text to type. # - # @param type [Symbol, :type] Specifies the event type. For a type action, this property is always set to `typ + # @param type [Symbol, :type] + # Specifies the event type. For a type action, this property is always set to + # `type`. end class Wait < OpenAI::Internal::Type::BaseModel @@ -380,12 +401,11 @@ class Wait < OpenAI::Internal::Type::BaseModel required :type, const: :wait # @!method initialize(type: :wait) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaComputerAction::Wait} for more details. - # # A wait action. # - # @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is always set to `wai + # @param type [Symbol, :wait] + # Specifies the event type. For a wait action, this property is always set to + # `wait`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_computer_tool.rb b/lib/openai/models/beta/beta_computer_tool.rb index daafed69b..5599030e7 100644 --- a/lib/openai/models/beta/beta_computer_tool.rb +++ b/lib/openai/models/beta/beta_computer_tool.rb @@ -12,9 +12,10 @@ class BetaComputerTool < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :computer) # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). # - # @param type [Symbol, :computer] The type of the computer tool. Always `computer`. + # @param type [Symbol, :computer] + # The type of the computer tool. Always `computer`. end end diff --git a/lib/openai/models/beta/beta_computer_use_preview_tool.rb b/lib/openai/models/beta/beta_computer_use_preview_tool.rb index a91e2a85c..4dc8d4ec4 100644 --- a/lib/openai/models/beta/beta_computer_use_preview_tool.rb +++ b/lib/openai/models/beta/beta_computer_use_preview_tool.rb @@ -30,15 +30,19 @@ class BetaComputerUsePreviewTool < OpenAI::Internal::Type::BaseModel # @!method initialize(display_height:, display_width:, environment:, type: :computer_use_preview) # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). # - # @param display_height [Integer] The height of the computer display. + # @param display_height [Integer] + # The height of the computer display. # - # @param display_width [Integer] The width of the computer display. + # @param display_width [Integer] + # The width of the computer display. # - # @param environment [Symbol, OpenAI::Models::Beta::BetaComputerUsePreviewTool::Environment] The type of computer environment to control. + # @param environment [Symbol, OpenAI::Models::Beta::BetaComputerUsePreviewTool::Environment] + # The type of computer environment to control. # - # @param type [Symbol, :computer_use_preview] The type of the computer use tool. Always `computer_use_preview`. + # @param type [Symbol, :computer_use_preview] + # The type of the computer use tool. Always `computer_use_preview`. # The type of computer environment to control. # diff --git a/lib/openai/models/beta/beta_container_auto.rb b/lib/openai/models/beta/beta_container_auto.rb index fecbbd708..edad38cf4 100644 --- a/lib/openai/models/beta/beta_container_auto.rb +++ b/lib/openai/models/beta/beta_container_auto.rb @@ -35,15 +35,20 @@ class BetaContainerAuto < OpenAI::Internal::Type::BaseModel optional :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::BetaContainerAuto::Skill] } # @!method initialize(file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, type: :container_auto) - # @param file_ids [Array] An optional list of uploaded files to make available to your code. + # @param file_ids [Array] + # An optional list of uploaded files to make available to your code. # - # @param memory_limit [Symbol, OpenAI::Models::Beta::BetaContainerAuto::MemoryLimit, nil] The memory limit for the container. + # @param memory_limit [Symbol, OpenAI::Models::Beta::BetaContainerAuto::MemoryLimit, nil] + # The memory limit for the container. # - # @param network_policy [OpenAI::Models::Beta::BetaContainerNetworkPolicyDisabled, OpenAI::Models::Beta::BetaContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Beta::BetaContainerNetworkPolicyDisabled, OpenAI::Models::Beta::BetaContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param skills [Array] An optional list of skills referenced by id or inline data. + # @param skills [Array] + # An optional list of skills referenced by id or inline data. # - # @param type [Symbol, :container_auto] Automatically creates a container for this request + # @param type [Symbol, :container_auto] + # Automatically creates a container for this request # The memory limit for the container. # diff --git a/lib/openai/models/beta/beta_container_network_policy_allowlist.rb b/lib/openai/models/beta/beta_container_network_policy_allowlist.rb index bd8dee3a9..27f7c551b 100644 --- a/lib/openai/models/beta/beta_container_network_policy_allowlist.rb +++ b/lib/openai/models/beta/beta_container_network_policy_allowlist.rb @@ -26,11 +26,14 @@ class BetaContainerNetworkPolicyAllowlist < OpenAI::Internal::Type::BaseModel ) # @!method initialize(allowed_domains:, domain_secrets: nil, type: :allowlist) - # @param allowed_domains [Array] A list of allowed domains when type is `allowlist`. + # @param allowed_domains [Array] + # A list of allowed domains when type is `allowlist`. # - # @param domain_secrets [Array] Optional domain-scoped secrets for allowlisted domains. + # @param domain_secrets [Array] + # Optional domain-scoped secrets for allowlisted domains. # - # @param type [Symbol, :allowlist] Allow outbound network access only to specified domains. Always `allowlist`. + # @param type [Symbol, :allowlist] + # Allow outbound network access only to specified domains. Always `allowlist`. end end diff --git a/lib/openai/models/beta/beta_container_network_policy_disabled.rb b/lib/openai/models/beta/beta_container_network_policy_disabled.rb index 124212ffc..3e4974af9 100644 --- a/lib/openai/models/beta/beta_container_network_policy_disabled.rb +++ b/lib/openai/models/beta/beta_container_network_policy_disabled.rb @@ -11,7 +11,8 @@ class BetaContainerNetworkPolicyDisabled < OpenAI::Internal::Type::BaseModel required :type, const: :disabled # @!method initialize(type: :disabled) - # @param type [Symbol, :disabled] Disable outbound network access. Always `disabled`. + # @param type [Symbol, :disabled] + # Disable outbound network access. Always `disabled`. end end diff --git a/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb b/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb index 30a373220..a29817026 100644 --- a/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb +++ b/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb @@ -23,11 +23,14 @@ class BetaContainerNetworkPolicyDomainSecret < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(domain:, name:, value:) - # @param domain [String] The domain associated with the secret. + # @param domain [String] + # The domain associated with the secret. # - # @param name [String] The name of the secret to inject for the domain. + # @param name [String] + # The name of the secret to inject for the domain. # - # @param value [String] The secret value to inject for the domain. + # @param value [String] + # The secret value to inject for the domain. end end diff --git a/lib/openai/models/beta/beta_container_reference.rb b/lib/openai/models/beta/beta_container_reference.rb index 53e3bcda6..83542bb8a 100644 --- a/lib/openai/models/beta/beta_container_reference.rb +++ b/lib/openai/models/beta/beta_container_reference.rb @@ -17,9 +17,11 @@ class BetaContainerReference < OpenAI::Internal::Type::BaseModel required :type, const: :container_reference # @!method initialize(container_id:, type: :container_reference) - # @param container_id [String] The ID of the referenced container. + # @param container_id [String] + # The ID of the referenced container. # - # @param type [Symbol, :container_reference] References a container created with the /v1/containers endpoint + # @param type [Symbol, :container_reference] + # References a container created with the /v1/containers endpoint end end diff --git a/lib/openai/models/beta/beta_custom_tool.rb b/lib/openai/models/beta/beta_custom_tool.rb index ee4e4326a..7fa254c4c 100644 --- a/lib/openai/models/beta/beta_custom_tool.rb +++ b/lib/openai/models/beta/beta_custom_tool.rb @@ -52,26 +52,30 @@ class BetaCustomTool < OpenAI::Internal::Type::BaseModel optional :format_, union: -> { OpenAI::Beta::BetaCustomTool::Format }, api_name: :format # @!method initialize(name:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, format_: nil, type: :custom) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaCustomTool} for more details. - # # A custom tool that processes input using a specified format. Learn more about - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) # - # @param name [String] The name of the custom tool, used to identify it in tool calls. + # @param name [String] + # The name of the custom tool, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param async [Boolean] Whether the tool response can be returned asynchronously versus immediately retu + # @param async [Boolean] + # Whether the tool response can be returned asynchronously versus immediately + # returned on next response creation. # - # @param defer_loading [Boolean] Whether this tool should be deferred and discovered via tool search. + # @param defer_loading [Boolean] + # Whether this tool should be deferred and discovered via tool search. # - # @param description [String] Optional description of the custom tool, used to provide more context. + # @param description [String] + # Optional description of the custom tool, used to provide more context. # - # @param format_ [OpenAI::Models::Beta::BetaCustomTool::Format::Text, OpenAI::Models::Beta::BetaCustomTool::Format::Grammar] The input format for the custom tool. Default is unconstrained text. + # @param format_ [OpenAI::Models::Beta::BetaCustomTool::Format::Text, OpenAI::Models::Beta::BetaCustomTool::Format::Grammar] + # The input format for the custom tool. Default is unconstrained text. # - # @param type [Symbol, :custom] The type of the custom tool. Always `custom`. - + # @param type [Symbol, :custom] + # The type of the custom tool. Always `custom`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -106,7 +110,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :text) # Unconstrained free-form text. # - # @param type [Symbol, :text] Unconstrained text format. Always `text`. + # @param type [Symbol, :text] + # Unconstrained text format. Always `text`. end class Grammar < OpenAI::Internal::Type::BaseModel @@ -131,11 +136,14 @@ class Grammar < OpenAI::Internal::Type::BaseModel # @!method initialize(definition:, syntax:, type: :grammar) # A grammar defined by the user. # - # @param definition [String] The grammar definition. + # @param definition [String] + # The grammar definition. # - # @param syntax [Symbol, OpenAI::Models::Beta::BetaCustomTool::Format::Grammar::Syntax] The syntax of the grammar definition. One of `lark` or `regex`. + # @param syntax [Symbol, OpenAI::Models::Beta::BetaCustomTool::Format::Grammar::Syntax] + # The syntax of the grammar definition. One of `lark` or `regex`. # - # @param type [Symbol, :grammar] Grammar format. Always `grammar`. + # @param type [Symbol, :grammar] + # Grammar format. Always `grammar`. # The syntax of the grammar definition. One of `lark` or `regex`. # diff --git a/lib/openai/models/beta/beta_easy_input_message.rb b/lib/openai/models/beta/beta_easy_input_message.rb index a1cf48acc..c6db48c2d 100644 --- a/lib/openai/models/beta/beta_easy_input_message.rb +++ b/lib/openai/models/beta/beta_easy_input_message.rb @@ -34,22 +34,28 @@ class BetaEasyInputMessage < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Beta::BetaEasyInputMessage::Type } # @!method initialize(content:, role:, phase: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaEasyInputMessage} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, Array] Text, image, or audio input to the model, used to generate a response. + # @param content [String, Array] + # Text, image, or audio input to the model, used to generate a response. Can also + # contain previous assistant responses. # - # @param role [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param phase [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # @param phase [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Phase, nil] + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. # - # @param type [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Beta::BetaEasyInputMessage::Type] + # The type of the message input. Always `message`. # Text, image, or audio input to the model, used to generate a response. Can also # contain previous assistant responses. diff --git a/lib/openai/models/beta/beta_file_search_tool.rb b/lib/openai/models/beta/beta_file_search_tool.rb index 546c55be1..805a5047d 100644 --- a/lib/openai/models/beta/beta_file_search_tool.rb +++ b/lib/openai/models/beta/beta_file_search_tool.rb @@ -36,22 +36,25 @@ class BetaFileSearchTool < OpenAI::Internal::Type::BaseModel optional :ranking_options, -> { OpenAI::Beta::BetaFileSearchTool::RankingOptions } # @!method initialize(vector_store_ids:, filters: nil, max_num_results: nil, ranking_options: nil, type: :file_search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFileSearchTool} for more details. - # # A tool that searches for relevant content from uploaded files. Learn more about # the - # [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). # - # @param vector_store_ids [Array] The IDs of the vector stores to search. + # @param vector_store_ids [Array] + # The IDs of the vector stores to search. # - # @param filters [OpenAI::Models::Beta::BetaFileSearchTool::Filters::ComparisonFilter, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter, nil] A filter to apply. + # @param filters [OpenAI::Models::Beta::BetaFileSearchTool::Filters::ComparisonFilter, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter, nil] + # A filter to apply. # - # @param max_num_results [Integer] The maximum number of results to return. This number should be between 1 and 50 + # @param max_num_results [Integer] + # The maximum number of results to return. This number should be between 1 and 50 + # inclusive. # - # @param ranking_options [OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions] Ranking options for search. + # @param ranking_options [OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions] + # Ranking options for search. # - # @param type [Symbol, :file_search] The type of the file search tool. Always `file_search`. + # @param type [Symbol, :file_search] + # The type of the file search tool. Always `file_search`. # A filter to apply. # @@ -96,18 +99,28 @@ class ComparisonFilter < OpenAI::Internal::Type::BaseModel required :value, union: -> { OpenAI::Beta::BetaFileSearchTool::Filters::ComparisonFilter::Value } # @!method initialize(key:, type:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFileSearchTool::Filters::ComparisonFilter} for more - # details. - # # A filter used to compare a specified attribute key to a given value using a # defined comparison operation. # - # @param key [String] The key to compare against the value. + # @param key [String] + # The key to compare against the value. # - # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::ComparisonFilter::Type] Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, ` + # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::ComparisonFilter::Type] + # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, + # `nin`. # - # @param value [String, Float, Boolean, Array] The value to compare against the attribute key; supports string, number, or bool + # - `eq`: equals + # - `ne`: not equal + # - `gt`: greater than + # - `gte`: greater than or equal + # - `lt`: less than + # - `lte`: less than or equal + # - `in`: in + # - `nin`: not in + # + # @param value [String, Float, Boolean, Array] + # The value to compare against the attribute key; supports string, number, or + # boolean types. # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, # `nin`. @@ -200,15 +213,14 @@ class CompoundFilter < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Beta::BetaFileSearchTool::Filters::CompoundFilter::Type } # @!method initialize(filters:, type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter} for more - # details. - # # Combine multiple filters using `and` or `or`. # - # @param filters [Array] Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter` + # @param filters [Array] + # Array of filters to combine. Items can be `ComparisonFilter` or + # `CompoundFilter`. # - # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Type] Type of operation: `and` or `or`. + # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Type] + # Type of operation: `and` or `or`. # A filter used to compare a specified attribute key to a given value using a # defined comparison operation. @@ -261,18 +273,28 @@ class ComparisonFilter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(key:, type:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Filter::ComparisonFilter} - # for more details. - # # A filter used to compare a specified attribute key to a given value using a # defined comparison operation. # - # @param key [String] The key to compare against the value. + # @param key [String] + # The key to compare against the value. + # + # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Filter::ComparisonFilter::Type] + # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, + # `nin`. # - # @param type [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::Filters::CompoundFilter::Filter::ComparisonFilter::Type] Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, ` + # - `eq`: equals + # - `ne`: not equal + # - `gt`: greater than + # - `gte`: greater than or equal + # - `lt`: less than + # - `lte`: less than or equal + # - `in`: in + # - `nin`: not in # - # @param value [String, Float, Boolean, Array] The value to compare against the attribute key; supports string, number, or bool + # @param value [String, Float, Boolean, Array] + # The value to compare against the attribute key; supports string, number, or + # boolean types. # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, # `nin`. @@ -391,16 +413,19 @@ class RankingOptions < OpenAI::Internal::Type::BaseModel optional :score_threshold, Float # @!method initialize(hybrid_search: nil, ranker: nil, score_threshold: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions} for more details. - # # Ranking options for search. # - # @param hybrid_search [OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions::HybridSearch] Weights that control how reciprocal rank fusion balances semantic embedding matc + # @param hybrid_search [OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions::HybridSearch] + # Weights that control how reciprocal rank fusion balances semantic embedding + # matches versus sparse keyword matches when hybrid search is enabled. # - # @param ranker [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions::Ranker] The ranker to use for the file search. + # @param ranker [Symbol, OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions::Ranker] + # The ranker to use for the file search. # - # @param score_threshold [Float] The score threshold for the file search, a number between 0 and 1. Numbers close + # @param score_threshold [Float] + # The score threshold for the file search, a number between 0 and 1. Numbers + # closer to 1 will attempt to return only the most relevant results, but may + # return fewer results. # @see OpenAI::Models::Beta::BetaFileSearchTool::RankingOptions#hybrid_search class HybridSearch < OpenAI::Internal::Type::BaseModel @@ -420,9 +445,11 @@ class HybridSearch < OpenAI::Internal::Type::BaseModel # Weights that control how reciprocal rank fusion balances semantic embedding # matches versus sparse keyword matches when hybrid search is enabled. # - # @param embedding_weight [Float] The weight of the embedding in the reciprocal ranking fusion. + # @param embedding_weight [Float] + # The weight of the embedding in the reciprocal ranking fusion. # - # @param text_weight [Float] The weight of the text in the reciprocal ranking fusion. + # @param text_weight [Float] + # The weight of the text in the reciprocal ranking fusion. end # The ranker to use for the file search. diff --git a/lib/openai/models/beta/beta_function_shell_tool.rb b/lib/openai/models/beta/beta_function_shell_tool.rb index 3343f49ca..3df540e27 100644 --- a/lib/openai/models/beta/beta_function_shell_tool.rb +++ b/lib/openai/models/beta/beta_function_shell_tool.rb @@ -30,12 +30,13 @@ class BetaFunctionShellTool < OpenAI::Internal::Type::BaseModel # @!method initialize(allowed_callers: nil, environment: nil, type: :shell) # A tool that allows the model to execute shell commands. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # # @param environment [OpenAI::Models::Beta::BetaContainerAuto, OpenAI::Models::Beta::BetaLocalEnvironment, OpenAI::Models::Beta::BetaContainerReference, nil] # - # @param type [Symbol, :shell] The type of the shell tool. Always `shell`. - + # @param type [Symbol, :shell] + # The type of the shell tool. Always `shell`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/beta/beta_function_tool.rb b/lib/openai/models/beta/beta_function_tool.rb index 48d5759f5..a85c5ebbb 100644 --- a/lib/openai/models/beta/beta_function_tool.rb +++ b/lib/openai/models/beta/beta_function_tool.rb @@ -64,31 +64,37 @@ class BetaFunctionTool < OpenAI::Internal::Type::BaseModel optional :output_schema, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true # @!method initialize(name:, parameters:, strict:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, output_schema: nil, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaFunctionTool} for more details. - # # Defines a function in your own code the model can choose to call. Learn more # about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. # - # @param parameters [Hash{Symbol=>Object}, nil] A JSON schema object describing the parameters of the function. + # @param parameters [Hash{Symbol=>Object}, nil] + # A JSON schema object describing the parameters of the function. # - # @param strict [Boolean, nil] Whether strict parameter validation is enforced for this function tool. + # @param strict [Boolean, nil] + # Whether strict parameter validation is enforced for this function tool. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # # @param async [Boolean] # - # @param defer_loading [Boolean] Whether this function is deferred and loaded via tool search. + # @param defer_loading [Boolean] + # Whether this function is deferred and loaded via tool search. # - # @param description [String, nil] A description of the function. Used by the model to determine whether or not to + # @param description [String, nil] + # A description of the function. Used by the model to determine whether or not to + # call the function. # - # @param output_schema [Hash{Symbol=>Object}, nil] A JSON schema object describing the JSON value encoded in string outputs for thi + # @param output_schema [Hash{Symbol=>Object}, nil] + # A JSON schema object describing the JSON value encoded in string outputs for + # this function. # - # @param type [Symbol, :function] The type of the function tool. Always `function`. - + # @param type [Symbol, :function] + # The type of the function tool. Always `function`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/beta/beta_inline_skill.rb b/lib/openai/models/beta/beta_inline_skill.rb index 4d6a10e10..424a53304 100644 --- a/lib/openai/models/beta/beta_inline_skill.rb +++ b/lib/openai/models/beta/beta_inline_skill.rb @@ -29,13 +29,17 @@ class BetaInlineSkill < OpenAI::Internal::Type::BaseModel required :type, const: :inline # @!method initialize(description:, name:, source:, type: :inline) - # @param description [String] The description of the skill. + # @param description [String] + # The description of the skill. # - # @param name [String] The name of the skill. + # @param name [String] + # The name of the skill. # - # @param source [OpenAI::Models::Beta::BetaInlineSkillSource] Inline skill payload + # @param source [OpenAI::Models::Beta::BetaInlineSkillSource] + # Inline skill payload # - # @param type [Symbol, :inline] Defines an inline skill for this request. + # @param type [Symbol, :inline] + # Defines an inline skill for this request. end end diff --git a/lib/openai/models/beta/beta_inline_skill_source.rb b/lib/openai/models/beta/beta_inline_skill_source.rb index 0f23dac44..238c7ba11 100644 --- a/lib/openai/models/beta/beta_inline_skill_source.rb +++ b/lib/openai/models/beta/beta_inline_skill_source.rb @@ -25,11 +25,14 @@ class BetaInlineSkillSource < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, media_type: :"application/zip", type: :base64) # Inline skill payload # - # @param data [String] Base64-encoded skill zip bundle. + # @param data [String] + # Base64-encoded skill zip bundle. # - # @param media_type [Symbol, :"application/zip"] The media type of the inline skill payload. Must be `application/zip`. + # @param media_type [Symbol, :"application/zip"] + # The media type of the inline skill payload. Must be `application/zip`. # - # @param type [Symbol, :base64] The type of the inline skill source. Must be `base64`. + # @param type [Symbol, :base64] + # The type of the inline skill source. Must be `base64`. end end diff --git a/lib/openai/models/beta/beta_local_environment.rb b/lib/openai/models/beta/beta_local_environment.rb index 9c91825ef..cff67b8e6 100644 --- a/lib/openai/models/beta/beta_local_environment.rb +++ b/lib/openai/models/beta/beta_local_environment.rb @@ -17,9 +17,11 @@ class BetaLocalEnvironment < OpenAI::Internal::Type::BaseModel optional :skills, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaLocalSkill] } # @!method initialize(skills: nil, type: :local) - # @param skills [Array] An optional list of skills. + # @param skills [Array] + # An optional list of skills. # - # @param type [Symbol, :local] Use a local computer environment. + # @param type [Symbol, :local] + # Use a local computer environment. end end diff --git a/lib/openai/models/beta/beta_local_skill.rb b/lib/openai/models/beta/beta_local_skill.rb index c762cde87..2a946a30e 100644 --- a/lib/openai/models/beta/beta_local_skill.rb +++ b/lib/openai/models/beta/beta_local_skill.rb @@ -23,11 +23,14 @@ class BetaLocalSkill < OpenAI::Internal::Type::BaseModel required :path, String # @!method initialize(description:, name:, path:) - # @param description [String] The description of the skill. + # @param description [String] + # The description of the skill. # - # @param name [String] The name of the skill. + # @param name [String] + # The name of the skill. # - # @param path [String] The path to the directory containing the skill. + # @param path [String] + # The path to the directory containing the skill. end end diff --git a/lib/openai/models/beta/beta_namespace_tool.rb b/lib/openai/models/beta/beta_namespace_tool.rb index 01c598985..8144cec58 100644 --- a/lib/openai/models/beta/beta_namespace_tool.rb +++ b/lib/openai/models/beta/beta_namespace_tool.rb @@ -31,13 +31,17 @@ class BetaNamespaceTool < OpenAI::Internal::Type::BaseModel # @!method initialize(description:, name:, tools:, type: :namespace) # Groups function/custom tools under a shared namespace. # - # @param description [String] A description of the namespace shown to the model. + # @param description [String] + # A description of the namespace shown to the model. # - # @param name [String] The namespace name used in tool calls (for example, `crm`). + # @param name [String] + # The namespace name used in tool calls (for example, `crm`). # - # @param tools [Array] The function/custom tools available inside this namespace. + # @param tools [Array] + # The function/custom tools available inside this namespace. # - # @param type [Symbol, :namespace] The type of the tool. Always `namespace`. + # @param type [Symbol, :namespace] + # The type of the tool. Always `namespace`. # A function or custom tool that belongs to a namespace. module Tool @@ -47,7 +51,7 @@ module Tool variant :function, -> { OpenAI::Beta::BetaNamespaceTool::Tool::Function } - # A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) variant :custom, -> { OpenAI::Beta::BetaCustomTool } class Function < OpenAI::Internal::Type::BaseModel @@ -116,24 +120,30 @@ class Function < OpenAI::Internal::Type::BaseModel optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, output_schema: nil, parameters: nil, strict: nil, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaNamespaceTool::Tool::Function} for more details. - # # @param name [String] # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param async [Boolean] Whether the tool response can be returned asynchronously versus immediately retu + # @param async [Boolean] + # Whether the tool response can be returned asynchronously versus immediately + # returned on next response creation. # - # @param defer_loading [Boolean] Whether this function should be deferred and discovered via tool search. + # @param defer_loading [Boolean] + # Whether this function should be deferred and discovered via tool search. # # @param description [String, nil] # - # @param output_schema [Hash{Symbol=>Object}, nil] A JSON Schema describing the JSON value encoded in string outputs for this funct + # @param output_schema [Hash{Symbol=>Object}, nil] + # A JSON Schema describing the JSON value encoded in string outputs for this + # function tool. This does not describe content-array outputs. # # @param parameters [Object, nil] # - # @param strict [Boolean, nil] Whether to enforce strict parameter validation. If omitted, Responses attempts t + # @param strict [Boolean, nil] + # Whether to enforce strict parameter validation. If omitted, Responses attempts + # to use strict validation when the schema is compatible, and falls back to + # non-strict validation otherwise. # # @param type [Symbol, :function] diff --git a/lib/openai/models/beta/beta_response.rb b/lib/openai/models/beta/beta_response.rb index dfce595f1..a29a6cb5f 100644 --- a/lib/openai/models/beta/beta_response.rb +++ b/lib/openai/models/beta/beta_response.rb @@ -56,8 +56,8 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [Symbol, String, OpenAI::Models::Beta::BetaResponse::Model] required :model, union: -> { OpenAI::Beta::BetaResponse::Model } @@ -111,17 +111,18 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array] @@ -139,7 +140,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -161,7 +162,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -185,7 +186,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -193,7 +194,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Beta::BetaResponsePrompt, nil] optional :prompt, -> { OpenAI::Beta::BetaResponsePrompt }, nil?: true @@ -207,7 +208,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -227,7 +228,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -249,7 +250,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] optional :reasoning, -> { OpenAI::Beta::BetaResponse::Reasoning }, nil?: true @@ -260,7 +261,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -273,13 +274,15 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -305,8 +308,8 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Beta::BetaResponseTextConfig, nil] optional :text, -> { OpenAI::Beta::BetaResponseTextConfig } @@ -345,84 +348,244 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(id:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse} for more details. - # - # @param id [String] Unique identifier for this Response. - # - # @param created_at [Float] Unix timestamp (in seconds) of when this Response was created. - # - # @param error [OpenAI::Models::Beta::BetaResponseError, nil] An error object returned when the model fails to generate a Response. - # - # @param incomplete_details [OpenAI::Models::Beta::BetaResponse::IncompleteDetails, nil] Details about why the response is incomplete. - # - # @param instructions [String, Array, nil] A system (or developer) message inserted into the model's context. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [Symbol, String, OpenAI::Models::Beta::BetaResponse::Model] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param output [Array] An array of content items generated by the model. - # - # @param parallel_tool_calls [Boolean] Whether to allow the model to run tool calls in parallel. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::BetaResponse::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param completed_at [Float, nil] Unix timestamp (in seconds) of when this Response was completed. - # - # @param conversation [OpenAI::Models::Beta::BetaResponse::Conversation, nil] The conversation that this response belonged to. Input items and output items fr - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param moderation [OpenAI::Models::Beta::BetaResponse::Moderation, nil] Moderation results for the response input and output, if moderated completions w - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_diagnostics [OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::Unavailable] Prompt cache diagnostics requested for this response. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponse::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponse::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseStatus] The status of the response generation. One of `completed`, `failed`, - # - # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param truncation [Symbol, OpenAI::Models::Beta::BetaResponse::Truncation, nil] The truncation strategy to use for the model response. - # - # @param usage [OpenAI::Models::Beta::BetaResponseUsage] Represents token usage details including input tokens, output tokens, - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param object [Symbol, :response] The object type of this resource - always set to `response`. + # @param id [String] + # Unique identifier for this Response. + # + # @param created_at [Float] + # Unix timestamp (in seconds) of when this Response was created. + # + # @param error [OpenAI::Models::Beta::BetaResponseError, nil] + # An error object returned when the model fails to generate a Response. + # + # @param incomplete_details [OpenAI::Models::Beta::BetaResponse::IncompleteDetails, nil] + # Details about why the response is incomplete. + # + # @param instructions [String, Array, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [Symbol, String, OpenAI::Models::Beta::BetaResponse::Model] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param output [Array] + # An array of content items generated by the model. + # + # - The length and order of items in the `output` array is dependent on the + # model's response. + # - Rather than accessing the first item in the `output` array and assuming it's + # an `assistant` message with the content generated by the model, you might + # consider using the `output_text` property where supported in SDKs. + # + # @param parallel_tool_calls [Boolean] + # Whether to allow the model to run tool calls in parallel. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::BetaResponse::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param completed_at [Float, nil] + # Unix timestamp (in seconds) of when this Response was completed. Only present + # when the status is `completed`. + # + # @param conversation [OpenAI::Models::Beta::BetaResponse::Conversation, nil] + # The conversation that this response belonged to. Input items and output items + # from this response were automatically added to this conversation. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param moderation [OpenAI::Models::Beta::BetaResponse::Moderation, nil] + # Moderation results for the response input and output, if moderated completions + # were requested. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_diagnostics [OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::Unavailable] + # Prompt cache diagnostics requested for this response. + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponse::PromptCacheOptions] + # The prompt-caching options that were applied to the response. Supported for + # `gpt-5.6` and later models. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponse::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseStatus] + # The status of the response generation. One of `completed`, `failed`, + # `in_progress`, `cancelled`, `queued`, or `incomplete`. + # + # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param truncation [Symbol, OpenAI::Models::Beta::BetaResponse::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param usage [OpenAI::Models::Beta::BetaResponseUsage] + # Represents token usage details including input tokens, output tokens, a + # breakdown of output tokens, and the total tokens used. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param object [Symbol, :response] + # The object type of this resource - always set to `response`. # @see OpenAI::Models::Beta::BetaResponse#incomplete_details class IncompleteDetails < OpenAI::Internal::Type::BaseModel @@ -435,12 +598,12 @@ class IncompleteDetails < OpenAI::Internal::Type::BaseModel optional :reason, enum: -> { OpenAI::Beta::BetaResponse::IncompleteDetails::Reason } # @!method initialize(reason: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse::IncompleteDetails} for more details. - # # Details about why the response is incomplete. # - # @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::IncompleteDetails::Reason] The reason why the response is incomplete. `steered` means + # @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::IncompleteDetails::Reason] + # The reason why the response is incomplete. `steered` means the response stopped + # at a safe output boundary after a WebSocket `response.steer` event. The server + # can then create a successor response automatically with the queued input. # The reason why the response is incomplete. `steered` means the response stopped # at a safe output boundary after a WebSocket `response.steer` event. The server @@ -490,8 +653,8 @@ module Instructions # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @see OpenAI::Models::Beta::BetaResponse#model module Model @@ -843,7 +1006,7 @@ module ToolChoice variant -> { OpenAI::Beta::BetaToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Beta::BetaToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -871,7 +1034,8 @@ class BetaSpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseMod required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants @@ -890,7 +1054,8 @@ class Conversation < OpenAI::Internal::Type::BaseModel # The conversation that this response belonged to. Input items and output items # from this response were automatically added to this conversation. # - # @param id [String] The unique ID of the conversation that this response was associated with. + # @param id [String] + # The unique ID of the conversation that this response was associated with. end # @see OpenAI::Models::Beta::BetaResponse#moderation @@ -911,9 +1076,11 @@ class Moderation < OpenAI::Internal::Type::BaseModel # Moderation results for the response input and output, if moderated completions # were requested. # - # @param input [OpenAI::Models::Beta::BetaResponse::Moderation::Input::ModerationResult, OpenAI::Models::Beta::BetaResponse::Moderation::Input::Error] Moderation for the response input. + # @param input [OpenAI::Models::Beta::BetaResponse::Moderation::Input::ModerationResult, OpenAI::Models::Beta::BetaResponse::Moderation::Input::Error] + # Moderation for the response input. # - # @param output [OpenAI::Models::Beta::BetaResponse::Moderation::Output::ModerationResult, OpenAI::Models::Beta::BetaResponse::Moderation::Output::Error] Moderation for the response output. + # @param output [OpenAI::Models::Beta::BetaResponse::Moderation::Output::ModerationResult, OpenAI::Models::Beta::BetaResponse::Moderation::Output::Error] + # Moderation for the response output. # Moderation for the response input. # @@ -978,24 +1145,27 @@ class ModerationResult < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse::Moderation::Input::ModerationResult} for - # more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -1029,11 +1199,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation for the response input or output. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which was always `error` for moderation failures. + # @param type [Symbol, :error] + # The object type, which was always `error` for moderation failures. end # @!method self.variants @@ -1103,24 +1276,27 @@ class ModerationResult < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse::Moderation::Output::ModerationResult} for - # more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -1154,11 +1330,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation for the response input or output. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which was always `error` for moderation failures. + # @param type [Symbol, :error] + # The object type, which was always `error` for moderation failures. end # @!method self.variants @@ -1211,15 +1390,15 @@ class CacheMiss < OpenAI::Internal::Type::BaseModel optional :comparison_reusable_tokens, Integer # @!method initialize(cache_missed_tokens:, reason:, comparison_reusable_tokens: nil, type: :cache_miss) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss} for more - # details. - # - # @param cache_missed_tokens [Integer] The estimated number of input tokens affected after the first detected divergenc + # @param cache_missed_tokens [Integer] + # The estimated number of input tokens affected after the first detected + # divergence. # - # @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss::Reason] The reason prompt cache reuse did not occur. + # @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheDiagnostics::CacheMiss::Reason] + # The reason prompt cache reuse did not occur. # - # @param comparison_reusable_tokens [Integer] The raw token count of the reusable prefix in the compared response. + # @param comparison_reusable_tokens [Integer] + # The raw token count of the reusable prefix in the compared response. # # @param type [Symbol, :cache_miss] @@ -1302,11 +1481,14 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # The prompt-caching options that were applied to the response. Supported for # `gpt-5.6` and later models. # - # @param mode [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheOptions::Mode] Whether implicit prompt-cache breakpoints were enabled. + # @param mode [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheOptions::Mode] + # Whether implicit prompt-cache breakpoints were enabled. # - # @param ttl [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheOptions::Ttl] The minimum lifetime applied to each cache breakpoint. + # @param ttl [Symbol, OpenAI::Models::Beta::BetaResponse::PromptCacheOptions::Ttl] + # The minimum lifetime applied to each cache breakpoint. # - # @param comparison_response_id [String, nil] The response ID supplied as the prompt cache diagnostics comparison. + # @param comparison_response_id [String, nil] + # The response ID supplied as the prompt cache diagnostics comparison. # Whether implicit prompt-cache breakpoints were enabled. # @@ -1341,7 +1523,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1383,7 +1565,7 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Effort, nil] @@ -1425,21 +1607,44 @@ class Reasoning < OpenAI::Internal::Type::BaseModel optional :summary, enum: -> { OpenAI::Beta::BetaResponse::Reasoning::Summary }, nil?: true # @!method initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponse::Reasoning} for more details. - # # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param context [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Context, nil] + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # + # When returned on a response, this is the effective reasoning context mode used + # for the response. + # + # @param effort [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Effort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param generate_summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::GenerateSummary, nil] + # **Deprecated:** use `summary` instead. # - # @param context [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns. + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param effort [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Effort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param mode [String, Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Mode] + # Controls the reasoning execution mode for the request. # - # @param generate_summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead. + # When returned on a response, this is the effective execution mode. # - # @param mode [String, Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Mode] Controls the reasoning execution mode for the request. + # @param summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Summary, nil] + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be + # `concise` is supported for `computer-use-preview` models and all reasoning + # models after `gpt-5`. # Controls which reasoning items are rendered back to the model on later turns. If # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` @@ -1464,7 +1669,7 @@ module Context # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @see OpenAI::Models::Beta::BetaResponse::Reasoning#effort @@ -1559,13 +1764,15 @@ module Summary # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb b/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb index de6781447..8439fc70e 100644 --- a/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb +++ b/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb @@ -60,26 +60,33 @@ class BetaResponseApplyPatchToolCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, operation:, status:, agent: nil, caller_: nil, created_by: nil, type: :apply_patch_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseApplyPatchToolCall} for more details. - # # A tool call that applies file diffs by creating, deleting, or updating files. # - # @param id [String] The unique ID of the apply patch tool call. Populated when this item is returned + # @param id [String] + # The unique ID of the apply patch tool call. Populated when this item is returned + # via API. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param operation [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::CreateFile, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::DeleteFile, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::UpdateFile] One of the create_file, delete_file, or update_file operations applied via apply + # @param operation [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::CreateFile, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::DeleteFile, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Operation::UpdateFile] + # One of the create_file, delete_file, or update_file operations applied via + # apply_patch. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Status] The status of the apply patch tool call. One of `in_progress` or `completed`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Status] + # The status of the apply patch tool call. One of `in_progress` or `completed`. # - # @param agent [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Agent] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call. + # @param created_by [String] + # The ID of the entity that created this tool call. # - # @param type [Symbol, :apply_patch_call] The type of the item. Always `apply_patch_call`. + # @param type [Symbol, :apply_patch_call] + # The type of the item. Always `apply_patch_call`. # One of the create_file, delete_file, or update_file operations applied via # apply_patch. @@ -121,11 +128,14 @@ class CreateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :create_file) # Instruction describing how to create a file via the apply_patch tool. # - # @param diff [String] Diff to apply. + # @param diff [String] + # Diff to apply. # - # @param path [String] Path of the file to create. + # @param path [String] + # Path of the file to create. # - # @param type [Symbol, :create_file] Create a new file with the provided diff. + # @param type [Symbol, :create_file] + # Create a new file with the provided diff. end class DeleteFile < OpenAI::Internal::Type::BaseModel @@ -144,9 +154,11 @@ class DeleteFile < OpenAI::Internal::Type::BaseModel # @!method initialize(path:, type: :delete_file) # Instruction describing how to delete a file via the apply_patch tool. # - # @param path [String] Path of the file to delete. + # @param path [String] + # Path of the file to delete. # - # @param type [Symbol, :delete_file] Delete the specified file. + # @param type [Symbol, :delete_file] + # Delete the specified file. end class UpdateFile < OpenAI::Internal::Type::BaseModel @@ -171,11 +183,14 @@ class UpdateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :update_file) # Instruction describing how to update a file via the apply_patch tool. # - # @param diff [String] Diff to apply. + # @param diff [String] + # Diff to apply. # - # @param path [String] Path of the file to update. + # @param path [String] + # Path of the file to update. # - # @param type [Symbol, :update_file] Update an existing file with the provided diff. + # @param type [Symbol, :update_file] + # Update an existing file with the provided diff. end # @!method self.variants @@ -206,7 +221,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -244,7 +260,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb b/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb index e42ffc880..c2365d7fb 100644 --- a/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb +++ b/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb @@ -59,26 +59,32 @@ class BetaResponseApplyPatchToolCallOutput < OpenAI::Internal::Type::BaseModel optional :output, String, nil?: true # @!method initialize(id:, call_id:, status:, agent: nil, caller_: nil, created_by: nil, output: nil, type: :apply_patch_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput} for more details. - # # The output emitted by an apply patch tool call. # - # @param id [String] The unique ID of the apply patch tool call output. Populated when this item is r + # @param id [String] + # The unique ID of the apply patch tool call output. Populated when this item is + # returned via API. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Status] The status of the apply patch tool call output. One of `completed` or `failed`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Status] + # The status of the apply patch tool call output. One of `completed` or `failed`. # - # @param agent [OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Agent] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call output. + # @param created_by [String] + # The ID of the entity that created this tool call output. # - # @param output [String, nil] Optional textual output returned by the apply patch tool. + # @param output [String, nil] + # Optional textual output returned by the apply patch tool. # - # @param type [Symbol, :apply_patch_call_output] The type of the item. Always `apply_patch_call_output`. + # @param type [Symbol, :apply_patch_call_output] + # The type of the item. Always `apply_patch_call_output`. # The status of the apply patch tool call output. One of `completed` or `failed`. # @@ -104,7 +110,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -142,7 +149,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_audio_delta_event.rb b/lib/openai/models/beta/beta_response_audio_delta_event.rb index 6a963c640..7495a2931 100644 --- a/lib/openai/models/beta/beta_response_audio_delta_event.rb +++ b/lib/openai/models/beta/beta_response_audio_delta_event.rb @@ -29,18 +29,19 @@ class BetaResponseAudioDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseAudioDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, sequence_number:, agent: nil, type: :"response.audio.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseAudioDeltaEvent} for more details. - # # Emitted when there is a partial audio response. # - # @param delta [String] A chunk of Base64 encoded response audio bytes. + # @param delta [String] + # A chunk of Base64 encoded response audio bytes. # - # @param sequence_number [Integer] A sequence number for this chunk of the stream response. + # @param sequence_number [Integer] + # A sequence number for this chunk of the stream response. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.audio.delta"] The type of the event. Always `response.audio.delta`. + # @param type [Symbol, :"response.audio.delta"] + # The type of the event. Always `response.audio.delta`. # @see OpenAI::Models::Beta::BetaResponseAudioDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_audio_done_event.rb b/lib/openai/models/beta/beta_response_audio_done_event.rb index 6c4f2a64b..838661a41 100644 --- a/lib/openai/models/beta/beta_response_audio_done_event.rb +++ b/lib/openai/models/beta/beta_response_audio_done_event.rb @@ -23,16 +23,16 @@ class BetaResponseAudioDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseAudioDoneEvent::Agent }, nil?: true # @!method initialize(sequence_number:, agent: nil, type: :"response.audio.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseAudioDoneEvent} for more details. - # # Emitted when the audio response is complete. # - # @param sequence_number [Integer] The sequence number of the delta. + # @param sequence_number [Integer] + # The sequence number of the delta. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.audio.done"] The type of the event. Always `response.audio.done`. + # @param type [Symbol, :"response.audio.done"] + # The type of the event. Always `response.audio.done`. # @see OpenAI::Models::Beta::BetaResponseAudioDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -45,7 +45,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb b/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb index ef7c57f6d..05e0db1cc 100644 --- a/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb +++ b/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb @@ -29,18 +29,19 @@ class BetaResponseAudioTranscriptDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseAudioTranscriptDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, sequence_number:, agent: nil, type: :"response.audio.transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent} for more details. - # # Emitted when there is a partial transcript of audio. # - # @param delta [String] The partial transcript of the audio response. + # @param delta [String] + # The partial transcript of the audio response. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.audio.transcript.delta"] The type of the event. Always `response.audio.transcript.delta`. + # @param type [Symbol, :"response.audio.transcript.delta"] + # The type of the event. Always `response.audio.transcript.delta`. # @see OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb b/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb index a493d63ff..ab2e13be0 100644 --- a/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb +++ b/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb @@ -23,16 +23,16 @@ class BetaResponseAudioTranscriptDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseAudioTranscriptDoneEvent::Agent }, nil?: true # @!method initialize(sequence_number:, agent: nil, type: :"response.audio.transcript.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent} for more details. - # # Emitted when the full audio transcript is completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.audio.transcript.done"] The type of the event. Always `response.audio.transcript.done`. + # @param type [Symbol, :"response.audio.transcript.done"] + # The type of the event. Always `response.audio.transcript.done`. # @see OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -45,7 +45,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb b/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb index ca22a9b37..33067f977 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb @@ -42,23 +42,26 @@ class BetaResponseCodeInterpreterCallCodeDeltaEvent < OpenAI::Internal::Type::Ba optional :agent, -> { OpenAI::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.code_interpreter_call_code.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent} for more - # details. - # # Emitted when a partial code snippet is streamed by the code interpreter. # - # @param delta [String] The partial code snippet being streamed by the code interpreter. + # @param delta [String] + # The partial code snippet being streamed by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is being streame + # @param output_index [Integer] + # The index of the output item in the response for which the code is being + # streamed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.code_interpreter_call_code.delta"] The type of the event. Always `response.code_interpreter_call_code.delta`. + # @param type [Symbol, :"response.code_interpreter_call_code.delta"] + # The type of the event. Always `response.code_interpreter_call_code.delta`. # @see OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -71,7 +74,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb b/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb index aec4c0e4d..16b668ad5 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb @@ -43,17 +43,23 @@ class BetaResponseCodeInterpreterCallCodeDoneEvent < OpenAI::Internal::Type::Bas # @!method initialize(code:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.code_interpreter_call_code.done") # Emitted when the code snippet is finalized by the code interpreter. # - # @param code [String] The final code snippet output by the code interpreter. + # @param code [String] + # The final code snippet output by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is finalized. + # @param output_index [Integer] + # The index of the output item in the response for which the code is finalized. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.code_interpreter_call_code.done"] The type of the event. Always `response.code_interpreter_call_code.done`. + # @param type [Symbol, :"response.code_interpreter_call_code.done"] + # The type of the event. Always `response.code_interpreter_call_code.done`. # @see OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -66,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb b/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb index 0ed347648..db769327b 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb @@ -36,21 +36,23 @@ class BetaResponseCodeInterpreterCallCompletedEvent < OpenAI::Internal::Type::Ba optional :agent, -> { OpenAI::Beta::BetaResponseCodeInterpreterCallCompletedEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.code_interpreter_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent} for more - # details. - # # Emitted when the code interpreter call is completed. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is completed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.code_interpreter_call.completed"] The type of the event. Always `response.code_interpreter_call.completed`. + # @param type [Symbol, :"response.code_interpreter_call.completed"] + # The type of the event. Always `response.code_interpreter_call.completed`. # @see OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -63,7 +65,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb b/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb index 5321af0d5..0fa349ef1 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb @@ -42,21 +42,23 @@ class BetaResponseCodeInterpreterCallInProgressEvent < OpenAI::Internal::Type::B ) # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.code_interpreter_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent} for more - # details. - # # Emitted when a code interpreter call is in progress. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is in progress. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.code_interpreter_call.in_progress"] The type of the event. Always `response.code_interpreter_call.in_progress`. + # @param type [Symbol, :"response.code_interpreter_call.in_progress"] + # The type of the event. Always `response.code_interpreter_call.in_progress`. # @see OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -69,7 +71,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb b/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb index bd242d9cc..64424f8a2 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb @@ -42,21 +42,23 @@ class BetaResponseCodeInterpreterCallInterpretingEvent < OpenAI::Internal::Type: ) # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.code_interpreter_call.interpreting") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent} for - # more details. - # # Emitted when the code interpreter is actively interpreting the code snippet. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter is i + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter is + # interpreting code. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.code_interpreter_call.interpreting"] The type of the event. Always `response.code_interpreter_call.interpreting`. + # @param type [Symbol, :"response.code_interpreter_call.interpreting"] + # The type of the event. Always `response.code_interpreter_call.interpreting`. # @see OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -69,7 +71,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb b/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb index 35a7214ab..cd2104133 100644 --- a/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb +++ b/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb @@ -55,24 +55,30 @@ class BetaResponseCodeInterpreterToolCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseCodeInterpreterToolCall::Agent }, nil?: true # @!method initialize(id:, code:, container_id:, outputs:, status:, agent: nil, type: :code_interpreter_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall} for more details. - # # A tool call to run code. # - # @param id [String] The unique ID of the code interpreter tool call. + # @param id [String] + # The unique ID of the code interpreter tool call. # - # @param code [String, nil] The code to run, or null if not available. + # @param code [String, nil] + # The code to run, or null if not available. # - # @param container_id [String] The ID of the container used to run the code. + # @param container_id [String] + # The ID of the container used to run the code. # - # @param outputs [Array, nil] The outputs generated by the code interpreter, such as logs or images. + # @param outputs [Array, nil] + # The outputs generated by the code interpreter, such as logs or images. Can be + # null if no outputs are available. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Status] The status of the code interpreter tool call. Valid values are `in_progress`, `c + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Status] + # The status of the code interpreter tool call. Valid values are `in_progress`, + # `completed`, `incomplete`, `interpreting`, and `failed`. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :code_interpreter_call] The type of the code interpreter tool call. Always `code_interpreter_call`. + # @param type [Symbol, :code_interpreter_call] + # The type of the code interpreter tool call. Always `code_interpreter_call`. # The logs output from the code interpreter. module Output @@ -102,9 +108,11 @@ class Logs < OpenAI::Internal::Type::BaseModel # @!method initialize(logs:, type: :logs) # The logs output from the code interpreter. # - # @param logs [String] The logs output from the code interpreter. + # @param logs [String] + # The logs output from the code interpreter. # - # @param type [Symbol, :logs] The type of the output. Always `logs`. + # @param type [Symbol, :logs] + # The type of the output. Always `logs`. end class Image < OpenAI::Internal::Type::BaseModel @@ -123,9 +131,11 @@ class Image < OpenAI::Internal::Type::BaseModel # @!method initialize(url:, type: :image) # The image output from the code interpreter. # - # @param url [String] The URL of the image output from the code interpreter. + # @param url [String] + # The URL of the image output from the code interpreter. # - # @param type [Symbol, :image] The type of the output. Always `image`. + # @param type [Symbol, :image] + # The type of the output. Always `image`. end # @!method self.variants @@ -160,7 +170,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_compaction_item.rb b/lib/openai/models/beta/beta_response_compaction_item.rb index 9bb280d08..78d896ea4 100644 --- a/lib/openai/models/beta/beta_response_compaction_item.rb +++ b/lib/openai/models/beta/beta_response_compaction_item.rb @@ -36,17 +36,22 @@ class BetaResponseCompactionItem < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, encrypted_content:, agent: nil, created_by: nil, type: :compaction) # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). # - # @param id [String] The unique ID of the compaction item. + # @param id [String] + # The unique ID of the compaction item. # - # @param encrypted_content [String] The encrypted content that was produced by compaction. + # @param encrypted_content [String] + # The encrypted content that was produced by compaction. # - # @param agent [OpenAI::Models::Beta::BetaResponseCompactionItem::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCompactionItem::Agent] + # The agent that produced this item. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :compaction] The type of the item. Always `compaction`. + # @param type [Symbol, :compaction] + # The type of the item. Always `compaction`. # @see OpenAI::Models::Beta::BetaResponseCompactionItem#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -59,7 +64,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_compaction_item_param.rb b/lib/openai/models/beta/beta_response_compaction_item_param.rb index 63f98c199..c7e956ab2 100644 --- a/lib/openai/models/beta/beta_response_compaction_item_param.rb +++ b/lib/openai/models/beta/beta_response_compaction_item_param.rb @@ -30,15 +30,19 @@ class BetaResponseCompactionItemParam < OpenAI::Internal::Type::BaseModel # @!method initialize(encrypted_content:, id: nil, agent: nil, type: :compaction) # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). # - # @param encrypted_content [String] The encrypted content of the compaction summary. + # @param encrypted_content [String] + # The encrypted content of the compaction summary. # - # @param id [String, nil] The ID of the compaction item. + # @param id [String, nil] + # The ID of the compaction item. # - # @param agent [OpenAI::Models::Beta::BetaResponseCompactionItemParam::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCompactionItemParam::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :compaction] The type of the item. Always `compaction`. + # @param type [Symbol, :compaction] + # The type of the item. Always `compaction`. # @see OpenAI::Models::Beta::BetaResponseCompactionItemParam#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -51,7 +55,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_completed_event.rb b/lib/openai/models/beta/beta_response_completed_event.rb index b0ba9c43d..afbf8a83b 100644 --- a/lib/openai/models/beta/beta_response_completed_event.rb +++ b/lib/openai/models/beta/beta_response_completed_event.rb @@ -29,18 +29,19 @@ class BetaResponseCompletedEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseCompletedEvent::Agent }, nil?: true # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCompletedEvent} for more details. - # # Emitted when the model response is complete. # - # @param response [OpenAI::Models::Beta::BetaResponse] Properties of the completed response. + # @param response [OpenAI::Models::Beta::BetaResponse] + # Properties of the completed response. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.completed"] The type of the event. Always `response.completed`. + # @param type [Symbol, :"response.completed"] + # The type of the event. Always `response.completed`. # @see OpenAI::Models::Beta::BetaResponseCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_computer_tool_call.rb b/lib/openai/models/beta/beta_response_computer_tool_call.rb index 120610d39..ca25a8e9b 100644 --- a/lib/openai/models/beta/beta_response_computer_tool_call.rb +++ b/lib/openai/models/beta/beta_response_computer_tool_call.rb @@ -58,29 +58,35 @@ class BetaResponseComputerToolCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseComputerToolCall::Agent }, nil?: true # @!method initialize(id:, call_id:, pending_safety_checks:, status:, type:, action: nil, actions: nil, agent: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseComputerToolCall} for more details. - # # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) # for more information. # - # @param id [String] The unique ID of the computer call. + # @param id [String] + # The unique ID of the computer call. # - # @param call_id [String] An identifier used when responding to the tool call with output. + # @param call_id [String] + # An identifier used when responding to the tool call with output. # - # @param pending_safety_checks [Array] The pending safety checks for the computer call. + # @param pending_safety_checks [Array] + # The pending safety checks for the computer call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCall::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCall::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCall::Type] The type of the computer call. Always `computer_call`. + # @param type [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCall::Type] + # The type of the computer call. Always `computer_call`. # - # @param action [OpenAI::Models::Beta::BetaComputerAction::Click, OpenAI::Models::Beta::BetaComputerAction::DoubleClick, OpenAI::Models::Beta::BetaComputerAction::Drag, OpenAI::Models::Beta::BetaComputerAction::Keypress, OpenAI::Models::Beta::BetaComputerAction::Move, OpenAI::Models::Beta::BetaComputerAction::Screenshot, OpenAI::Models::Beta::BetaComputerAction::Scroll, OpenAI::Models::Beta::BetaComputerAction::Type, OpenAI::Models::Beta::BetaComputerAction::Wait] A click action. + # @param action [OpenAI::Models::Beta::BetaComputerAction::Click, OpenAI::Models::Beta::BetaComputerAction::DoubleClick, OpenAI::Models::Beta::BetaComputerAction::Drag, OpenAI::Models::Beta::BetaComputerAction::Keypress, OpenAI::Models::Beta::BetaComputerAction::Move, OpenAI::Models::Beta::BetaComputerAction::Screenshot, OpenAI::Models::Beta::BetaComputerAction::Scroll, OpenAI::Models::Beta::BetaComputerAction::Type, OpenAI::Models::Beta::BetaComputerAction::Wait] + # A click action. # - # @param actions [Array] Flattened batched actions for `computer_use`. Each action includes an + # @param actions [Array] + # Flattened batched actions for `computer_use`. Each action includes an `type` + # discriminator and action-specific fields. # - # @param agent [OpenAI::Models::Beta::BetaResponseComputerToolCall::Agent, nil] The agent that produced this item. - + # @param agent [OpenAI::Models::Beta::BetaResponseComputerToolCall::Agent, nil] + # The agent that produced this item. class PendingSafetyCheck < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the pending safety check. @@ -103,11 +109,14 @@ class PendingSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. @@ -148,7 +157,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb b/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb index 99a61ec3c..c469adaf5 100644 --- a/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +++ b/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb @@ -62,24 +62,31 @@ class BetaResponseComputerToolCallOutputItem < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, output:, status:, acknowledged_safety_checks: nil, agent: nil, created_by: nil, type: :computer_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem} for more details. + # @param id [String] + # The unique ID of the computer call tool output. # - # @param id [String] The unique ID of the computer call tool output. + # @param call_id [String] + # The ID of the computer tool call that produced the output. # - # @param call_id [String] The ID of the computer tool call that produced the output. + # @param output [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputScreenshot] + # A computer screenshot image used with the computer use tool. # - # @param output [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputScreenshot] A computer screenshot image used with the computer use tool. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem::Status] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem::Status] The status of the message input. One of `in_progress`, `completed`, or + # @param acknowledged_safety_checks [Array] + # The safety checks reported by the API that have been acknowledged by the + # developer. # - # @param acknowledged_safety_checks [Array] The safety checks reported by the API that have been acknowledged by the + # @param agent [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem::Agent, nil] + # The agent that produced this item. # - # @param agent [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem::Agent, nil] The agent that produced this item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param created_by [String] The identifier of the actor that created the item. - # - # @param type [Symbol, :computer_call_output] The type of the computer tool call output. Always `computer_call_output`. + # @param type [Symbol, :computer_call_output] + # The type of the computer tool call output. Always `computer_call_output`. # The status of the message input. One of `in_progress`, `completed`, or # `incomplete`. Populated when input items are returned via API. @@ -119,11 +126,14 @@ class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end # @see OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem#agent @@ -137,7 +147,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb b/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb index ff3be4d26..2be5e345e 100644 --- a/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb +++ b/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb @@ -24,17 +24,17 @@ class BetaResponseComputerToolCallOutputScreenshot < OpenAI::Internal::Type::Bas optional :image_url, String # @!method initialize(file_id: nil, image_url: nil, type: :computer_screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseComputerToolCallOutputScreenshot} for more - # details. - # # A computer screenshot image used with the computer use tool. # - # @param file_id [String] The identifier of an uploaded file that contains the screenshot. + # @param file_id [String] + # The identifier of an uploaded file that contains the screenshot. # - # @param image_url [String] The URL of the screenshot image. + # @param image_url [String] + # The URL of the screenshot image. # - # @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is + # @param type [Symbol, :computer_screenshot] + # Specifies the event type. For a computer screenshot, this property is always set + # to `computer_screenshot`. end end diff --git a/lib/openai/models/beta/beta_response_configuration_update_item.rb b/lib/openai/models/beta/beta_response_configuration_update_item.rb index d695a02d9..1b14b1f0a 100644 --- a/lib/openai/models/beta/beta_response_configuration_update_item.rb +++ b/lib/openai/models/beta/beta_response_configuration_update_item.rb @@ -32,13 +32,17 @@ class BetaResponseConfigurationUpdateItem < OpenAI::Internal::Type::BaseModel # A configuration update that applies to subsequent responses until it is replaced # by another configuration update. # - # @param id [String] The unique ID of the configuration update item. + # @param id [String] + # The unique ID of the configuration update item. # - # @param agent [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Agent] + # The agent that produced this item. # - # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning] The reasoning configuration applied by this update. + # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning] + # The reasoning configuration applied by this update. # - # @param type [Symbol, :configuration_update] The item type. Always `configuration_update`. + # @param type [Symbol, :configuration_update] + # The item type. Always `configuration_update`. # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -51,7 +55,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem#reasoning @@ -68,13 +73,11 @@ class Reasoning < OpenAI::Internal::Type::BaseModel ) # @!method initialize(effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning} for more - # details. - # # The reasoning configuration applied by this update. # - # @param effort [Symbol, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning::Effort, nil] The reasoning effort used for subsequent responses until another + # @param effort [Symbol, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning::Effort, nil] + # The reasoning effort used for subsequent responses until another configuration + # update replaces it. # The reasoning effort used for subsequent responses until another configuration # update replaces it. diff --git a/lib/openai/models/beta/beta_response_configuration_update_item_param.rb b/lib/openai/models/beta/beta_response_configuration_update_item_param.rb index 8f1e5d1c6..6eddf34da 100644 --- a/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +++ b/lib/openai/models/beta/beta_response_configuration_update_item_param.rb @@ -33,13 +33,17 @@ class BetaResponseConfigurationUpdateItemParam < OpenAI::Internal::Type::BaseMod # remains in effect for subsequent responses until it is replaced by another # configuration update. # - # @param id [String, nil] The unique ID of the configuration update item. + # @param id [String, nil] + # The unique ID of the configuration update item. # - # @param agent [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Agent, nil] + # The agent that produced this item. # - # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning] Updates to reasoning configuration. Only effort is supported. + # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning] + # Updates to reasoning configuration. Only effort is supported. # - # @param type [Symbol, :configuration_update] The item type. Always `configuration_update`. + # @param type [Symbol, :configuration_update] + # The item type. Always `configuration_update`. # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -52,7 +56,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam#reasoning @@ -69,13 +74,11 @@ class Reasoning < OpenAI::Internal::Type::BaseModel ) # @!method initialize(effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning} for - # more details. - # # Updates to reasoning configuration. Only effort is supported. # - # @param effort [Symbol, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning::Effort, nil] The reasoning effort to use for subsequent responses until another + # @param effort [Symbol, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning::Effort, nil] + # The reasoning effort to use for subsequent responses until another configuration + # update replaces it. # The reasoning effort to use for subsequent responses until another configuration # update replaces it. diff --git a/lib/openai/models/beta/beta_response_container_reference.rb b/lib/openai/models/beta/beta_response_container_reference.rb index 52c1c882d..8b579f5bd 100644 --- a/lib/openai/models/beta/beta_response_container_reference.rb +++ b/lib/openai/models/beta/beta_response_container_reference.rb @@ -20,7 +20,8 @@ class BetaResponseContainerReference < OpenAI::Internal::Type::BaseModel # # @param container_id [String] # - # @param type [Symbol, :container_reference] The environment type. Always `container_reference`. + # @param type [Symbol, :container_reference] + # The environment type. Always `container_reference`. end end diff --git a/lib/openai/models/beta/beta_response_content.rb b/lib/openai/models/beta/beta_response_content.rb index 96fdbd4c3..da80e2e25 100644 --- a/lib/openai/models/beta/beta_response_content.rb +++ b/lib/openai/models/beta/beta_response_content.rb @@ -10,7 +10,7 @@ module BetaResponseContent # A text input to the model. variant -> { OpenAI::Beta::BetaResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant -> { OpenAI::Beta::BetaResponseInputImage } # A file input to the model. @@ -41,9 +41,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_content_part_added_event.rb b/lib/openai/models/beta/beta_response_content_part_added_event.rb index a7775a322..be556caa4 100644 --- a/lib/openai/models/beta/beta_response_content_part_added_event.rb +++ b/lib/openai/models/beta/beta_response_content_part_added_event.rb @@ -47,24 +47,28 @@ class BetaResponseContentPartAddedEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseContentPartAddedEvent::Agent }, nil?: true # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, agent: nil, type: :"response.content_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseContentPartAddedEvent} for more details. - # # Emitted when a new content part is added. # - # @param content_index [Integer] The index of the content part that was added. + # @param content_index [Integer] + # The index of the content part that was added. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added. + # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Part::ReasoningText] + # The content part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.content_part.added"] The type of the event. Always `response.content_part.added`. + # @param type [Symbol, :"response.content_part.added"] + # The type of the event. Always `response.content_part.added`. # The content part that was added. # @@ -99,9 +103,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants @@ -119,7 +125,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_content_part_done_event.rb b/lib/openai/models/beta/beta_response_content_part_done_event.rb index 2e06f4caa..f7fa0169d 100644 --- a/lib/openai/models/beta/beta_response_content_part_done_event.rb +++ b/lib/openai/models/beta/beta_response_content_part_done_event.rb @@ -47,24 +47,28 @@ class BetaResponseContentPartDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseContentPartDoneEvent::Agent }, nil?: true # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, agent: nil, type: :"response.content_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseContentPartDoneEvent} for more details. - # # Emitted when a content part is done. # - # @param content_index [Integer] The index of the content part that is done. + # @param content_index [Integer] + # The index of the content part that is done. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done. + # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Part::ReasoningText] + # The content part that is done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.content_part.done"] The type of the event. Always `response.content_part.done`. + # @param type [Symbol, :"response.content_part.done"] + # The type of the event. Always `response.content_part.done`. # The content part that is done. # @@ -99,9 +103,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants @@ -119,7 +125,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_conversation_param.rb b/lib/openai/models/beta/beta_response_conversation_param.rb index 5d3c54a8e..f5af188fc 100644 --- a/lib/openai/models/beta/beta_response_conversation_param.rb +++ b/lib/openai/models/beta/beta_response_conversation_param.rb @@ -13,7 +13,8 @@ class BetaResponseConversationParam < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # The conversation that this response belongs to. # - # @param id [String] The unique ID of the conversation. + # @param id [String] + # The unique ID of the conversation. end end diff --git a/lib/openai/models/beta/beta_response_created_event.rb b/lib/openai/models/beta/beta_response_created_event.rb index 8a98a34c7..34d4e2e0b 100644 --- a/lib/openai/models/beta/beta_response_created_event.rb +++ b/lib/openai/models/beta/beta_response_created_event.rb @@ -29,18 +29,19 @@ class BetaResponseCreatedEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseCreatedEvent::Agent }, nil?: true # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCreatedEvent} for more details. - # # An event that is emitted when a response is created. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that was created. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that was created. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCreatedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCreatedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.created"] The type of the event. Always `response.created`. + # @param type [Symbol, :"response.created"] + # The type of the event. Always `response.created`. # @see OpenAI::Models::Beta::BetaResponseCreatedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_custom_tool_call.rb b/lib/openai/models/beta/beta_response_custom_tool_call.rb index 027397710..e9319a953 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call.rb @@ -64,28 +64,34 @@ class BetaResponseCustomToolCall < OpenAI::Internal::Type::BaseModel optional :namespace, String # @!method initialize(call_id:, input:, name:, id: nil, agent: nil, async: nil, caller_: nil, namespace: nil, type: :custom_tool_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCustomToolCall} for more details. - # # A call to a custom tool created by the model. # - # @param call_id [String] An identifier used to map this custom tool call to a tool call output. + # @param call_id [String] + # An identifier used to map this custom tool call to a tool call output. # - # @param input [String] The input for the custom tool call generated by the model. + # @param input [String] + # The input for the custom tool call generated by the model. # - # @param name [String] The name of the custom tool being called. + # @param name [String] + # The name of the custom tool being called. # - # @param id [String] The unique ID of the custom tool call in the OpenAI platform. + # @param id [String] + # The unique ID of the custom tool call in the OpenAI platform. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCall::Agent, nil] + # The agent that produced this item. # - # @param async [Boolean] Whether the custom tool call runs asynchronously. + # @param async [Boolean] + # Whether the custom tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the custom tool being called. + # @param namespace [String] + # The namespace of the custom tool being called. # - # @param type [Symbol, :custom_tool_call] The type of the custom tool call. Always `custom_tool_call`. + # @param type [Symbol, :custom_tool_call] + # The type of the custom tool call. Always `custom_tool_call`. # @see OpenAI::Models::Beta::BetaResponseCustomToolCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -98,7 +104,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -136,7 +143,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb b/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb index b211183b0..0c3c58808 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb @@ -43,17 +43,23 @@ class BetaResponseCustomToolCallInputDeltaEvent < OpenAI::Internal::Type::BaseMo # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.custom_tool_call_input.delta") # Event representing a delta (partial update) to the input of a custom tool call. # - # @param delta [String] The incremental input data (delta) for the custom tool call. + # @param delta [String] + # The incremental input data (delta) for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this delta applies to. + # @param output_index [Integer] + # The index of the output this delta applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.custom_tool_call_input.delta"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.delta"] + # The event type identifier. # @see OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -66,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb b/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb index ebacaf2d1..9449d6b46 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb @@ -43,17 +43,23 @@ class BetaResponseCustomToolCallInputDoneEvent < OpenAI::Internal::Type::BaseMod # @!method initialize(input:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.custom_tool_call_input.done") # Event indicating that input for a custom tool call is complete. # - # @param input [String] The complete input data for the custom tool call. + # @param input [String] + # The complete input data for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this event applies to. + # @param output_index [Integer] + # The index of the output this event applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.custom_tool_call_input.done"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.done"] + # The event type identifier. # @see OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -66,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_custom_tool_call_item.rb b/lib/openai/models/beta/beta_response_custom_tool_call_item.rb index 8d94723e3..ebd63f2a7 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call_item.rb @@ -24,32 +24,41 @@ class BetaResponseCustomToolCallItem < OpenAI::Models::Beta::BetaResponseCustomT optional :created_by, String # @!method initialize(call_id:, input:, name:, id:, status:, agent: nil, async: nil, caller_: nil, namespace: nil, created_by: nil, type: :custom_tool_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCustomToolCallItem} for more details. - # # A call to a custom tool created by the model. # - # @param call_id [String] An identifier used to map this custom tool call to a tool call output. + # @param call_id [String] + # An identifier used to map this custom tool call to a tool call output. # - # @param input [String] The input for the custom tool call generated by the model. + # @param input [String] + # The input for the custom tool call generated by the model. # - # @param name [String] The name of the custom tool being called. + # @param name [String] + # The name of the custom tool being called. # - # @param id [String] The unique ID of the custom tool call item. + # @param id [String] + # The unique ID of the custom tool call item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCustomToolCallItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCustomToolCallItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCall::Agent, nil] + # The agent that produced this item. # - # @param async [Boolean] Whether the custom tool call runs asynchronously. + # @param async [Boolean] + # Whether the custom tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the custom tool being called. + # @param namespace [String] + # The namespace of the custom tool being called. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :custom_tool_call] The type of the custom tool call. Always `custom_tool_call`. + # @param type [Symbol, :custom_tool_call] + # The type of the custom tool call. Always `custom_tool_call`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/beta/beta_response_custom_tool_call_output.rb b/lib/openai/models/beta/beta_response_custom_tool_call_output.rb index 943cb33a1..aab6ee43f 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call_output.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call_output.rb @@ -47,22 +47,26 @@ class BetaResponseCustomToolCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, agent: nil, caller_: nil, type: :custom_tool_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCustomToolCallOutput} for more details. - # # The output of a custom tool call from your code, being sent back to the model. # - # @param call_id [String] The call ID, used to map this custom tool call output to a custom tool call. + # @param call_id [String] + # The call ID, used to map this custom tool call output to a custom tool call. # - # @param output [String, Array] The output from the custom tool call generated by your code. + # @param output [String, Array] + # The output from the custom tool call generated by your code. Can be a string or + # an list of output content. # - # @param id [String] The unique ID of the custom tool call output in the OpenAI platform. + # @param id [String] + # The unique ID of the custom tool call output in the OpenAI platform. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param type [Symbol, :custom_tool_call_output] The type of the custom tool call output. Always `custom_tool_call_output`. + # @param type [Symbol, :custom_tool_call_output] + # The type of the custom tool call output. Always `custom_tool_call_output`. # The output from the custom tool call generated by your code. Can be a string or # an list of output content. @@ -86,7 +90,7 @@ module OutputContentList # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Beta::BetaResponseInputImage } # A file input to the model. @@ -118,7 +122,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -141,7 +146,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -158,9 +164,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb b/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb index 81f250d89..53885dc17 100644 --- a/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb +++ b/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb @@ -24,26 +24,33 @@ class BetaResponseCustomToolCallOutputItem < OpenAI::Models::Beta::BetaResponseC optional :created_by, String # @!method initialize(call_id:, output:, id:, status:, agent: nil, caller_: nil, created_by: nil, type: :custom_tool_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem} for more details. - # # The output of a custom tool call from your code, being sent back to the model. # - # @param call_id [String] The call ID, used to map this custom tool call output to a custom tool call. + # @param call_id [String] + # The call ID, used to map this custom tool call output to a custom tool call. # - # @param output [String, Array] The output from the custom tool call generated by your code. + # @param output [String, Array] + # The output from the custom tool call generated by your code. Can be a string or + # an list of output content. # - # @param id [String] The unique ID of the custom tool call output item. + # @param id [String] + # The unique ID of the custom tool call output item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :custom_tool_call_output] The type of the custom tool call output. Always `custom_tool_call_output`. + # @param type [Symbol, :custom_tool_call_output] + # The type of the custom tool call output. Always `custom_tool_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/beta/beta_response_error.rb b/lib/openai/models/beta/beta_response_error.rb index 6246492f3..9cc333f41 100644 --- a/lib/openai/models/beta/beta_response_error.rb +++ b/lib/openai/models/beta/beta_response_error.rb @@ -22,14 +22,13 @@ class BetaResponseError < OpenAI::Internal::Type::BaseModel optional :misalignment, -> { OpenAI::Beta::BetaResponseError::Misalignment } # @!method initialize(code:, message:, misalignment: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseError} for more details. - # # An error object returned when the model fails to generate a Response. # - # @param code [Symbol, OpenAI::Models::Beta::BetaResponseError::Code] The error code for the response. + # @param code [Symbol, OpenAI::Models::Beta::BetaResponseError::Code] + # The error code for the response. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # # @param misalignment [OpenAI::Models::Beta::BetaResponseError::Misalignment] @@ -86,11 +85,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel optional :steer, -> { OpenAI::Beta::BetaResponseError::Misalignment::Steer } # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::Beta::BetaResponseError::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::Beta::BetaResponseError::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::Beta::BetaResponseError::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::Beta::BetaResponseError::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -148,7 +150,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end diff --git a/lib/openai/models/beta/beta_response_error_event.rb b/lib/openai/models/beta/beta_response_error_event.rb index 4246a4577..9ff20eb31 100644 --- a/lib/openai/models/beta/beta_response_error_event.rb +++ b/lib/openai/models/beta/beta_response_error_event.rb @@ -41,22 +41,25 @@ class BetaResponseErrorEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseErrorEvent::Agent }, nil?: true # @!method initialize(code:, message:, param:, sequence_number:, agent: nil, type: :error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseErrorEvent} for more details. - # # Emitted when an error occurs. # - # @param code [String, nil] The error code. + # @param code [String, nil] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param param [String, nil] The error parameter. + # @param param [String, nil] + # The error parameter. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseErrorEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseErrorEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :error] The type of the event. Always `error`. + # @param type [Symbol, :error] + # The type of the event. Always `error`. # @see OpenAI::Models::Beta::BetaResponseErrorEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -69,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_failed_event.rb b/lib/openai/models/beta/beta_response_failed_event.rb index 5d476d4a0..240a27d3d 100644 --- a/lib/openai/models/beta/beta_response_failed_event.rb +++ b/lib/openai/models/beta/beta_response_failed_event.rb @@ -29,18 +29,19 @@ class BetaResponseFailedEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseFailedEvent::Agent }, nil?: true # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFailedEvent} for more details. - # # An event that is emitted when a response fails. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that failed. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.failed"] The type of the event. Always `response.failed`. + # @param type [Symbol, :"response.failed"] + # The type of the event. Always `response.failed`. # @see OpenAI::Models::Beta::BetaResponseFailedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb b/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb index e48a95844..ff4aeb746 100644 --- a/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb +++ b/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb @@ -35,21 +35,22 @@ class BetaResponseFileSearchCallCompletedEvent < OpenAI::Internal::Type::BaseMod optional :agent, -> { OpenAI::Beta::BetaResponseFileSearchCallCompletedEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.file_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent} for more - # details. - # # Emitted when a file search call is completed (results found). # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.file_search_call.completed"] The type of the event. Always `response.file_search_call.completed`. + # @param type [Symbol, :"response.file_search_call.completed"] + # The type of the event. Always `response.file_search_call.completed`. # @see OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb b/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb index 9ddc062a4..e7cdbd438 100644 --- a/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb @@ -35,21 +35,22 @@ class BetaResponseFileSearchCallInProgressEvent < OpenAI::Internal::Type::BaseMo optional :agent, -> { OpenAI::Beta::BetaResponseFileSearchCallInProgressEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.file_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent} for more - # details. - # # Emitted when a file search call is initiated. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.file_search_call.in_progress"] The type of the event. Always `response.file_search_call.in_progress`. + # @param type [Symbol, :"response.file_search_call.in_progress"] + # The type of the event. Always `response.file_search_call.in_progress`. # @see OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb b/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb index e9fed8ffa..79b90fd7d 100644 --- a/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb +++ b/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb @@ -35,21 +35,22 @@ class BetaResponseFileSearchCallSearchingEvent < OpenAI::Internal::Type::BaseMod optional :agent, -> { OpenAI::Beta::BetaResponseFileSearchCallSearchingEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.file_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent} for more - # details. - # # Emitted when a file search is currently searching. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is searching. + # @param output_index [Integer] + # The index of the output item that the file search call is searching. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.file_search_call.searching"] The type of the event. Always `response.file_search_call.searching`. + # @param type [Symbol, :"response.file_search_call.searching"] + # The type of the event. Always `response.file_search_call.searching`. # @see OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_file_search_tool_call.rb b/lib/openai/models/beta/beta_response_file_search_tool_call.rb index 64b8ccd70..8be2c0391 100644 --- a/lib/openai/models/beta/beta_response_file_search_tool_call.rb +++ b/lib/openai/models/beta/beta_response_file_search_tool_call.rb @@ -46,24 +46,28 @@ class BetaResponseFileSearchToolCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, queries:, status:, agent: nil, results: nil, type: :file_search_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFileSearchToolCall} for more details. - # # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) # for more information. # - # @param id [String] The unique ID of the file search tool call. + # @param id [String] + # The unique ID of the file search tool call. # - # @param queries [Array] The queries used to search for files. + # @param queries [Array] + # The queries used to search for files. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Status] The status of the file search tool call. One of `in_progress`, + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Status] + # The status of the file search tool call. One of `in_progress`, `searching`, + # `incomplete` or `failed`, # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Agent, nil] + # The agent that produced this item. # - # @param results [Array, nil] The results of the file search tool call. + # @param results [Array, nil] + # The results of the file search tool call. # - # @param type [Symbol, :file_search_call] The type of the file search tool call. Always `file_search_call`. + # @param type [Symbol, :file_search_call] + # The type of the file search tool call. Always `file_search_call`. # The status of the file search tool call. One of `in_progress`, `searching`, # `incomplete` or `failed`, @@ -93,7 +97,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end class Result < OpenAI::Internal::Type::BaseModel @@ -138,19 +143,24 @@ class Result < OpenAI::Internal::Type::BaseModel optional :text, String # @!method initialize(attributes: nil, file_id: nil, filename: nil, score: nil, text: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result} for more details. - # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param file_id [String] The unique ID of the file. + # @param file_id [String] + # The unique ID of the file. # - # @param filename [String] The name of the file. + # @param filename [String] + # The name of the file. # - # @param score [Float] The relevance score of the file - a value between 0 and 1. + # @param score [Float] + # The relevance score of the file - a value between 0 and 1. # - # @param text [String] The text that was retrieved from the file. - + # @param text [String] + # The text that was retrieved from the file. module Attribute extend OpenAI::Internal::Type::Union diff --git a/lib/openai/models/beta/beta_response_format_text_config.rb b/lib/openai/models/beta/beta_response_format_text_config.rb index bd16301df..f4d870d32 100644 --- a/lib/openai/models/beta/beta_response_format_text_config.rb +++ b/lib/openai/models/beta/beta_response_format_text_config.rb @@ -7,7 +7,7 @@ module Beta # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -25,7 +25,7 @@ module BetaResponseFormatTextConfig variant :text, -> { OpenAI::Beta::BetaResponseFormatTextConfig::Text } # JSON Schema response format. Used to generate structured JSON responses. - # Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). variant :json_schema, -> { OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig } # JSON object response format. An older method of generating JSON responses. @@ -44,7 +44,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :text) # Default response format. Used to generate text responses. # - # @param type [Symbol, :text] The type of response format being defined. Always `text`. + # @param type [Symbol, :text] + # The type of response format being defined. Always `text`. end class JSONObject < OpenAI::Internal::Type::BaseModel @@ -59,7 +60,8 @@ class JSONObject < OpenAI::Internal::Type::BaseModel # `json_schema` is recommended for models that support it. Note that the model # will not generate JSON without a system or user message instructing it to do so. # - # @param type [Symbol, :json_object] The type of response format being defined. Always `json_object`. + # @param type [Symbol, :json_object] + # The type of response format being defined. Always `json_object`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb b/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb index 290d760f4..11b1785df 100644 --- a/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb +++ b/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb @@ -36,28 +36,37 @@ class BetaResponseFormatTextJSONSchemaConfig < OpenAI::Internal::Type::BaseModel # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # @return [Boolean, nil] optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, schema:, description: nil, strict: nil, type: :json_schema) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig} for more details. - # # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param name [String] The name of the response format. Must be a-z, A-Z, 0-9, or contain + # @param name [String] + # The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + # and dashes, with a maximum length of 64. # - # @param schema [Hash{Symbol=>Object}] The schema for the response format, described as a JSON Schema object. + # @param schema [Hash{Symbol=>Object}] + # The schema for the response format, described as a JSON Schema object. Learn how + # to build JSON schemas [here](https://json-schema.org/). # - # @param description [String] A description of what the response format is for, used by the model to + # @param description [String] + # A description of what the response format is for, used by the model to determine + # how to respond in the format. # - # @param strict [Boolean, nil] Whether to enable strict schema adherence when generating the output. + # @param strict [Boolean, nil] + # Whether to enable strict schema adherence when generating the output. If set to + # true, the model will always follow the exact schema defined in the `schema` + # field. Only a subset of JSON Schema is supported when `strict` is `true`. To + # learn more, read the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param type [Symbol, :json_schema] The type of response format being defined. Always `json_schema`. + # @param type [Symbol, :json_schema] + # The type of response format being defined. Always `json_schema`. end end diff --git a/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb b/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb index d58f05039..274a509e0 100644 --- a/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb +++ b/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb @@ -41,23 +41,25 @@ class BetaResponseFunctionCallArgumentsDeltaEvent < OpenAI::Internal::Type::Base optional :agent, -> { OpenAI::Beta::BetaResponseFunctionCallArgumentsDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.function_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent} for more - # details. - # # Emitted when there is a partial function-call arguments delta. # - # @param delta [String] The function-call arguments delta that is added. + # @param delta [String] + # The function-call arguments delta that is added. # - # @param item_id [String] The ID of the output item that the function-call arguments delta is added to. + # @param item_id [String] + # The ID of the output item that the function-call arguments delta is added to. # - # @param output_index [Integer] The index of the output item that the function-call arguments delta is added to. + # @param output_index [Integer] + # The index of the output item that the function-call arguments delta is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.function_call_arguments.delta"] The type of the event. Always `response.function_call_arguments.delta`. + # @param type [Symbol, :"response.function_call_arguments.delta"] + # The type of the event. Always `response.function_call_arguments.delta`. # @see OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -70,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb b/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb index 590cd6230..459b4d24f 100644 --- a/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb +++ b/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb @@ -42,15 +42,20 @@ class BetaResponseFunctionCallArgumentsDoneEvent < OpenAI::Internal::Type::BaseM # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.function_call_arguments.done") # Emitted when function-call arguments are finalized. # - # @param arguments [String] The function-call arguments. + # @param arguments [String] + # The function-call arguments. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item. + # @param output_index [Integer] + # The index of the output item. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # # @param type [Symbol, :"response.function_call_arguments.done"] @@ -65,7 +70,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_function_call_output_item.rb b/lib/openai/models/beta/beta_response_function_call_output_item.rb index bd8177a58..81580c774 100644 --- a/lib/openai/models/beta/beta_response_function_call_output_item.rb +++ b/lib/openai/models/beta/beta_response_function_call_output_item.rb @@ -12,7 +12,7 @@ module BetaResponseFunctionCallOutputItem # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputTextContent } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) variant :input_image, -> { OpenAI::Beta::BetaResponseInputImageContent } # A file input to the model. diff --git a/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb b/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb index 58bc8cc2c..60efe2d5f 100644 --- a/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb +++ b/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb @@ -25,11 +25,14 @@ class BetaResponseFunctionShellCallOutputContent < OpenAI::Internal::Type::BaseM # @!method initialize(outcome:, stderr:, stdout:) # Captured stdout and stderr for a portion of a shell tool call output. # - # @param outcome [OpenAI::Models::Beta::BetaResponseFunctionShellCallOutputContent::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseFunctionShellCallOutputContent::Outcome::Exit] The exit or timeout outcome associated with this shell call. + # @param outcome [OpenAI::Models::Beta::BetaResponseFunctionShellCallOutputContent::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseFunctionShellCallOutputContent::Outcome::Exit] + # The exit or timeout outcome associated with this shell call. # - # @param stderr [String] Captured stderr output for the shell call. + # @param stderr [String] + # Captured stderr output for the shell call. # - # @param stdout [String] Captured stdout output for the shell call. + # @param stdout [String] + # Captured stdout output for the shell call. # The exit or timeout outcome associated with this shell call. # @@ -55,7 +58,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -74,9 +78,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] The exit code returned by the shell process. + # @param exit_code [Integer] + # The exit code returned by the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_function_shell_tool_call.rb b/lib/openai/models/beta/beta_response_function_shell_tool_call.rb index 04a245f14..7259ac3d0 100644 --- a/lib/openai/models/beta/beta_response_function_shell_tool_call.rb +++ b/lib/openai/models/beta/beta_response_function_shell_tool_call.rb @@ -70,28 +70,36 @@ class BetaResponseFunctionShellToolCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, action:, call_id:, environment:, status:, agent: nil, caller_: nil, created_by: nil, type: :shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionShellToolCall} for more details. - # # A tool call that executes one or more shell commands in a managed environment. # - # @param id [String] The unique ID of the shell tool call. Populated when this item is returned via A + # @param id [String] + # The unique ID of the shell tool call. Populated when this item is returned via + # API. # - # @param action [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Action] The shell commands and limits that describe how to run the tool call. + # @param action [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Action] + # The shell commands and limits that describe how to run the tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param environment [OpenAI::Models::Beta::BetaResponseLocalEnvironment, OpenAI::Models::Beta::BetaResponseContainerReference, nil] Represents the use of a local environment to perform shell actions. + # @param environment [OpenAI::Models::Beta::BetaResponseLocalEnvironment, OpenAI::Models::Beta::BetaResponseContainerReference, nil] + # Represents the use of a local environment to perform shell actions. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Status] The status of the shell call. One of `in_progress`, `completed`, or `incomplete` + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Status] + # The status of the shell call. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Agent] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call. + # @param created_by [String] + # The ID of the entity that created this tool call. # - # @param type [Symbol, :shell_call] The type of the item. Always `shell_call`. + # @param type [Symbol, :shell_call] + # The type of the item. Always `shell_call`. # @see OpenAI::Models::Beta::BetaResponseFunctionShellToolCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -117,9 +125,11 @@ class Action < OpenAI::Internal::Type::BaseModel # # @param commands [Array] # - # @param max_output_length [Integer, nil] Optional maximum number of characters to return from each command. + # @param max_output_length [Integer, nil] + # Optional maximum number of characters to return from each command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the commands. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the commands. end # Represents the use of a local environment to perform shell actions. @@ -166,7 +176,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -204,7 +215,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb b/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb index ecbbed324..b34c9fa29 100644 --- a/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb +++ b/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb @@ -70,30 +70,37 @@ class BetaResponseFunctionShellToolCallOutput < OpenAI::Internal::Type::BaseMode optional :created_by, String # @!method initialize(id:, call_id:, max_output_length:, output:, status:, agent: nil, caller_: nil, created_by: nil, type: :shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput} for more - # details. - # # The output of a shell tool call that was emitted. # - # @param id [String] The unique ID of the shell call output. Populated when this item is returned via + # @param id [String] + # The unique ID of the shell call output. Populated when this item is returned via + # API. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param max_output_length [Integer, nil] The maximum length of the shell command output. This is generated by the model a + # @param max_output_length [Integer, nil] + # The maximum length of the shell command output. This is generated by the model + # and should be passed back with the raw output. # - # @param output [Array] An array of shell call output contents + # @param output [Array] + # An array of shell call output contents # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Status] The status of the shell call output. One of `in_progress`, `completed`, or `inco + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Status] + # The status of the shell call output. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Agent] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :shell_call_output] The type of the shell call output. Always `shell_call_output`. - + # @param type [Symbol, :shell_call_output] + # The type of the shell call output. Always `shell_call_output`. class Output < OpenAI::Internal::Type::BaseModel # @!attribute outcome # Represents either an exit outcome (with an exit code) or a timeout outcome for a @@ -121,19 +128,20 @@ class Output < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(outcome:, stderr:, stdout:, created_by: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Output} for more - # details. - # # The content of a shell tool call output that was emitted. # - # @param outcome [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Output::Outcome::Exit] Represents either an exit outcome (with an exit code) or a timeout outcome for a + # @param outcome [OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput::Output::Outcome::Exit] + # Represents either an exit outcome (with an exit code) or a timeout outcome for a + # shell call output chunk. # - # @param stderr [String] The standard error output that was captured. + # @param stderr [String] + # The standard error output that was captured. # - # @param stdout [String] The standard output that was captured. + # @param stdout [String] + # The standard output that was captured. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # Represents either an exit outcome (with an exit code) or a timeout outcome for a # shell call output chunk. @@ -160,7 +168,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -179,9 +188,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] Exit code from the shell process. + # @param exit_code [Integer] + # Exit code from the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants @@ -215,7 +226,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -253,7 +265,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_function_tool_call.rb b/lib/openai/models/beta/beta_response_function_tool_call.rb index aae42f3c4..a33472fa4 100644 --- a/lib/openai/models/beta/beta_response_function_tool_call.rb +++ b/lib/openai/models/beta/beta_response_function_tool_call.rb @@ -71,32 +71,40 @@ class BetaResponseFunctionToolCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseFunctionToolCall::Status } # @!method initialize(arguments:, call_id:, name:, id: nil, agent: nil, async: nil, caller_: nil, namespace: nil, status: nil, type: :function_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionToolCall} for more details. - # # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. # - # @param arguments [String] A JSON string of the arguments to pass to the function. + # @param arguments [String] + # A JSON string of the arguments to pass to the function. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param name [String] The name of the function to run. + # @param name [String] + # The name of the function to run. # - # @param id [String] The unique ID of the function tool call. + # @param id [String] + # The unique ID of the function tool call. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Agent, nil] + # The agent that produced this item. # - # @param async [Boolean] Whether the function tool call runs asynchronously. + # @param async [Boolean] + # Whether the function tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the function to run. + # @param namespace [String] + # The namespace of the function to run. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call] The type of the function tool call. Always `function_call`. + # @param type [Symbol, :function_call] + # The type of the function tool call. Always `function_call`. # @see OpenAI::Models::Beta::BetaResponseFunctionToolCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -109,7 +117,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -147,7 +156,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/beta/beta_response_function_tool_call_item.rb b/lib/openai/models/beta/beta_response_function_tool_call_item.rb index 793b6e651..e2d5ea6b8 100644 --- a/lib/openai/models/beta/beta_response_function_tool_call_item.rb +++ b/lib/openai/models/beta/beta_response_function_tool_call_item.rb @@ -24,34 +24,43 @@ class BetaResponseFunctionToolCallItem < OpenAI::Models::Beta::BetaResponseFunct optional :created_by, String # @!method initialize(arguments:, call_id:, name:, id:, status:, agent: nil, async: nil, caller_: nil, namespace: nil, created_by: nil, type: :function_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionToolCallItem} for more details. - # # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. # - # @param arguments [String] A JSON string of the arguments to pass to the function. + # @param arguments [String] + # A JSON string of the arguments to pass to the function. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param name [String] The name of the function to run. + # @param name [String] + # The name of the function to run. # - # @param id [String] The unique ID of the function tool call. + # @param id [String] + # The unique ID of the function tool call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCallItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCallItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Agent, nil] + # The agent that produced this item. # - # @param async [Boolean] Whether the function tool call runs asynchronously. + # @param async [Boolean] + # Whether the function tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the function to run. + # @param namespace [String] + # The namespace of the function to run. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :function_call] The type of the function tool call. Always `function_call`. + # @param type [Symbol, :function_call] + # The type of the function tool call. Always `function_call`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb b/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb index b57172e27..c0c7d8a9f 100644 --- a/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb +++ b/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb @@ -72,28 +72,37 @@ class BetaResponseFunctionToolCallOutputItem < OpenAI::Internal::Type::BaseModel optional :namespace, String # @!method initialize(id:, output:, status:, agent: nil, call_id: nil, caller_: nil, created_by: nil, name: nil, namespace: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem} for more details. + # @param id [String] + # The unique ID of the function call tool output. # - # @param id [String] The unique ID of the function call tool output. + # @param output [String, Array] + # The output from the function call generated by your code. Can be a string or an + # list of output content. # - # @param output [String, Array] The output from the function call generated by your code. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Agent, nil] + # The agent that produced this item. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Agent, nil] The agent that produced this item. + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Caller::Direct, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::Caller::Program, nil] The execution context that produced this tool call. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param created_by [String] The identifier of the actor that created the item. + # @param name [String] + # The name of the tool that produced the output. # - # @param name [String] The name of the tool that produced the output. + # @param namespace [String] + # The namespace of the tool that produced the output. # - # @param namespace [String] The namespace of the tool that produced the output. - # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # The output from the function call generated by your code. Can be a string or an # list of output content. @@ -117,7 +126,7 @@ module OutputContentList # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Beta::BetaResponseInputImage } # A file input to the model. @@ -164,7 +173,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -187,7 +197,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -204,9 +215,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_function_web_search.rb b/lib/openai/models/beta/beta_response_function_web_search.rb index 491dc4ef5..4e391902d 100644 --- a/lib/openai/models/beta/beta_response_function_web_search.rb +++ b/lib/openai/models/beta/beta_response_function_web_search.rb @@ -36,22 +36,25 @@ class BetaResponseFunctionWebSearch < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseFunctionWebSearch::Agent }, nil?: true # @!method initialize(id:, action:, status:, agent: nil, type: :web_search_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionWebSearch} for more details. - # # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for - # more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) + # for more information. # - # @param id [String] The unique ID of the web search tool call. + # @param id [String] + # The unique ID of the web search tool call. # - # @param action [OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::Search, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::FindInPage] An object describing the specific action taken in this web search call. + # @param action [OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::Search, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::FindInPage] + # An object describing the specific action taken in this web search call. Includes + # details on how the model used the web (search, open_page, find_in_page). # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Status] The status of the web search tool call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Status] + # The status of the web search tool call. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :web_search_call] The type of the web search tool call. Always `web_search_call`. + # @param type [Symbol, :web_search_call] + # The type of the web search tool call. Always `web_search_call`. # An object describing the specific action taken in this web search call. Includes # details on how the model used the web (search, open_page, find_in_page). @@ -104,20 +107,19 @@ class Search < OpenAI::Internal::Type::BaseModel ) # @!method initialize(queries: nil, query: nil, sources: nil, type: :search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::Search} for more - # details. - # # Action type "search" - Performs a web search query. # - # @param queries [Array] The search queries. + # @param queries [Array] + # The search queries. # - # @param query [String] The search query. + # @param query [String] + # The search query. # - # @param sources [Array] The sources used in the search. + # @param sources [Array] + # The sources used in the search. # - # @param type [Symbol, :search] The action type. - + # @param type [Symbol, :search] + # The action type. class Source < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of source. Always `url`. @@ -132,15 +134,13 @@ class Source < OpenAI::Internal::Type::BaseModel required :url, String # @!method initialize(url:, type: :url) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::Search::Source} - # for more details. - # # A source used in the search. # - # @param url [String] The URL of the source. + # @param url [String] + # The URL of the source. # - # @param type [Symbol, :url] The type of source. Always `url`. + # @param type [Symbol, :url] + # The type of source. Always `url`. end end @@ -158,15 +158,13 @@ class OpenPage < OpenAI::Internal::Type::BaseModel optional :url, String, nil?: true # @!method initialize(url: nil, type: :open_page) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::OpenPage} for more - # details. - # # Action type "open_page" - Opens a specific URL from search results. # - # @param url [String, nil] The URL opened by the model. + # @param url [String, nil] + # The URL opened by the model. # - # @param type [Symbol, :open_page] The action type. + # @param type [Symbol, :open_page] + # The action type. end class FindInPage < OpenAI::Internal::Type::BaseModel @@ -189,17 +187,16 @@ class FindInPage < OpenAI::Internal::Type::BaseModel required :url, String # @!method initialize(pattern:, url:, type: :find_in_page) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::FindInPage} for - # more details. - # # Action type "find_in_page": Searches for a pattern within a loaded page. # - # @param pattern [String] The pattern or text to search for within the page. + # @param pattern [String] + # The pattern or text to search for within the page. # - # @param url [String] The URL of the page searched for the pattern. + # @param url [String] + # The URL of the page searched for the pattern. # - # @param type [Symbol, :find_in_page] The action type. + # @param type [Symbol, :find_in_page] + # The action type. end # @!method self.variants @@ -233,7 +230,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb b/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb index d334e4766..6eaa76199 100644 --- a/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb +++ b/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb @@ -38,15 +38,20 @@ class BetaResponseImageGenCallCompletedEvent < OpenAI::Internal::Type::BaseModel # Emitted when an image generation tool call has completed and the final image is # available. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.image_generation_call.completed"] The type of the event. Always 'response.image_generation_call.completed'. + # @param type [Symbol, :"response.image_generation_call.completed"] + # The type of the event. Always 'response.image_generation_call.completed'. # @see OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -59,7 +64,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb b/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb index 28bc1eea5..d51f365b0 100644 --- a/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb +++ b/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb @@ -38,15 +38,20 @@ class BetaResponseImageGenCallGeneratingEvent < OpenAI::Internal::Type::BaseMode # Emitted when an image generation tool call is actively generating an image # (intermediate state). # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.image_generation_call.generating"] The type of the event. Always 'response.image_generation_call.generating'. + # @param type [Symbol, :"response.image_generation_call.generating"] + # The type of the event. Always 'response.image_generation_call.generating'. # @see OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -59,7 +64,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb b/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb index ac2ad15c2..88659dbc4 100644 --- a/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb @@ -37,15 +37,20 @@ class BetaResponseImageGenCallInProgressEvent < OpenAI::Internal::Type::BaseMode # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.image_generation_call.in_progress") # Emitted when an image generation tool call is in progress. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.image_generation_call.in_progress"] The type of the event. Always 'response.image_generation_call.in_progress'. + # @param type [Symbol, :"response.image_generation_call.in_progress"] + # The type of the event. Always 'response.image_generation_call.in_progress'. # @see OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb b/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb index ef6aaf047..6d62fea97 100644 --- a/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb +++ b/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb @@ -72,33 +72,41 @@ class BetaResponseImageGenCallPartialImageEvent < OpenAI::Internal::Type::BaseMo optional :size, String # @!method initialize(item_id:, output_index:, partial_image_b64:, partial_image_index:, sequence_number:, agent: nil, background: nil, output_format: nil, quality: nil, size: nil, type: :"response.image_generation_call.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent} for more - # details. - # # Emitted when a partial image is available during image generation streaming. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param partial_image_b64 [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param partial_image_b64 [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param partial_image_index [Integer] 0-based index for the partial image (backend is 1-based, but this is 0-based for + # @param partial_image_index [Integer] + # 0-based index for the partial image (backend is 1-based, but this is 0-based for + # the user). # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param background [String] The background setting that was used. + # @param background [String] + # The background setting that was used. # - # @param output_format [String] The output format that was used. + # @param output_format [String] + # The output format that was used. # - # @param quality [String] The image quality that was used. + # @param quality [String] + # The image quality that was used. # - # @param size [String] The image size that was used. + # @param size [String] + # The image size that was used. # - # @param type [Symbol, :"response.image_generation_call.partial_image"] The type of the event. Always 'response.image_generation_call.partial_image'. + # @param type [Symbol, :"response.image_generation_call.partial_image"] + # The type of the event. Always 'response.image_generation_call.partial_image'. # @see OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -111,7 +119,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_in_progress_event.rb b/lib/openai/models/beta/beta_response_in_progress_event.rb index fa94c321a..0d82c35a5 100644 --- a/lib/openai/models/beta/beta_response_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_in_progress_event.rb @@ -29,18 +29,19 @@ class BetaResponseInProgressEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInProgressEvent::Agent }, nil?: true # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInProgressEvent} for more details. - # # Emitted when the response is in progress. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that is in progress. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that is in progress. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.in_progress"] The type of the event. Always `response.in_progress`. + # @param type [Symbol, :"response.in_progress"] + # The type of the event. Always `response.in_progress`. # @see OpenAI::Models::Beta::BetaResponseInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_incomplete_event.rb b/lib/openai/models/beta/beta_response_incomplete_event.rb index 7767308e2..50d7300a6 100644 --- a/lib/openai/models/beta/beta_response_incomplete_event.rb +++ b/lib/openai/models/beta/beta_response_incomplete_event.rb @@ -29,22 +29,23 @@ class BetaResponseIncompleteEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseIncompleteEvent::Agent }, nil?: true # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseIncompleteEvent} for more details. - # # An event that is emitted when a response finishes as incomplete. # # Over WebSocket, steering can finish a response with # `response.incomplete_details.reason` set to `steered`, followed automatically by # a successor `response.created` that commits the queued steering input. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that was incomplete. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that was incomplete. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseIncompleteEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseIncompleteEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.incomplete"] The type of the event. Always `response.incomplete`. + # @param type [Symbol, :"response.incomplete"] + # The type of the event. Always `response.incomplete`. # @see OpenAI::Models::Beta::BetaResponseIncompleteEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -57,7 +58,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_inject_created_event.rb b/lib/openai/models/beta/beta_response_inject_created_event.rb index 293e1bcea..bbcab0b70 100644 --- a/lib/openai/models/beta/beta_response_inject_created_event.rb +++ b/lib/openai/models/beta/beta_response_inject_created_event.rb @@ -30,19 +30,21 @@ class BetaResponseInjectCreatedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(response_id:, sequence_number:, stream_id: nil, type: :"response.inject.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInjectCreatedEvent} for more details. - # # Emitted when all injected input items were validated and committed to the active # response. # - # @param response_id [String] The ID of the response that accepted the input. + # @param response_id [String] + # The ID of the response that accepted the input. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The multiplexed WebSocket stream that emitted the event. This field is + # @param stream_id [String] + # The multiplexed WebSocket stream that emitted the event. This field is present + # only when WebSocket multiplexing is enabled separately. # - # @param type [Symbol, :"response.inject.created"] The event discriminator. Always `response.inject.created`. + # @param type [Symbol, :"response.inject.created"] + # The event discriminator. Always `response.inject.created`. end end diff --git a/lib/openai/models/beta/beta_response_inject_event.rb b/lib/openai/models/beta/beta_response_inject_event.rb index 25d0180c9..f75814409 100644 --- a/lib/openai/models/beta/beta_response_inject_event.rb +++ b/lib/openai/models/beta/beta_response_inject_event.rb @@ -27,11 +27,14 @@ class BetaResponseInjectEvent < OpenAI::Internal::Type::BaseModel # items are validated and committed atomically. Currently, the server accepts # client-owned tool outputs that resume a waiting agent. # - # @param input [Array] Input items to inject into the active response. + # @param input [Array] + # Input items to inject into the active response. # - # @param response_id [String] The ID of the active response that should receive the input. + # @param response_id [String] + # The ID of the active response that should receive the input. # - # @param type [Symbol, :"response.inject"] The event discriminator. Always `response.inject`. + # @param type [Symbol, :"response.inject"] + # The event discriminator. Always `response.inject`. end end diff --git a/lib/openai/models/beta/beta_response_inject_failed_event.rb b/lib/openai/models/beta/beta_response_inject_failed_event.rb index 4391250ea..c57701a64 100644 --- a/lib/openai/models/beta/beta_response_inject_failed_event.rb +++ b/lib/openai/models/beta/beta_response_inject_failed_event.rb @@ -42,24 +42,28 @@ class BetaResponseInjectFailedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(error:, input:, response_id:, sequence_number:, stream_id: nil, type: :"response.inject.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInjectFailedEvent} for more details. - # # Emitted when injected input could not be committed to a response. The event # returns the uncommitted raw input so the client can retry it in another response # when appropriate. # - # @param error [OpenAI::Models::Beta::BetaResponseInjectFailedEvent::Error] Information about why the input was not committed. + # @param error [OpenAI::Models::Beta::BetaResponseInjectFailedEvent::Error] + # Information about why the input was not committed. # - # @param input [Array] The raw input items that were not committed. + # @param input [Array] + # The raw input items that were not committed. # - # @param response_id [String] The ID of the response that rejected the input. + # @param response_id [String] + # The ID of the response that rejected the input. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The multiplexed WebSocket stream that emitted the event. This field is + # @param stream_id [String] + # The multiplexed WebSocket stream that emitted the event. This field is present + # only when WebSocket multiplexing is enabled separately. # - # @param type [Symbol, :"response.inject.failed"] The event discriminator. Always `response.inject.failed`. + # @param type [Symbol, :"response.inject.failed"] + # The event discriminator. Always `response.inject.failed`. # @see OpenAI::Models::Beta::BetaResponseInjectFailedEvent#error class Error < OpenAI::Internal::Type::BaseModel @@ -78,9 +82,11 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:) # Information about why the input was not committed. # - # @param code [Symbol, OpenAI::Models::Beta::BetaResponseInjectFailedEvent::Error::Code] A machine-readable error code. + # @param code [Symbol, OpenAI::Models::Beta::BetaResponseInjectFailedEvent::Error::Code] + # A machine-readable error code. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # A machine-readable error code. # diff --git a/lib/openai/models/beta/beta_response_input_audio.rb b/lib/openai/models/beta/beta_response_input_audio.rb index a4460d24e..3bc4fe2fb 100644 --- a/lib/openai/models/beta/beta_response_input_audio.rb +++ b/lib/openai/models/beta/beta_response_input_audio.rb @@ -16,14 +16,12 @@ class BetaResponseInputAudio < OpenAI::Internal::Type::BaseModel required :type, const: :input_audio # @!method initialize(input_audio:, type: :input_audio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputAudio} for more details. - # # An audio input to the model. # # @param input_audio [OpenAI::Models::Beta::BetaResponseInputAudio::InputAudio] # - # @param type [Symbol, :input_audio] The type of the input item. Always `input_audio`. + # @param type [Symbol, :input_audio] + # The type of the input item. Always `input_audio`. # @see OpenAI::Models::Beta::BetaResponseInputAudio#input_audio class InputAudio < OpenAI::Internal::Type::BaseModel @@ -44,12 +42,11 @@ class InputAudio < OpenAI::Internal::Type::BaseModel ) # @!method initialize(data:, format_:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputAudio::InputAudio} for more details. - # - # @param data [String] Base64-encoded audio data. + # @param data [String] + # Base64-encoded audio data. # - # @param format_ [Symbol, OpenAI::Models::Beta::BetaResponseInputAudio::InputAudio::Format] The format of the audio data. Currently supported formats are `mp3` and + # @param format_ [Symbol, OpenAI::Models::Beta::BetaResponseInputAudio::InputAudio::Format] + # The format of the audio data. Currently supported formats are `mp3` and `wav`. # The format of the audio data. Currently supported formats are `mp3` and `wav`. # diff --git a/lib/openai/models/beta/beta_response_input_content.rb b/lib/openai/models/beta/beta_response_input_content.rb index 08bcb893e..9c9a2924d 100644 --- a/lib/openai/models/beta/beta_response_input_content.rb +++ b/lib/openai/models/beta/beta_response_input_content.rb @@ -12,7 +12,7 @@ module BetaResponseInputContent # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Beta::BetaResponseInputImage } # A file input to the model. diff --git a/lib/openai/models/beta/beta_response_input_file.rb b/lib/openai/models/beta/beta_response_input_file.rb index 07d0d8128..8fd0c39ba 100644 --- a/lib/openai/models/beta/beta_response_input_file.rb +++ b/lib/openai/models/beta/beta_response_input_file.rb @@ -53,24 +53,34 @@ class BetaResponseInputFile < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputFile::PromptCacheBreakpoint } # @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, prompt_cache_breakpoint: nil, type: :input_file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputFile} for more details. - # # A file input to the model. # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputFile::Detail] The detail level of the file to be sent to the model. Use `auto` to let the syst + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputFile::Detail] + # The detail level of the file to be sent to the model. Use `auto` to let the + # system select the detail level; for GPT-5.6 and later models, `auto` uses + # high-quality rendering, which may increase input token usage. Use `low` for + # lower-cost rendering, or `high` to render the file at higher quality. Defaults + # to `auto`. # - # @param file_data [String] The content of the file to be sent to the model. + # @param file_data [String] + # The content of the file to be sent to the model. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param file_url [String] The URL of the file to be sent to the model. + # @param file_url [String] + # The URL of the file to be sent to the model. # - # @param filename [String] The name of the file to be sent to the model. + # @param filename [String] + # The name of the file to be sent to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFile::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFile::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_file] The type of the input item. Always `input_file`. + # @param type [Symbol, :input_file] + # The type of the input item. Always `input_file`. # The detail level of the file to be sent to the model. Use `auto` to let the # system select the detail level; for GPT-5.6 and later models, `auto` uses @@ -103,7 +113,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_input_file_content.rb b/lib/openai/models/beta/beta_response_input_file_content.rb index 1d52c1467..011050300 100644 --- a/lib/openai/models/beta/beta_response_input_file_content.rb +++ b/lib/openai/models/beta/beta_response_input_file_content.rb @@ -57,24 +57,34 @@ class BetaResponseInputFileContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, prompt_cache_breakpoint: nil, type: :input_file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputFileContent} for more details. - # # A file input to the model. # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputFileContent::Detail] The detail level of the file to be sent to the model. Use `auto` to let the syst + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputFileContent::Detail] + # The detail level of the file to be sent to the model. Use `auto` to let the + # system select the detail level; for GPT-5.6 and later models, `auto` uses + # high-quality rendering, which may increase input token usage. Use `low` for + # lower-cost rendering, or `high` to render the file at higher quality. Defaults + # to `auto`. # - # @param file_data [String, nil] The base64-encoded data of the file to be sent to the model. + # @param file_data [String, nil] + # The base64-encoded data of the file to be sent to the model. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param file_url [String, nil] The URL of the file to be sent to the model. + # @param file_url [String, nil] + # The URL of the file to be sent to the model. # - # @param filename [String, nil] The name of the file to be sent to the model. + # @param filename [String, nil] + # The name of the file to be sent to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_file] The type of the input item. Always `input_file`. + # @param type [Symbol, :input_file] + # The type of the input item. Always `input_file`. # The detail level of the file to be sent to the model. Use `auto` to let the # system select the detail level; for GPT-5.6 and later models, `auto` uses @@ -107,7 +117,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_input_image.rb b/lib/openai/models/beta/beta_response_input_image.rb index a95073dfa..c24186505 100644 --- a/lib/openai/models/beta/beta_response_input_image.rb +++ b/lib/openai/models/beta/beta_response_input_image.rb @@ -39,21 +39,27 @@ class BetaResponseInputImage < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint } # @!method initialize(detail:, file_id: nil, image_url: nil, prompt_cache_breakpoint: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputImage} for more details. - # # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision). + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputImage::Detail] The detail level of the image to be sent to the model. One of `high`, `low`, `au + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputImage::Detail] + # The detail level of the image to be sent to the model. One of `high`, `low`, + # `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param image_url [String, nil] The URL of the image to be sent to the model. A fully qualified URL or base64 en + # @param image_url [String, nil] + # The URL of the image to be sent to the model. A fully qualified URL or base64 + # encoded image in a data URL. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_image] The type of the input item. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the input item. Always `input_image`. # The detail level of the image to be sent to the model. One of `high`, `low`, # `auto`, or `original`. Defaults to `auto`. @@ -84,7 +90,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_input_image_content.rb b/lib/openai/models/beta/beta_response_input_image_content.rb index 804703778..796783ef8 100644 --- a/lib/openai/models/beta/beta_response_input_image_content.rb +++ b/lib/openai/models/beta/beta_response_input_image_content.rb @@ -43,21 +43,27 @@ class BetaResponseInputImageContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail: nil, file_id: nil, image_url: nil, prompt_cache_breakpoint: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputImageContent} for more details. - # # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision) + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision) # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputImageContent::Detail, nil] The detail level of the image to be sent to the model. One of `high`, `low`, `au + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseInputImageContent::Detail, nil] + # The detail level of the image to be sent to the model. One of `high`, `low`, + # `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param image_url [String, nil] The URL of the image to be sent to the model. A fully qualified URL or base64 en + # @param image_url [String, nil] + # The URL of the image to be sent to the model. A fully qualified URL or base64 + # encoded image in a data URL. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_image] The type of the input item. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the input item. Always `input_image`. # The detail level of the image to be sent to the model. One of `high`, `low`, # `auto`, or `original`. Defaults to `auto`. @@ -88,7 +94,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_input_item.rb b/lib/openai/models/beta/beta_response_input_item.rb index bbe02bc4a..a6724c064 100644 --- a/lib/openai/models/beta/beta_response_input_item.rb +++ b/lib/openai/models/beta/beta_response_input_item.rb @@ -29,22 +29,22 @@ module BetaResponseInputItem variant :message, -> { OpenAI::Beta::BetaResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Beta::BetaResponseFileSearchToolCall } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Beta::BetaResponseComputerToolCall } # The output of a computer tool call. variant :computer_call_output, -> { OpenAI::Beta::BetaResponseInputItem::ComputerCallOutput } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Beta::BetaResponseFunctionWebSearch } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Beta::BetaResponseFunctionToolCall } # The output of a function tool call. @@ -71,10 +71,10 @@ module BetaResponseInputItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Beta::BetaResponseReasoningItem } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Beta::BetaResponseCompactionItemParam } # An image generation request made by the model. @@ -163,22 +163,26 @@ class Message < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Beta::BetaResponseInputItem::Message::Type } # @!method initialize(content:, role:, agent: nil, status: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::Message} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. # - # @param content [Array] A list of one or many input items to the model, containing different content + # @param content [Array] + # A list of one or many input items to the model, containing different content + # types. # - # @param role [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Role] The role of the message input. One of `user`, `system`, or `developer`. + # @param role [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Role] + # The role of the message input. One of `user`, `system`, or `developer`. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::Message::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::Message::Agent, nil] + # The agent that produced this item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Status] The status of item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Status] + # The status of item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Type] The type of the message input. Always set to `message`. + # @param type [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::Message::Type] + # The type of the message input. Always set to `message`. # The role of the message input. One of `user`, `system`, or `developer`. # @@ -205,7 +209,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of item. One of `in_progress`, `completed`, or `incomplete`. @@ -296,26 +301,30 @@ class ComputerCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, acknowledged_safety_checks: nil, agent: nil, status: nil, type: :computer_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput} for more - # details. - # # The output of a computer tool call. # - # @param call_id [String] The ID of the computer tool call that produced the output. + # @param call_id [String] + # The ID of the computer tool call that produced the output. # - # @param output [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputScreenshot] A computer screenshot image used with the computer use tool. + # @param output [OpenAI::Models::Beta::BetaResponseComputerToolCallOutputScreenshot] + # A computer screenshot image used with the computer use tool. # - # @param id [String, nil] The ID of the computer tool call output. + # @param id [String, nil] + # The ID of the computer tool call output. # - # @param acknowledged_safety_checks [Array, nil] The safety checks reported by the API that have been acknowledged by the develop + # @param acknowledged_safety_checks [Array, nil] + # The safety checks reported by the API that have been acknowledged by the + # developer. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput::Agent, nil] + # The agent that produced this item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput::Status, nil] The status of the message input. One of `in_progress`, `completed`, or `incomple + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput::Status, nil] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param type [Symbol, :computer_call_output] The type of the computer tool call output. Always `computer_call_output`. - + # @param type [Symbol, :computer_call_output] + # The type of the computer tool call output. Always `computer_call_output`. class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the pending safety check. @@ -338,11 +347,14 @@ class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end # @see OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput#agent @@ -356,7 +368,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the message input. One of `in_progress`, `completed`, or @@ -444,29 +457,36 @@ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(output:, id: nil, agent: nil, call_id: nil, caller_: nil, name: nil, namespace: nil, status: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput} for more - # details. - # # The output of a function tool call. # - # @param output [String, Array] Text, image, or file output of the function tool call. + # @param output [String, Array] + # Text, image, or file output of the function tool call. # - # @param id [String, nil] The unique ID of the function tool call output. Populated when this item is retu + # @param id [String, nil] + # The unique ID of the function tool call output. Populated when this item is + # returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Agent, nil] + # The agent that produced this item. # - # @param call_id [String, nil] The unique ID of the function tool call generated by the model. + # @param call_id [String, nil] + # The unique ID of the function tool call generated by the model. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param name [String, nil] The name of the tool that produced the output. + # @param name [String, nil] + # The name of the tool that produced the output. # - # @param namespace [String, nil] The namespace of the tool that produced the output. + # @param namespace [String, nil] + # The namespace of the tool that produced the output. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. Popu + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # Text, image, or file output of the function tool call. # @@ -495,7 +515,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -518,7 +539,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -535,9 +557,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -603,17 +627,23 @@ class AgentMessage < OpenAI::Internal::Type::BaseModel # @!method initialize(author:, content:, recipient:, id: nil, agent: nil, type: :agent_message) # A message routed between agents. # - # @param author [String] The sending agent identity. + # @param author [String] + # The sending agent identity. # - # @param content [Array] Plaintext, image, or encrypted content sent between agents. + # @param content [Array] + # Plaintext, image, or encrypted content sent between agents. # - # @param recipient [String] The destination agent identity. + # @param recipient [String] + # The destination agent identity. # - # @param id [String, nil] The unique ID of this agent message item. + # @param id [String, nil] + # The unique ID of this agent message item. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::AgentMessage::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::AgentMessage::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :agent_message] The item type. Always `agent_message`. + # @param type [Symbol, :agent_message] + # The item type. Always `agent_message`. # A plaintext, image, or encrypted agent message content part. module Content @@ -624,7 +654,7 @@ module Content # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputTextContent } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) variant :input_image, -> { OpenAI::Beta::BetaResponseInputImageContent } # Opaque encrypted content that Responses API decrypts inside trusted model execution. @@ -650,9 +680,11 @@ class EncryptedContent < OpenAI::Internal::Type::BaseModel # Opaque encrypted content that Responses API decrypts inside trusted model # execution. # - # @param encrypted_content [String] Opaque encrypted content. + # @param encrypted_content [String] + # Opaque encrypted content. # - # @param type [Symbol, :encrypted_content] The type of the input item. Always `encrypted_content`. + # @param type [Symbol, :encrypted_content] + # The type of the input item. Always `encrypted_content`. end # @!method self.variants @@ -670,7 +702,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -712,17 +745,23 @@ class MultiAgentCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::MultiAgentCall::Agent }, nil?: true # @!method initialize(action:, arguments:, call_id:, id: nil, agent: nil, type: :multi_agent_call) - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall::Action] The multi-agent action that was executed. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall::Action] + # The multi-agent action that was executed. # - # @param arguments [String] The action arguments as a JSON string. + # @param arguments [String] + # The action arguments as a JSON string. # - # @param call_id [String] The unique ID linking this call to its output. + # @param call_id [String] + # The unique ID linking this call to its output. # - # @param id [String, nil] The unique ID of this multi-agent call. + # @param id [String, nil] + # The unique ID of this multi-agent call. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call] The item type. Always `multi_agent_call`. + # @param type [Symbol, :multi_agent_call] + # The item type. Always `multi_agent_call`. # The multi-agent action that was executed. # @@ -752,7 +791,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -797,17 +837,23 @@ class MultiAgentCallOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::MultiAgentCallOutput::Agent }, nil?: true # @!method initialize(action:, call_id:, output:, id: nil, agent: nil, type: :multi_agent_call_output) - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput::Action] The multi-agent action that produced this result. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput::Action] + # The multi-agent action that produced this result. # - # @param call_id [String] The unique ID of the multi-agent call. + # @param call_id [String] + # The unique ID of the multi-agent call. # - # @param output [Array] Text output returned by the multi-agent action. + # @param output [Array] + # Text output returned by the multi-agent action. # - # @param id [String, nil] The unique ID of this multi-agent call output. + # @param id [String, nil] + # The unique ID of this multi-agent call output. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call_output] The item type. Always `multi_agent_call_output`. + # @param type [Symbol, :multi_agent_call_output] + # The item type. Always `multi_agent_call_output`. # The multi-agent action that produced this result. # @@ -853,12 +899,14 @@ class Output < OpenAI::Internal::Type::BaseModel ) # @!method initialize(text:, annotations: nil, type: :output_text) - # @param text [String] The text content. + # @param text [String] + # The text content. # - # @param annotations [Array] Citations associated with the text content. + # @param annotations [Array] + # Citations associated with the text content. # - # @param type [Symbol, :output_text] The content type. Always `output_text`. - + # @param type [Symbol, :output_text] + # The content type. Always `output_text`. module Annotation extend OpenAI::Internal::Type::Union @@ -907,13 +955,17 @@ class FileCitation < OpenAI::Internal::Type::BaseModel required :type, const: :file_citation # @!method initialize(file_id:, filename:, index:, type: :file_citation) - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the file cited. + # @param filename [String] + # The filename of the file cited. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_citation] The citation type. Always `file_citation`. + # @param type [Symbol, :file_citation] + # The citation type. Always `file_citation`. end class URLCitation < OpenAI::Internal::Type::BaseModel @@ -948,15 +1000,20 @@ class URLCitation < OpenAI::Internal::Type::BaseModel required :url, String # @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation) - # @param end_index [Integer] The index of the last character of the citation in the message. + # @param end_index [Integer] + # The index of the last character of the citation in the message. # - # @param start_index [Integer] The index of the first character of the citation in the message. + # @param start_index [Integer] + # The index of the first character of the citation in the message. # - # @param title [String] The title of the cited resource. + # @param title [String] + # The title of the cited resource. # - # @param url [String] The URL of the cited resource. + # @param url [String] + # The URL of the cited resource. # - # @param type [Symbol, :url_citation] The citation type. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The citation type. Always `url_citation`. end class ContainerFileCitation < OpenAI::Internal::Type::BaseModel @@ -997,17 +1054,23 @@ class ContainerFileCitation < OpenAI::Internal::Type::BaseModel required :type, const: :container_file_citation # @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation) - # @param container_id [String] The ID of the container. + # @param container_id [String] + # The ID of the container. # - # @param end_index [Integer] The index of the last character of the citation in the message. + # @param end_index [Integer] + # The index of the last character of the citation in the message. # - # @param file_id [String] The ID of the container file. + # @param file_id [String] + # The ID of the container file. # - # @param filename [String] The filename of the container file cited. + # @param filename [String] + # The filename of the container file cited. # - # @param start_index [Integer] The index of the first character of the citation in the message. + # @param start_index [Integer] + # The index of the first character of the citation in the message. # - # @param type [Symbol, :container_file_citation] The citation type. Always `container_file_citation`. + # @param type [Symbol, :container_file_citation] + # The citation type. Always `container_file_citation`. end # @!method self.variants @@ -1026,7 +1089,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1080,19 +1144,26 @@ class ToolSearchCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(arguments:, id: nil, agent: nil, call_id: nil, execution: nil, status: nil, type: :tool_search_call) - # @param arguments [Object] The arguments supplied to the tool search call. + # @param arguments [Object] + # The arguments supplied to the tool search call. # - # @param id [String, nil] The unique ID of this tool search call. + # @param id [String, nil] + # The unique ID of this tool search call. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Agent, nil] + # The agent that produced this item. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Status, nil] The status of the tool search call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall::Status, nil] + # The status of the tool search call. # - # @param type [Symbol, :tool_search_call] The item type. Always `tool_search_call`. + # @param type [Symbol, :tool_search_call] + # The item type. Always `tool_search_call`. # @see OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1105,7 +1176,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # Whether tool search was executed by the server or by the client. @@ -1168,15 +1240,20 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::AdditionalTools::Agent }, nil?: true # @!method initialize(tools:, id: nil, agent: nil, role: :developer, type: :additional_tools) - # @param tools [Array] A list of additional tools made available at this item. + # @param tools [Array] + # A list of additional tools made available at this item. # - # @param id [String, nil] The unique ID of this additional tools item. + # @param id [String, nil] + # The unique ID of this additional tools item. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools::Agent, nil] + # The agent that produced this item. # - # @param role [Symbol, :developer] The role that provided the additional tools. Only `developer` is supported. + # @param role [Symbol, :developer] + # The role that provided the additional tools. Only `developer` is supported. # - # @param type [Symbol, :additional_tools] The item type. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The item type. Always `additional_tools`. # @see OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1189,7 +1266,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1248,25 +1326,29 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, result:, status:, agent: nil, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall} for more - # details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Agent, nil] + # The agent that produced this item. # - # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -1294,7 +1376,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The quality of the image generated by the image generation tool call. One of @@ -1392,22 +1475,25 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::LocalShellCall::Agent }, nil?: true # @!method initialize(id:, action:, call_id:, status:, agent: nil, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall} for more details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -1450,17 +1536,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -1488,7 +1580,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1528,21 +1621,22 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, agent: nil, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput::Agent, nil] + # The agent that produced this item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # @see OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1555,7 +1649,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. @@ -1634,26 +1729,33 @@ class ShellCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseInputItem::ShellCall::Status }, nil?: true # @!method initialize(action:, call_id:, id: nil, agent: nil, caller_: nil, environment: nil, status: nil, type: :shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ShellCall} for more details. - # # A tool representing a request to execute one or more shell commands. # - # @param action [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Action] The shell commands and limits that describe how to run the tool call. + # @param action [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Action] + # The shell commands and limits that describe how to run the tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param id [String, nil] The unique ID of the shell tool call. Populated when this item is returned via A + # @param id [String, nil] + # The unique ID of the shell tool call. Populated when this item is returned via + # API. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param environment [OpenAI::Models::Beta::BetaLocalEnvironment, OpenAI::Models::Beta::BetaContainerReference, nil] The environment to execute the shell commands in. + # @param environment [OpenAI::Models::Beta::BetaLocalEnvironment, OpenAI::Models::Beta::BetaContainerReference, nil] + # The environment to execute the shell commands in. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Status, nil] The status of the shell call. One of `in_progress`, `completed`, or `incomplete` + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Status, nil] + # The status of the shell call. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param type [Symbol, :shell_call] The type of the item. Always `shell_call`. + # @param type [Symbol, :shell_call] + # The type of the item. Always `shell_call`. # @see OpenAI::Models::Beta::BetaResponseInputItem::ShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -1677,17 +1779,17 @@ class Action < OpenAI::Internal::Type::BaseModel optional :timeout_ms, Integer, nil?: true # @!method initialize(commands:, max_output_length: nil, timeout_ms: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ShellCall::Action} for more - # details. - # # The shell commands and limits that describe how to run the tool call. # - # @param commands [Array] Ordered shell commands for the execution environment to run. + # @param commands [Array] + # Ordered shell commands for the execution environment to run. # - # @param max_output_length [Integer, nil] Maximum number of UTF-8 characters to capture from combined stdout and stderr ou + # @param max_output_length [Integer, nil] + # Maximum number of UTF-8 characters to capture from combined stdout and stderr + # output. # - # @param timeout_ms [Integer, nil] Maximum wall-clock time in milliseconds to allow the shell commands to run. + # @param timeout_ms [Integer, nil] + # Maximum wall-clock time in milliseconds to allow the shell commands to run. end # @see OpenAI::Models::Beta::BetaResponseInputItem::ShellCall#agent @@ -1701,7 +1803,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -1724,7 +1827,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1741,9 +1845,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1849,26 +1955,34 @@ class ShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, agent: nil, caller_: nil, max_output_length: nil, status: nil, type: :shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput} for more details. - # # The streamed output items emitted by a shell tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param output [Array] Captured chunks of stdout and stderr output, along with their associated outcome + # @param output [Array] + # Captured chunks of stdout and stderr output, along with their associated + # outcomes. # - # @param id [String, nil] The unique ID of the shell tool call output. Populated when this item is returne + # @param id [String, nil] + # The unique ID of the shell tool call output. Populated when this item is + # returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param max_output_length [Integer, nil] The maximum number of UTF-8 characters captured for this shell call's combined o + # @param max_output_length [Integer, nil] + # The maximum number of UTF-8 characters captured for this shell call's combined + # output. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Status, nil] The status of the shell call output. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput::Status, nil] + # The status of the shell call output. # - # @param type [Symbol, :shell_call_output] The type of the item. Always `shell_call_output`. + # @param type [Symbol, :shell_call_output] + # The type of the item. Always `shell_call_output`. # @see OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1881,7 +1995,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -1904,7 +2019,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1921,9 +2037,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1996,25 +2114,31 @@ class ApplyPatchCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, operation:, status:, id: nil, agent: nil, caller_: nil, type: :apply_patch_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall} for more details. - # # A tool call representing a request to create, delete, or update files using diff # patches. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param operation [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::CreateFile, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::DeleteFile, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::UpdateFile] The specific create, delete, or update instruction for the apply_patch tool call + # @param operation [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::CreateFile, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::DeleteFile, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Operation::UpdateFile] + # The specific create, delete, or update instruction for the apply_patch tool + # call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Status] The status of the apply patch tool call. One of `in_progress` or `completed`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Status] + # The status of the apply patch tool call. One of `in_progress` or `completed`. # - # @param id [String, nil] The unique ID of the apply patch tool call. Populated when this item is returned + # @param id [String, nil] + # The unique ID of the apply patch tool call. Populated when this item is returned + # via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param type [Symbol, :apply_patch_call] The type of the item. Always `apply_patch_call`. + # @param type [Symbol, :apply_patch_call] + # The type of the item. Always `apply_patch_call`. # The specific create, delete, or update instruction for the apply_patch tool # call. @@ -2056,11 +2180,14 @@ class CreateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :create_file) # Instruction for creating a new file via the apply_patch tool. # - # @param diff [String] Unified diff content to apply when creating the file. + # @param diff [String] + # Unified diff content to apply when creating the file. # - # @param path [String] Path of the file to create relative to the workspace root. + # @param path [String] + # Path of the file to create relative to the workspace root. # - # @param type [Symbol, :create_file] The operation type. Always `create_file`. + # @param type [Symbol, :create_file] + # The operation type. Always `create_file`. end class DeleteFile < OpenAI::Internal::Type::BaseModel @@ -2079,9 +2206,11 @@ class DeleteFile < OpenAI::Internal::Type::BaseModel # @!method initialize(path:, type: :delete_file) # Instruction for deleting an existing file via the apply_patch tool. # - # @param path [String] Path of the file to delete relative to the workspace root. + # @param path [String] + # Path of the file to delete relative to the workspace root. # - # @param type [Symbol, :delete_file] The operation type. Always `delete_file`. + # @param type [Symbol, :delete_file] + # The operation type. Always `delete_file`. end class UpdateFile < OpenAI::Internal::Type::BaseModel @@ -2106,11 +2235,14 @@ class UpdateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :update_file) # Instruction for updating an existing file via the apply_patch tool. # - # @param diff [String] Unified diff content to apply to the existing file. + # @param diff [String] + # Unified diff content to apply to the existing file. # - # @param path [String] Path of the file to update relative to the workspace root. + # @param path [String] + # Path of the file to update relative to the workspace root. # - # @param type [Symbol, :update_file] The operation type. Always `update_file`. + # @param type [Symbol, :update_file] + # The operation type. Always `update_file`. end # @!method self.variants @@ -2141,7 +2273,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -2164,7 +2297,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -2181,9 +2315,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -2242,25 +2378,30 @@ class ApplyPatchCallOutput < OpenAI::Internal::Type::BaseModel optional :output, String, nil?: true # @!method initialize(call_id:, status:, id: nil, agent: nil, caller_: nil, output: nil, type: :apply_patch_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput} for more - # details. - # # The streamed output emitted by an apply patch tool call. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Status] The status of the apply patch tool call output. One of `completed` or `failed`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Status] + # The status of the apply patch tool call output. One of `completed` or `failed`. # - # @param id [String, nil] The unique ID of the apply patch tool call output. Populated when this item is r + # @param id [String, nil] + # The unique ID of the apply patch tool call output. Populated when this item is + # returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Agent, nil] + # The agent that produced this item. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param output [String, nil] Optional human-readable log text from the apply patch tool (e.g., patch results + # @param output [String, nil] + # Optional human-readable log text from the apply patch tool (e.g., patch results + # or errors). # - # @param type [Symbol, :apply_patch_call_output] The type of the item. Always `apply_patch_call_output`. + # @param type [Symbol, :apply_patch_call_output] + # The type of the item. Always `apply_patch_call_output`. # The status of the apply patch tool call output. One of `completed` or `failed`. # @@ -2286,7 +2427,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -2309,7 +2451,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -2326,9 +2469,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -2377,23 +2522,25 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, agent: nil, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpListTools::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpListTools::Agent, nil] + # The agent that produced this item. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -2420,19 +2567,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::McpListTools::Tool} for more - # details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end # @see OpenAI::Models::Beta::BetaResponseInputItem::McpListTools#agent @@ -2446,7 +2593,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -2488,23 +2636,25 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::McpApprovalRequest::Agent }, nil?: true # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest} for more - # details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. # @see OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2517,7 +2667,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -2559,23 +2710,25 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(approval_request_id:, approve:, id: nil, agent: nil, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse} for more - # details. - # # A response to an MCP approval request. # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param id [String, nil] The unique ID of the approval response + # @param id [String, nil] + # The unique ID of the approval response # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse::Agent, nil] + # The agent that produced this item. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. # @see OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2588,7 +2741,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -2657,30 +2811,40 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseInputItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::McpCall::Agent, nil] + # The agent that produced this item. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # @see OpenAI::Models::Beta::BetaResponseInputItem::McpCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2693,7 +2857,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, @@ -2730,9 +2895,11 @@ class CompactionTrigger < OpenAI::Internal::Type::BaseModel # @!method initialize(agent: nil, type: :compaction_trigger) # Compacts the current context. Must be the final input item. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :compaction_trigger] The type of the item. Always `compaction_trigger`. + # @param type [Symbol, :compaction_trigger] + # The type of the item. Always `compaction_trigger`. # @see OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2745,7 +2912,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -2771,11 +2939,14 @@ class ItemReference < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, agent: nil, type: nil) # An internal identifier for an item to reference. # - # @param id [String] The ID of the item to reference. + # @param id [String] + # The ID of the item to reference. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ItemReference::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ItemReference::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ItemReference::Type, nil] The type of item to reference. Always `item_reference`. + # @param type [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ItemReference::Type, nil] + # The type of item to reference. Always `item_reference`. # @see OpenAI::Models::Beta::BetaResponseInputItem::ItemReference#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2788,7 +2959,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The type of item to reference. Always `item_reference`. @@ -2842,17 +3014,23 @@ class Program < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::Program::Agent }, nil?: true # @!method initialize(id:, call_id:, code:, fingerprint:, agent: nil, type: :program) - # @param id [String] The unique ID of this program item. + # @param id [String] + # The unique ID of this program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::Program::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::Program::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :program] The item type. Always `program`. + # @param type [Symbol, :program] + # The item type. Always `program`. # @see OpenAI::Models::Beta::BetaResponseInputItem::Program#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -2865,7 +3043,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -2907,17 +3086,23 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::ProgramOutput::Agent }, nil?: true # @!method initialize(id:, call_id:, result:, status:, agent: nil, type: :program_output) - # @param id [String] The unique ID of this program output item. + # @param id [String] + # The unique ID of this program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput::Status] The terminal status of the program output. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput::Status] + # The terminal status of the program output. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :program_output] The item type. Always `program_output`. + # @param type [Symbol, :program_output] + # The item type. Always `program_output`. # The terminal status of the program output. # @@ -2943,7 +3128,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end diff --git a/lib/openai/models/beta/beta_response_input_message_item.rb b/lib/openai/models/beta/beta_response_input_message_item.rb index 407dd2178..fc43f8f2b 100644 --- a/lib/openai/models/beta/beta_response_input_message_item.rb +++ b/lib/openai/models/beta/beta_response_input_message_item.rb @@ -43,20 +43,25 @@ class BetaResponseInputMessageItem < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseInputMessageItem::Status } # @!method initialize(id:, content:, role:, agent: nil, status: nil, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputMessageItem} for more details. + # @param id [String] + # The unique ID of the message input. # - # @param id [String] The unique ID of the message input. + # @param content [Array] + # A list of one or many input items to the model, containing different content + # types. # - # @param content [Array] A list of one or many input items to the model, containing different content + # @param role [Symbol, OpenAI::Models::Beta::BetaResponseInputMessageItem::Role] + # The role of the message input. One of `user`, `system`, or `developer`. # - # @param role [Symbol, OpenAI::Models::Beta::BetaResponseInputMessageItem::Role] The role of the message input. One of `user`, `system`, or `developer`. + # @param agent [OpenAI::Models::Beta::BetaResponseInputMessageItem::Agent, nil] + # The agent that produced this item. # - # @param agent [OpenAI::Models::Beta::BetaResponseInputMessageItem::Agent, nil] The agent that produced this item. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputMessageItem::Status] + # The status of item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseInputMessageItem::Status] The status of item. One of `in_progress`, `completed`, or - # - # @param type [Symbol, :message] The type of the message input. Always set to `message`. + # @param type [Symbol, :message] + # The type of the message input. Always set to `message`. # The role of the message input. One of `user`, `system`, or `developer`. # @@ -83,7 +88,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of item. One of `in_progress`, `completed`, or `incomplete`. diff --git a/lib/openai/models/beta/beta_response_input_text.rb b/lib/openai/models/beta/beta_response_input_text.rb index 05f322979..2619fe7ef 100644 --- a/lib/openai/models/beta/beta_response_input_text.rb +++ b/lib/openai/models/beta/beta_response_input_text.rb @@ -25,16 +25,18 @@ class BetaResponseInputText < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputText::PromptCacheBreakpoint } # @!method initialize(text:, prompt_cache_breakpoint: nil, type: :input_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputText} for more details. - # # A text input to the model. # - # @param text [String] The text input to the model. + # @param text [String] + # The text input to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputText::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputText::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_text] The type of the input item. Always `input_text`. + # @param type [Symbol, :input_text] + # The type of the input item. Always `input_text`. # @see OpenAI::Models::Beta::BetaResponseInputText#prompt_cache_breakpoint class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel @@ -49,7 +51,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_input_text_content.rb b/lib/openai/models/beta/beta_response_input_text_content.rb index b7395aec2..969b6ecee 100644 --- a/lib/openai/models/beta/beta_response_input_text_content.rb +++ b/lib/openai/models/beta/beta_response_input_text_content.rb @@ -29,16 +29,18 @@ class BetaResponseInputTextContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(text:, prompt_cache_breakpoint: nil, type: :input_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseInputTextContent} for more details. - # # A text input to the model. # - # @param text [String] The text input to the model. + # @param text [String] + # The text input to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_text] The type of the input item. Always `input_text`. + # @param type [Symbol, :input_text] + # The type of the input item. Always `input_text`. # @see OpenAI::Models::Beta::BetaResponseInputTextContent#prompt_cache_breakpoint class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel @@ -53,7 +55,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/beta/beta_response_item.rb b/lib/openai/models/beta/beta_response_item.rb index eba815f27..1c1b9808a 100644 --- a/lib/openai/models/beta/beta_response_item.rb +++ b/lib/openai/models/beta/beta_response_item.rb @@ -15,21 +15,21 @@ module BetaResponseItem variant :message, -> { OpenAI::Beta::BetaResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Beta::BetaResponseFileSearchToolCall } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Beta::BetaResponseComputerToolCall } variant :computer_call_output, -> { OpenAI::Beta::BetaResponseComputerToolCallOutputItem } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Beta::BetaResponseFunctionWebSearch } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Beta::BetaResponseFunctionToolCallItem } variant :function_call_output, -> { OpenAI::Beta::BetaResponseFunctionToolCallOutputItem } @@ -53,14 +53,14 @@ module BetaResponseItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Beta::BetaResponseReasoningItem } variant :program, -> { OpenAI::Beta::BetaResponseItem::Program } variant :program_output, -> { OpenAI::Beta::BetaResponseItem::ProgramOutput } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Beta::BetaResponseCompactionItem } # An image generation request made by the model. @@ -146,17 +146,23 @@ class AgentMessage < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::AgentMessage::Agent } # @!method initialize(id:, author:, content:, recipient:, agent: nil, type: :agent_message) - # @param id [String] The unique ID of the agent message. + # @param id [String] + # The unique ID of the agent message. # - # @param author [String] The sending agent identity. + # @param author [String] + # The sending agent identity. # - # @param content [Array] Encrypted content sent between agents. + # @param content [Array] + # Encrypted content sent between agents. # - # @param recipient [String] The destination agent identity. + # @param recipient [String] + # The destination agent identity. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Agent] + # The agent that produced this item. # - # @param type [Symbol, :agent_message] The type of the item. Always `agent_message`. + # @param type [Symbol, :agent_message] + # The type of the item. Always `agent_message`. # A content part that makes up an input or output item. module Content @@ -182,7 +188,7 @@ module Content # A refusal from the model. variant :refusal, -> { OpenAI::Beta::BetaResponseOutputRefusal } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Beta::BetaResponseInputImage } # A screenshot of a computer. @@ -231,9 +237,11 @@ class SummaryText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # A summary text from the model. # - # @param text [String] A summary of the reasoning output from the model so far. + # @param text [String] + # A summary of the reasoning output from the model so far. # - # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the object. Always `summary_text`. end class ReasoningText < OpenAI::Internal::Type::BaseModel @@ -252,9 +260,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end class ComputerScreenshot < OpenAI::Internal::Type::BaseModel @@ -299,21 +309,26 @@ class ComputerScreenshot < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail:, file_id:, image_url:, prompt_cache_breakpoint: nil, type: :computer_screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot} - # for more details. - # # A screenshot of a computer. # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::Detail] The detail level of the screenshot image to be sent to the model. One of `high`, + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::Detail] + # The detail level of the screenshot image to be sent to the model. One of `high`, + # `low`, `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The identifier of an uploaded file that contains the screenshot. + # @param file_id [String, nil] + # The identifier of an uploaded file that contains the screenshot. # - # @param image_url [String, nil] The URL of the screenshot image. + # @param image_url [String, nil] + # The URL of the screenshot image. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is always set + # @param type [Symbol, :computer_screenshot] + # Specifies the event type. For a computer screenshot, this property is always set + # to `computer_screenshot`. # The detail level of the screenshot image to be sent to the model. One of `high`, # `low`, `auto`, or `original`. Defaults to `auto`. @@ -344,7 +359,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end @@ -365,9 +381,11 @@ class EncryptedContent < OpenAI::Internal::Type::BaseModel # Opaque encrypted content that Responses API decrypts inside trusted model # execution. # - # @param encrypted_content [String] Opaque encrypted content. + # @param encrypted_content [String] + # Opaque encrypted content. # - # @param type [Symbol, :encrypted_content] The type of the input item. Always `encrypted_content`. + # @param type [Symbol, :encrypted_content] + # The type of the input item. Always `encrypted_content`. end # @!method self.variants @@ -385,7 +403,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -427,17 +446,23 @@ class MultiAgentCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::MultiAgentCall::Agent } # @!method initialize(id:, action:, arguments:, call_id:, agent: nil, type: :multi_agent_call) - # @param id [String] The unique ID of the multi-agent call item. + # @param id [String] + # The unique ID of the multi-agent call item. # - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseItem::MultiAgentCall::Action] The multi-agent action to execute. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseItem::MultiAgentCall::Action] + # The multi-agent action to execute. # - # @param arguments [String] The JSON string of arguments generated for the action. + # @param arguments [String] + # The JSON string of arguments generated for the action. # - # @param call_id [String] The unique ID linking this call to its output. + # @param call_id [String] + # The unique ID linking this call to its output. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::MultiAgentCall::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::MultiAgentCall::Agent] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call] The type of the multi-agent call. Always `multi_agent_call`. + # @param type [Symbol, :multi_agent_call] + # The type of the multi-agent call. Always `multi_agent_call`. # The multi-agent action to execute. # @@ -467,7 +492,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -509,17 +535,23 @@ class MultiAgentCallOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::MultiAgentCallOutput::Agent } # @!method initialize(id:, action:, call_id:, output:, agent: nil, type: :multi_agent_call_output) - # @param id [String] The unique ID of the multi-agent call output item. + # @param id [String] + # The unique ID of the multi-agent call output item. # - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseItem::MultiAgentCallOutput::Action] The multi-agent action that produced this result. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseItem::MultiAgentCallOutput::Action] + # The multi-agent action that produced this result. # - # @param call_id [String] The unique ID of the multi-agent call. + # @param call_id [String] + # The unique ID of the multi-agent call. # - # @param output [Array] Text output returned by the multi-agent action. + # @param output [Array] + # Text output returned by the multi-agent action. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::MultiAgentCallOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::MultiAgentCallOutput::Agent] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call_output] The type of the multi-agent result. Always `multi_agent_call_output`. + # @param type [Symbol, :multi_agent_call_output] + # The type of the multi-agent result. Always `multi_agent_call_output`. # The multi-agent action that produced this result. # @@ -549,7 +581,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -585,15 +618,20 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::AdditionalTools::Agent } # @!method initialize(id:, role:, tools:, agent: nil, type: :additional_tools) - # @param id [String] The unique ID of the additional tools item. + # @param id [String] + # The unique ID of the additional tools item. # - # @param role [Symbol, OpenAI::Models::Beta::BetaResponseItem::AdditionalTools::Role] The role that provided the additional tools. + # @param role [Symbol, OpenAI::Models::Beta::BetaResponseItem::AdditionalTools::Role] + # The role that provided the additional tools. # - # @param tools [Array] The additional tool definitions made available at this item. + # @param tools [Array] + # The additional tool definitions made available at this item. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::AdditionalTools::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::AdditionalTools::Agent] + # The agent that produced this item. # - # @param type [Symbol, :additional_tools] The type of the item. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The type of the item. Always `additional_tools`. # The role that provided the additional tools. # @@ -625,7 +663,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -667,17 +706,23 @@ class Program < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::Program::Agent } # @!method initialize(id:, call_id:, code:, fingerprint:, agent: nil, type: :program) - # @param id [String] The unique ID of the program item. + # @param id [String] + # The unique ID of the program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::Program::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::Program::Agent] + # The agent that produced this item. # - # @param type [Symbol, :program] The type of the item. Always `program`. + # @param type [Symbol, :program] + # The type of the item. Always `program`. # @see OpenAI::Models::Beta::BetaResponseItem::Program#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -690,7 +735,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -732,17 +778,23 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::ProgramOutput::Agent } # @!method initialize(id:, call_id:, result:, status:, agent: nil, type: :program_output) - # @param id [String] The unique ID of the program output item. + # @param id [String] + # The unique ID of the program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::ProgramOutput::Status] The terminal status of the program output item. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::ProgramOutput::Status] + # The terminal status of the program output item. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::ProgramOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::ProgramOutput::Agent] + # The agent that produced this item. # - # @param type [Symbol, :program_output] The type of the item. Always `program_output`. + # @param type [Symbol, :program_output] + # The type of the item. Always `program_output`. # The terminal status of the program output item. # @@ -768,7 +820,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -823,24 +876,29 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel optional :size, union: -> { OpenAI::Beta::BetaResponseItem::ImageGenerationCall::Size }, nil?: true # @!method initialize(id:, result:, status:, agent: nil, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall} for more details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Agent, nil] + # The agent that produced this item. # - # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -868,7 +926,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The quality of the image generated by the image generation tool call. One of @@ -958,22 +1017,25 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::LocalShellCall::Agent }, nil?: true # @!method initialize(id:, action:, call_id:, status:, agent: nil, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::LocalShellCall} for more details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::LocalShellCall::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Beta::BetaResponseItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -1016,17 +1078,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -1054,7 +1122,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1096,20 +1165,22 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, agent: nil, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput} for more details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput::Agent, nil] + # The agent that produced this item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # @see OpenAI::Models::Beta::BetaResponseItem::LocalShellCallOutput#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1122,7 +1193,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. @@ -1181,23 +1253,25 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, agent: nil, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpListTools::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpListTools::Agent, nil] + # The agent that produced this item. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -1224,18 +1298,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::McpListTools::Tool} for more details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end # @see OpenAI::Models::Beta::BetaResponseItem::McpListTools#agent @@ -1249,7 +1324,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1291,22 +1367,25 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseItem::McpApprovalRequest::Agent }, nil?: true # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::McpApprovalRequest} for more details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpApprovalRequest::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpApprovalRequest::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. # @see OpenAI::Models::Beta::BetaResponseItem::McpApprovalRequest#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1319,7 +1398,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1361,22 +1441,25 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(id:, approval_request_id:, approve:, agent: nil, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::McpApprovalResponse} for more details. - # # A response to an MCP approval request. # - # @param id [String] The unique ID of the approval response + # @param id [String] + # The unique ID of the approval response # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpApprovalResponse::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpApprovalResponse::Agent, nil] + # The agent that produced this item. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. # @see OpenAI::Models::Beta::BetaResponseItem::McpApprovalResponse#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1389,7 +1472,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1458,30 +1542,40 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseItem::McpCall::Agent, nil] + # The agent that produced this item. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # @see OpenAI::Models::Beta::BetaResponseItem::McpCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1494,7 +1588,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, diff --git a/lib/openai/models/beta/beta_response_local_environment.rb b/lib/openai/models/beta/beta_response_local_environment.rb index aa9164f02..7d05bd2eb 100644 --- a/lib/openai/models/beta/beta_response_local_environment.rb +++ b/lib/openai/models/beta/beta_response_local_environment.rb @@ -13,7 +13,8 @@ class BetaResponseLocalEnvironment < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :local) # Represents the use of a local environment to perform shell actions. # - # @param type [Symbol, :local] The environment type. Always `local`. + # @param type [Symbol, :local] + # The environment type. Always `local`. end end diff --git a/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb b/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb index bf8385630..133ee39b6 100644 --- a/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb @@ -42,23 +42,27 @@ class BetaResponseMcpCallArgumentsDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseMcpCallArgumentsDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent} for more details. - # # Emitted when there is a delta (partial update) to the arguments of an MCP tool # call. # - # @param delta [String] A JSON string containing the partial update to the arguments for the MCP tool ca + # @param delta [String] + # A JSON string containing the partial update to the arguments for the MCP tool + # call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_call_arguments.delta"] The type of the event. Always 'response.mcp_call_arguments.delta'. + # @param type [Symbol, :"response.mcp_call_arguments.delta"] + # The type of the event. Always 'response.mcp_call_arguments.delta'. # @see OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -71,7 +75,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb b/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb index dcf392840..0c1b38d15 100644 --- a/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb @@ -41,22 +41,25 @@ class BetaResponseMcpCallArgumentsDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseMcpCallArgumentsDoneEvent::Agent }, nil?: true # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent} for more details. - # # Emitted when the arguments for an MCP tool call are finalized. # - # @param arguments [String] A JSON string containing the finalized arguments for the MCP tool call. + # @param arguments [String] + # A JSON string containing the finalized arguments for the MCP tool call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_call_arguments.done"] The type of the event. Always 'response.mcp_call_arguments.done'. + # @param type [Symbol, :"response.mcp_call_arguments.done"] + # The type of the event. Always 'response.mcp_call_arguments.done'. # @see OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -69,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb b/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb index 6268141ba..52a743c08 100644 --- a/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb @@ -37,15 +37,20 @@ class BetaResponseMcpCallCompletedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_call.completed") # Emitted when an MCP tool call has completed successfully. # - # @param item_id [String] The ID of the MCP tool call item that completed. + # @param item_id [String] + # The ID of the MCP tool call item that completed. # - # @param output_index [Integer] The index of the output item that completed. + # @param output_index [Integer] + # The index of the output item that completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_call.completed"] The type of the event. Always 'response.mcp_call.completed'. + # @param type [Symbol, :"response.mcp_call.completed"] + # The type of the event. Always 'response.mcp_call.completed'. # @see OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb b/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb index 2d584f6c0..3952d3810 100644 --- a/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb @@ -37,15 +37,20 @@ class BetaResponseMcpCallFailedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_call.failed") # Emitted when an MCP tool call has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_call.failed"] The type of the event. Always 'response.mcp_call.failed'. + # @param type [Symbol, :"response.mcp_call.failed"] + # The type of the event. Always 'response.mcp_call.failed'. # @see OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb b/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb index c858f4819..59f66aa43 100644 --- a/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb @@ -37,15 +37,20 @@ class BetaResponseMcpCallInProgressEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_call.in_progress") # Emitted when an MCP tool call is in progress. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_call.in_progress"] The type of the event. Always 'response.mcp_call.in_progress'. + # @param type [Symbol, :"response.mcp_call.in_progress"] + # The type of the event. Always 'response.mcp_call.in_progress'. # @see OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb b/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb index 981057b70..f8d4e27f6 100644 --- a/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb @@ -37,15 +37,20 @@ class BetaResponseMcpListToolsCompletedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_list_tools.completed") # Emitted when the list of available MCP tools has been successfully retrieved. # - # @param item_id [String] The ID of the MCP tool call item that produced this output. + # @param item_id [String] + # The ID of the MCP tool call item that produced this output. # - # @param output_index [Integer] The index of the output item that was processed. + # @param output_index [Integer] + # The index of the output item that was processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_list_tools.completed"] The type of the event. Always 'response.mcp_list_tools.completed'. + # @param type [Symbol, :"response.mcp_list_tools.completed"] + # The type of the event. Always 'response.mcp_list_tools.completed'. # @see OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb b/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb index 2c2ed267c..5a6eaab06 100644 --- a/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb @@ -37,15 +37,20 @@ class BetaResponseMcpListToolsFailedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.mcp_list_tools.failed") # Emitted when the attempt to list available MCP tools has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_list_tools.failed"] The type of the event. Always 'response.mcp_list_tools.failed'. + # @param type [Symbol, :"response.mcp_list_tools.failed"] + # The type of the event. Always 'response.mcp_list_tools.failed'. # @see OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -58,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb b/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb index d0a13a86f..39af9cb1d 100644 --- a/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb @@ -38,15 +38,20 @@ class BetaResponseMcpListToolsInProgressEvent < OpenAI::Internal::Type::BaseMode # Emitted when the system is in the process of retrieving the list of available # MCP tools. # - # @param item_id [String] The ID of the MCP tool call item that is being processed. + # @param item_id [String] + # The ID of the MCP tool call item that is being processed. # - # @param output_index [Integer] The index of the output item that is being processed. + # @param output_index [Integer] + # The index of the output item that is being processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.mcp_list_tools.in_progress"] The type of the event. Always 'response.mcp_list_tools.in_progress'. + # @param type [Symbol, :"response.mcp_list_tools.in_progress"] + # The type of the event. Always 'response.mcp_list_tools.in_progress'. # @see OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -59,7 +64,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_output_audio.rb b/lib/openai/models/beta/beta_response_output_audio.rb index bad08ead0..164ff0b83 100644 --- a/lib/openai/models/beta/beta_response_output_audio.rb +++ b/lib/openai/models/beta/beta_response_output_audio.rb @@ -23,16 +23,16 @@ class BetaResponseOutputAudio < OpenAI::Internal::Type::BaseModel required :type, const: :output_audio # @!method initialize(data:, transcript:, type: :output_audio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputAudio} for more details. - # # An audio output from the model. # - # @param data [String] Base64-encoded audio data from the model. + # @param data [String] + # Base64-encoded audio data from the model. # - # @param transcript [String] The transcript of the audio data from the model. + # @param transcript [String] + # The transcript of the audio data from the model. # - # @param type [Symbol, :output_audio] The type of the output audio. Always `output_audio`. + # @param type [Symbol, :output_audio] + # The type of the output audio. Always `output_audio`. end end diff --git a/lib/openai/models/beta/beta_response_output_item.rb b/lib/openai/models/beta/beta_response_output_item.rb index 44c3d7c07..29a5ae0db 100644 --- a/lib/openai/models/beta/beta_response_output_item.rb +++ b/lib/openai/models/beta/beta_response_output_item.rb @@ -13,11 +13,11 @@ module BetaResponseOutputItem variant :message, -> { OpenAI::Beta::BetaResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Beta::BetaResponseFileSearchToolCall } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Beta::BetaResponseFunctionToolCall } variant :function_call_output, -> { OpenAI::Beta::BetaResponseFunctionToolCallOutputItem } @@ -29,11 +29,11 @@ module BetaResponseOutputItem variant :multi_agent_call_output, -> { OpenAI::Beta::BetaResponseOutputItem::MultiAgentCallOutput } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Beta::BetaResponseFunctionWebSearch } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Beta::BetaResponseComputerToolCall } variant :computer_call_output, -> { OpenAI::Beta::BetaResponseComputerToolCallOutputItem } @@ -41,7 +41,7 @@ module BetaResponseOutputItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Beta::BetaResponseReasoningItem } variant :program, -> { OpenAI::Beta::BetaResponseOutputItem::Program } @@ -54,7 +54,7 @@ module BetaResponseOutputItem variant :additional_tools, -> { OpenAI::Beta::BetaResponseOutputItem::AdditionalTools } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Beta::BetaResponseCompactionItem } # An image generation request made by the model. @@ -140,17 +140,23 @@ class AgentMessage < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Agent } # @!method initialize(id:, author:, content:, recipient:, agent: nil, type: :agent_message) - # @param id [String] The unique ID of the agent message. + # @param id [String] + # The unique ID of the agent message. # - # @param author [String] The sending agent identity. + # @param author [String] + # The sending agent identity. # - # @param content [Array] Encrypted content sent between agents. + # @param content [Array] + # Encrypted content sent between agents. # - # @param recipient [String] The destination agent identity. + # @param recipient [String] + # The destination agent identity. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Agent] + # The agent that produced this item. # - # @param type [Symbol, :agent_message] The type of the item. Always `agent_message`. + # @param type [Symbol, :agent_message] + # The type of the item. Always `agent_message`. # A content part that makes up an input or output item. module Content @@ -176,7 +182,7 @@ module Content # A refusal from the model. variant :refusal, -> { OpenAI::Beta::BetaResponseOutputRefusal } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Beta::BetaResponseInputImage } # A screenshot of a computer. @@ -228,9 +234,11 @@ class SummaryText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # A summary text from the model. # - # @param text [String] A summary of the reasoning output from the model so far. + # @param text [String] + # A summary of the reasoning output from the model so far. # - # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the object. Always `summary_text`. end class ReasoningText < OpenAI::Internal::Type::BaseModel @@ -249,9 +257,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end class ComputerScreenshot < OpenAI::Internal::Type::BaseModel @@ -298,21 +308,26 @@ class ComputerScreenshot < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail:, file_id:, image_url:, prompt_cache_breakpoint: nil, type: :computer_screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot} - # for more details. - # # A screenshot of a computer. # - # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::Detail] The detail level of the screenshot image to be sent to the model. One of `high`, + # @param detail [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::Detail] + # The detail level of the screenshot image to be sent to the model. One of `high`, + # `low`, `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The identifier of an uploaded file that contains the screenshot. + # @param file_id [String, nil] + # The identifier of an uploaded file that contains the screenshot. # - # @param image_url [String, nil] The URL of the screenshot image. + # @param image_url [String, nil] + # The URL of the screenshot image. # - # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is always set + # @param type [Symbol, :computer_screenshot] + # Specifies the event type. For a computer screenshot, this property is always set + # to `computer_screenshot`. # The detail level of the screenshot image to be sent to the model. One of `high`, # `low`, `auto`, or `original`. Defaults to `auto`. @@ -343,7 +358,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end @@ -364,9 +380,11 @@ class EncryptedContent < OpenAI::Internal::Type::BaseModel # Opaque encrypted content that Responses API decrypts inside trusted model # execution. # - # @param encrypted_content [String] Opaque encrypted content. + # @param encrypted_content [String] + # Opaque encrypted content. # - # @param type [Symbol, :encrypted_content] The type of the input item. Always `encrypted_content`. + # @param type [Symbol, :encrypted_content] + # The type of the input item. Always `encrypted_content`. end # @!method self.variants @@ -384,7 +402,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -426,17 +445,23 @@ class MultiAgentCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::MultiAgentCall::Agent } # @!method initialize(id:, action:, arguments:, call_id:, agent: nil, type: :multi_agent_call) - # @param id [String] The unique ID of the multi-agent call item. + # @param id [String] + # The unique ID of the multi-agent call item. # - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall::Action] The multi-agent action to execute. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall::Action] + # The multi-agent action to execute. # - # @param arguments [String] The JSON string of arguments generated for the action. + # @param arguments [String] + # The JSON string of arguments generated for the action. # - # @param call_id [String] The unique ID linking this call to its output. + # @param call_id [String] + # The unique ID linking this call to its output. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall::Agent] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call] The type of the multi-agent call. Always `multi_agent_call`. + # @param type [Symbol, :multi_agent_call] + # The type of the multi-agent call. Always `multi_agent_call`. # The multi-agent action to execute. # @@ -466,7 +491,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -508,17 +534,23 @@ class MultiAgentCallOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::MultiAgentCallOutput::Agent } # @!method initialize(id:, action:, call_id:, output:, agent: nil, type: :multi_agent_call_output) - # @param id [String] The unique ID of the multi-agent call output item. + # @param id [String] + # The unique ID of the multi-agent call output item. # - # @param action [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput::Action] The multi-agent action that produced this result. + # @param action [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput::Action] + # The multi-agent action that produced this result. # - # @param call_id [String] The unique ID of the multi-agent call. + # @param call_id [String] + # The unique ID of the multi-agent call. # - # @param output [Array] Text output returned by the multi-agent action. + # @param output [Array] + # Text output returned by the multi-agent action. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput::Agent] + # The agent that produced this item. # - # @param type [Symbol, :multi_agent_call_output] The type of the multi-agent result. Always `multi_agent_call_output`. + # @param type [Symbol, :multi_agent_call_output] + # The type of the multi-agent result. Always `multi_agent_call_output`. # The multi-agent action that produced this result. # @@ -548,7 +580,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -590,17 +623,23 @@ class Program < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::Program::Agent } # @!method initialize(id:, call_id:, code:, fingerprint:, agent: nil, type: :program) - # @param id [String] The unique ID of the program item. + # @param id [String] + # The unique ID of the program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::Program::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::Program::Agent] + # The agent that produced this item. # - # @param type [Symbol, :program] The type of the item. Always `program`. + # @param type [Symbol, :program] + # The type of the item. Always `program`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::Program#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -613,7 +652,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -655,17 +695,23 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::ProgramOutput::Agent } # @!method initialize(id:, call_id:, result:, status:, agent: nil, type: :program_output) - # @param id [String] The unique ID of the program output item. + # @param id [String] + # The unique ID of the program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput::Status] The terminal status of the program output item. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput::Status] + # The terminal status of the program output item. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput::Agent] + # The agent that produced this item. # - # @param type [Symbol, :program_output] The type of the item. Always `program_output`. + # @param type [Symbol, :program_output] + # The type of the item. Always `program_output`. # The terminal status of the program output item. # @@ -691,7 +737,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -727,15 +774,20 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::AdditionalTools::Agent } # @!method initialize(id:, role:, tools:, agent: nil, type: :additional_tools) - # @param id [String] The unique ID of the additional tools item. + # @param id [String] + # The unique ID of the additional tools item. # - # @param role [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools::Role] The role that provided the additional tools. + # @param role [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools::Role] + # The role that provided the additional tools. # - # @param tools [Array] The additional tool definitions made available at this item. + # @param tools [Array] + # The additional tool definitions made available at this item. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools::Agent] + # The agent that produced this item. # - # @param type [Symbol, :additional_tools] The type of the item. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The type of the item. Always `additional_tools`. # The role that provided the additional tools. # @@ -767,7 +819,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -826,25 +879,29 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, result:, status:, agent: nil, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall} for more - # details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Agent, nil] + # The agent that produced this item. # - # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -872,7 +929,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The quality of the image generated by the image generation tool call. One of @@ -970,22 +1028,25 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::LocalShellCall::Agent }, nil?: true # @!method initialize(id:, action:, call_id:, status:, agent: nil, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall} for more details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -1028,17 +1089,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -1066,7 +1133,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1112,21 +1180,22 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, agent: nil, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput::Agent, nil] + # The agent that produced this item. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1139,7 +1208,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. @@ -1222,30 +1292,40 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseOutputItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpCall::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpCall::Agent, nil] + # The agent that produced this item. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::McpCall#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1258,7 +1338,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, @@ -1320,23 +1401,25 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, agent: nil, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools::Agent, nil] + # The agent that produced this item. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -1363,19 +1446,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools::Tool} for more - # details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end # @see OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools#agent @@ -1389,7 +1472,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1431,23 +1515,25 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::McpApprovalRequest::Agent }, nil?: true # @!method initialize(id:, arguments:, name:, server_label:, agent: nil, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest} for more - # details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest::Agent, nil] + # The agent that produced this item. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1460,7 +1546,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -1502,23 +1589,25 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(id:, approval_request_id:, approve:, agent: nil, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse} for more - # details. - # # A response to an MCP approval request. # - # @param id [String] The unique ID of the approval response + # @param id [String] + # The unique ID of the approval response # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse::Agent, nil] + # The agent that produced this item. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. # @see OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -1531,7 +1620,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end diff --git a/lib/openai/models/beta/beta_response_output_item_added_event.rb b/lib/openai/models/beta/beta_response_output_item_added_event.rb index 23a919978..ed6a9ae01 100644 --- a/lib/openai/models/beta/beta_response_output_item_added_event.rb +++ b/lib/openai/models/beta/beta_response_output_item_added_event.rb @@ -38,20 +38,25 @@ class BetaResponseOutputItemAddedEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItemAddedEvent::Agent }, nil?: true # @!method initialize(item:, output_index:, sequence_number:, agent: nil, type: :"response.output_item.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent} for more details. - # # Emitted when a new output item is added. # - # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was added. For reasoning items, `encrypted_content` + # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] + # The output item that was added. For reasoning items, `encrypted_content` may be + # incomplete while the item is in progress. Use the reasoning item from the + # corresponding `response.output_item.done` event when passing it as input to a + # subsequent request. # - # @param output_index [Integer] The index of the output item that was added. + # @param output_index [Integer] + # The index of the output item that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.output_item.added"] The type of the event. Always `response.output_item.added`. + # @param type [Symbol, :"response.output_item.added"] + # The type of the event. Always `response.output_item.added`. # @see OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -64,7 +69,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_output_item_done_event.rb b/lib/openai/models/beta/beta_response_output_item_done_event.rb index 765bc6bde..447f67025 100644 --- a/lib/openai/models/beta/beta_response_output_item_done_event.rb +++ b/lib/openai/models/beta/beta_response_output_item_done_event.rb @@ -35,20 +35,22 @@ class BetaResponseOutputItemDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseOutputItemDoneEvent::Agent }, nil?: true # @!method initialize(item:, output_index:, sequence_number:, agent: nil, type: :"response.output_item.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent} for more details. - # # Emitted when an output item is marked done. # - # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was marked done. + # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] + # The output item that was marked done. # - # @param output_index [Integer] The index of the output item that was marked done. + # @param output_index [Integer] + # The index of the output item that was marked done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.output_item.done"] The type of the event. Always `response.output_item.done`. + # @param type [Symbol, :"response.output_item.done"] + # The type of the event. Always `response.output_item.done`. # @see OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -61,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_output_message.rb b/lib/openai/models/beta/beta_response_output_message.rb index 7a7bd0595..ed76d657b 100644 --- a/lib/openai/models/beta/beta_response_output_message.rb +++ b/lib/openai/models/beta/beta_response_output_message.rb @@ -54,24 +54,32 @@ class BetaResponseOutputMessage < OpenAI::Internal::Type::BaseModel optional :phase, enum: -> { OpenAI::Beta::BetaResponseOutputMessage::Phase }, nil?: true # @!method initialize(id:, content:, status:, agent: nil, phase: nil, role: :assistant, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputMessage} for more details. - # # An output message from the model. # - # @param id [String] The unique ID of the output message. + # @param id [String] + # The unique ID of the output message. # - # @param content [Array] The content of the output message. + # @param content [Array] + # The content of the output message. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputMessage::Status] The status of the message input. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseOutputMessage::Status] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputMessage::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputMessage::Agent, nil] + # The agent that produced this item. # - # @param phase [Symbol, OpenAI::Models::Beta::BetaResponseOutputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # @param phase [Symbol, OpenAI::Models::Beta::BetaResponseOutputMessage::Phase, nil] + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. # - # @param role [Symbol, :assistant] The role of the output message. Always `assistant`. + # @param role [Symbol, :assistant] + # The role of the output message. Always `assistant`. # - # @param type [Symbol, :message] The type of the output message. Always `message`. + # @param type [Symbol, :message] + # The type of the output message. Always `message`. # A text output from the model. module Content @@ -115,7 +123,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # Labels an `assistant` message as intermediate commentary (`commentary`) or the diff --git a/lib/openai/models/beta/beta_response_output_refusal.rb b/lib/openai/models/beta/beta_response_output_refusal.rb index 58a5b3435..968178f08 100644 --- a/lib/openai/models/beta/beta_response_output_refusal.rb +++ b/lib/openai/models/beta/beta_response_output_refusal.rb @@ -19,9 +19,11 @@ class BetaResponseOutputRefusal < OpenAI::Internal::Type::BaseModel # @!method initialize(refusal:, type: :refusal) # A refusal from the model. # - # @param refusal [String] The refusal explanation from the model. + # @param refusal [String] + # The refusal explanation from the model. # - # @param type [Symbol, :refusal] The type of the refusal. Always `refusal`. + # @param type [Symbol, :refusal] + # The type of the refusal. Always `refusal`. end end diff --git a/lib/openai/models/beta/beta_response_output_text.rb b/lib/openai/models/beta/beta_response_output_text.rb index 058374fb7..8e7a930a7 100644 --- a/lib/openai/models/beta/beta_response_output_text.rb +++ b/lib/openai/models/beta/beta_response_output_text.rb @@ -33,13 +33,16 @@ class BetaResponseOutputText < OpenAI::Internal::Type::BaseModel # @!method initialize(annotations:, text:, logprobs: nil, type: :output_text) # A text output from the model. # - # @param annotations [Array] The annotations of the text output. + # @param annotations [Array] + # The annotations of the text output. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # # @param logprobs [Array] # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. # An annotation that applies to a span of output text. module Annotation @@ -90,13 +93,17 @@ class FileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(file_id:, filename:, index:, type: :file_citation) # A citation to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the file cited. + # @param filename [String] + # The filename of the file cited. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`. + # @param type [Symbol, :file_citation] + # The type of the file citation. Always `file_citation`. end class URLCitation < OpenAI::Internal::Type::BaseModel @@ -133,15 +140,20 @@ class URLCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation) # A citation for a web resource used to generate a model response. # - # @param end_index [Integer] The index of the last character of the URL citation in the message. + # @param end_index [Integer] + # The index of the last character of the URL citation in the message. # - # @param start_index [Integer] The index of the first character of the URL citation in the message. + # @param start_index [Integer] + # The index of the first character of the URL citation in the message. # - # @param title [String] The title of the web resource. + # @param title [String] + # The title of the web resource. # - # @param url [String] The URL of the web resource. + # @param url [String] + # The URL of the web resource. # - # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The type of the URL citation. Always `url_citation`. end class ContainerFileCitation < OpenAI::Internal::Type::BaseModel @@ -184,17 +196,23 @@ class ContainerFileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation) # A citation for a container file used to generate a model response. # - # @param container_id [String] The ID of the container file. + # @param container_id [String] + # The ID of the container file. # - # @param end_index [Integer] The index of the last character of the container file citation in the message. + # @param end_index [Integer] + # The index of the last character of the container file citation in the message. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the container file cited. + # @param filename [String] + # The filename of the container file cited. # - # @param start_index [Integer] The index of the first character of the container file citation in the message. + # @param start_index [Integer] + # The index of the first character of the container file citation in the message. # - # @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`. + # @param type [Symbol, :container_file_citation] + # The type of the container file citation. Always `container_file_citation`. end class FilePath < OpenAI::Internal::Type::BaseModel @@ -217,17 +235,16 @@ class FilePath < OpenAI::Internal::Type::BaseModel required :type, const: :file_path # @!method initialize(file_id:, index:, type: :file_path) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputText::Annotation::FilePath} for more - # details. - # # A path to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_path] The type of the file path. Always `file_path`. + # @param type [Symbol, :file_path] + # The type of the file path. Always `file_path`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb b/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb index f7813eda9..6d0abdfad 100644 --- a/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +++ b/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb @@ -59,21 +59,29 @@ class BetaResponseOutputTextAnnotationAddedEvent < OpenAI::Internal::Type::BaseM # @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.output_text.annotation.added") # Emitted when an annotation is added to output text content. # - # @param annotation [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text. + # @param annotation [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] + # An annotation that applies to a span of output text. # - # @param annotation_index [Integer] The index of the annotation within the content part. + # @param annotation_index [Integer] + # The index of the annotation within the content part. # - # @param content_index [Integer] The index of the content part within the output item. + # @param content_index [Integer] + # The index of the content part within the output item. # - # @param item_id [String] The unique identifier of the item to which the annotation is being added. + # @param item_id [String] + # The unique identifier of the item to which the annotation is being added. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'. + # @param type [Symbol, :"response.output_text.annotation.added"] + # The type of the event. Always 'response.output_text.annotation.added'. # An annotation that applies to a span of output text. # @@ -132,13 +140,17 @@ class FileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(file_id:, filename:, index:, type: :file_citation) # A citation to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the file cited. + # @param filename [String] + # The filename of the file cited. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`. + # @param type [Symbol, :file_citation] + # The type of the file citation. Always `file_citation`. end class URLCitation < OpenAI::Internal::Type::BaseModel @@ -175,15 +187,20 @@ class URLCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation) # A citation for a web resource used to generate a model response. # - # @param end_index [Integer] The index of the last character of the URL citation in the message. + # @param end_index [Integer] + # The index of the last character of the URL citation in the message. # - # @param start_index [Integer] The index of the first character of the URL citation in the message. + # @param start_index [Integer] + # The index of the first character of the URL citation in the message. # - # @param title [String] The title of the web resource. + # @param title [String] + # The title of the web resource. # - # @param url [String] The URL of the web resource. + # @param url [String] + # The URL of the web resource. # - # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The type of the URL citation. Always `url_citation`. end class ContainerFileCitation < OpenAI::Internal::Type::BaseModel @@ -226,17 +243,23 @@ class ContainerFileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation) # A citation for a container file used to generate a model response. # - # @param container_id [String] The ID of the container file. + # @param container_id [String] + # The ID of the container file. # - # @param end_index [Integer] The index of the last character of the container file citation in the message. + # @param end_index [Integer] + # The index of the last character of the container file citation in the message. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the container file cited. + # @param filename [String] + # The filename of the container file cited. # - # @param start_index [Integer] The index of the first character of the container file citation in the message. + # @param start_index [Integer] + # The index of the first character of the container file citation in the message. # - # @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`. + # @param type [Symbol, :container_file_citation] + # The type of the container file citation. Always `container_file_citation`. end class FilePath < OpenAI::Internal::Type::BaseModel @@ -259,17 +282,16 @@ class FilePath < OpenAI::Internal::Type::BaseModel required :type, const: :file_path # @!method initialize(file_id:, index:, type: :file_path) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath} - # for more details. - # # A path to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_path] The type of the file path. Always `file_path`. + # @param type [Symbol, :file_path] + # The type of the file path. Always `file_path`. end # @!method self.variants @@ -287,7 +309,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_prompt.rb b/lib/openai/models/beta/beta_response_prompt.rb index 441dff286..8a80879da 100644 --- a/lib/openai/models/beta/beta_response_prompt.rb +++ b/lib/openai/models/beta/beta_response_prompt.rb @@ -29,17 +29,19 @@ class BetaResponsePrompt < OpenAI::Internal::Type::BaseModel optional :version, String, nil?: true # @!method initialize(id:, variables: nil, version: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsePrompt} for more details. - # # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # - # @param id [String] The unique identifier of the prompt template to use. + # @param id [String] + # The unique identifier of the prompt template to use. # - # @param variables [Hash{Symbol=>String, OpenAI::Models::Beta::BetaResponseInputText, OpenAI::Models::Beta::BetaResponseInputImage, OpenAI::Models::Beta::BetaResponseInputFile}, nil] Optional map of values to substitute in for variables in your + # @param variables [Hash{Symbol=>String, OpenAI::Models::Beta::BetaResponseInputText, OpenAI::Models::Beta::BetaResponseInputImage, OpenAI::Models::Beta::BetaResponseInputFile}, nil] + # Optional map of values to substitute in for variables in your prompt. The + # substitution values can either be strings, or other Response input types like + # images or files. # - # @param version [String, nil] Optional version of the prompt template. + # @param version [String, nil] + # Optional version of the prompt template. # A text input to the model. module Variable @@ -50,7 +52,7 @@ module Variable # A text input to the model. variant -> { OpenAI::Beta::BetaResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant -> { OpenAI::Beta::BetaResponseInputImage } # A file input to the model. diff --git a/lib/openai/models/beta/beta_response_queued_event.rb b/lib/openai/models/beta/beta_response_queued_event.rb index 88525a776..b2f925714 100644 --- a/lib/openai/models/beta/beta_response_queued_event.rb +++ b/lib/openai/models/beta/beta_response_queued_event.rb @@ -31,13 +31,17 @@ class BetaResponseQueuedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(response:, sequence_number:, agent: nil, type: :"response.queued") # Emitted when a response is queued and waiting to be processed. # - # @param response [OpenAI::Models::Beta::BetaResponse] The full response object that is queued. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The full response object that is queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseQueuedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseQueuedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.queued"] The type of the event. Always 'response.queued'. + # @param type [Symbol, :"response.queued"] + # The type of the event. Always 'response.queued'. # @see OpenAI::Models::Beta::BetaResponseQueuedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -50,7 +54,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_reasoning_item.rb b/lib/openai/models/beta/beta_response_reasoning_item.rb index 5af3bc4a3..838b6df52 100644 --- a/lib/openai/models/beta/beta_response_reasoning_item.rb +++ b/lib/openai/models/beta/beta_response_reasoning_item.rb @@ -61,28 +61,39 @@ class BetaResponseReasoningItem < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseReasoningItem::Status } # @!method initialize(id:, summary:, agent: nil, content: nil, encrypted_content: nil, status: nil, type: :reasoning) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningItem} for more details. - # # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). # - # @param id [String] The unique identifier of the reasoning content. + # @param id [String] + # The unique identifier of the reasoning content. # - # @param summary [Array] Reasoning summary content. + # @param summary [Array] + # Reasoning summary content. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningItem::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningItem::Agent, nil] + # The agent that produced this item. # - # @param content [Array] Reasoning text content. + # @param content [Array] + # Reasoning text content. # - # @param encrypted_content [String, nil] The encrypted content of the reasoning item. This is populated by default + # @param encrypted_content [String, nil] + # The encrypted content of the reasoning item. This is populated by default for + # reasoning items returned by `POST /v1/responses` and WebSocket `response.create` + # requests. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningItem::Status] The status of the item. One of `in_progress`, `completed`, or + # When streaming, use the completed reasoning item and its `encrypted_content` + # from the `response.output_item.done` event in subsequent requests. The + # `encrypted_content` in `response.output_item.added` may be incomplete. This is + # especially important when `store` is `false` or when using Zero Data Retention. # - # @param type [Symbol, :reasoning] The type of the object. Always `reasoning`. - + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. + # + # @param type [Symbol, :reasoning] + # The type of the object. Always `reasoning`. class Summary < OpenAI::Internal::Type::BaseModel # @!attribute text # A summary of the reasoning output from the model so far. @@ -99,9 +110,11 @@ class Summary < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # A summary text from the model. # - # @param text [String] A summary of the reasoning output from the model so far. + # @param text [String] + # A summary of the reasoning output from the model so far. # - # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the object. Always `summary_text`. end # @see OpenAI::Models::Beta::BetaResponseReasoningItem#agent @@ -115,7 +128,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end class Content < OpenAI::Internal::Type::BaseModel @@ -134,9 +148,11 @@ class Content < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. diff --git a/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb b/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb index cf545c390..8ad72a407 100644 --- a/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb @@ -47,25 +47,28 @@ class BetaResponseReasoningSummaryPartAddedEvent < OpenAI::Internal::Type::BaseM optional :agent, -> { OpenAI::Beta::BetaResponseReasoningSummaryPartAddedEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, agent: nil, type: :"response.reasoning_summary_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent} for more - # details. - # # Emitted when a new reasoning summary part is added. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Part] The summary part that was added. + # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Part] + # The summary part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.reasoning_summary_part.added"] The type of the event. Always `response.reasoning_summary_part.added`. + # @param type [Symbol, :"response.reasoning_summary_part.added"] + # The type of the event. Always `response.reasoning_summary_part.added`. # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -84,9 +87,11 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # The summary part that was added. # - # @param text [String] The text of the summary part. + # @param text [String] + # The text of the summary part. # - # @param type [Symbol, :summary_text] The type of the summary part. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the summary part. Always `summary_text`. end # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent#agent @@ -100,7 +105,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb b/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb index f108f8706..0c7b2ca56 100644 --- a/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb @@ -54,27 +54,32 @@ class BetaResponseReasoningSummaryPartDoneEvent < OpenAI::Internal::Type::BaseMo optional :status, enum: -> { OpenAI::Beta::BetaResponseReasoningSummaryPartDoneEvent::Status } # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, agent: nil, status: nil, type: :"response.reasoning_summary_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent} for more - # details. - # # Emitted when a reasoning summary part is completed. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Part] The completed summary part. + # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Part] + # The completed summary part. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Status] The completion status of the summary part. Omitted when the part completed + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Status] + # The completion status of the summary part. Omitted when the part completed + # normally and set to `incomplete` when generation was interrupted. # - # @param type [Symbol, :"response.reasoning_summary_part.done"] The type of the event. Always `response.reasoning_summary_part.done`. + # @param type [Symbol, :"response.reasoning_summary_part.done"] + # The type of the event. Always `response.reasoning_summary_part.done`. # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -93,9 +98,11 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # The completed summary part. # - # @param text [String] The text of the summary part. + # @param text [String] + # The text of the summary part. # - # @param type [Symbol, :summary_text] The type of the summary part. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the summary part. Always `summary_text`. end # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent#agent @@ -109,7 +116,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The completion status of the summary part. Omitted when the part completed diff --git a/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb b/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb index 973e02f4b..96803ad98 100644 --- a/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb @@ -47,25 +47,28 @@ class BetaResponseReasoningSummaryTextDeltaEvent < OpenAI::Internal::Type::BaseM optional :agent, -> { OpenAI::Beta::BetaResponseReasoningSummaryTextDeltaEvent::Agent }, nil?: true # @!method initialize(delta:, item_id:, output_index:, sequence_number:, summary_index:, agent: nil, type: :"response.reasoning_summary_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent} for more - # details. - # # Emitted when a delta is added to a reasoning summary text. # - # @param delta [String] The text delta that was added to the summary. + # @param delta [String] + # The text delta that was added to the summary. # - # @param item_id [String] The ID of the item this summary text delta is associated with. + # @param item_id [String] + # The ID of the item this summary text delta is associated with. # - # @param output_index [Integer] The index of the output item this summary text delta is associated with. + # @param output_index [Integer] + # The index of the output item this summary text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.reasoning_summary_text.delta"] The type of the event. Always `response.reasoning_summary_text.delta`. + # @param type [Symbol, :"response.reasoning_summary_text.delta"] + # The type of the event. Always `response.reasoning_summary_text.delta`. # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -78,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb b/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb index c0a085ebe..ae6e8d5ea 100644 --- a/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb @@ -47,25 +47,28 @@ class BetaResponseReasoningSummaryTextDoneEvent < OpenAI::Internal::Type::BaseMo optional :agent, -> { OpenAI::Beta::BetaResponseReasoningSummaryTextDoneEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, summary_index:, text:, agent: nil, type: :"response.reasoning_summary_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent} for more - # details. - # # Emitted when a reasoning summary text is completed. # - # @param item_id [String] The ID of the item this summary text is associated with. + # @param item_id [String] + # The ID of the item this summary text is associated with. # - # @param output_index [Integer] The index of the output item this summary text is associated with. + # @param output_index [Integer] + # The index of the output item this summary text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param text [String] The full text of the completed reasoning summary. + # @param text [String] + # The full text of the completed reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.reasoning_summary_text.done"] The type of the event. Always `response.reasoning_summary_text.done`. + # @param type [Symbol, :"response.reasoning_summary_text.done"] + # The type of the event. Always `response.reasoning_summary_text.done`. # @see OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -78,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb b/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb index 717e499dd..1b6657c38 100644 --- a/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb @@ -47,24 +47,28 @@ class BetaResponseReasoningTextDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseReasoningTextDeltaEvent::Agent }, nil?: true # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.reasoning_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent} for more details. - # # Emitted when a delta is added to a reasoning text. # - # @param content_index [Integer] The index of the reasoning content part this delta is associated with. + # @param content_index [Integer] + # The index of the reasoning content part this delta is associated with. # - # @param delta [String] The text delta that was added to the reasoning content. + # @param delta [String] + # The text delta that was added to the reasoning content. # - # @param item_id [String] The ID of the item this reasoning text delta is associated with. + # @param item_id [String] + # The ID of the item this reasoning text delta is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text delta is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.reasoning_text.delta"] The type of the event. Always `response.reasoning_text.delta`. + # @param type [Symbol, :"response.reasoning_text.delta"] + # The type of the event. Always `response.reasoning_text.delta`. # @see OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -77,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb b/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb index 14fd8d78f..51fe62fc0 100644 --- a/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb +++ b/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb @@ -47,24 +47,28 @@ class BetaResponseReasoningTextDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseReasoningTextDoneEvent::Agent }, nil?: true # @!method initialize(content_index:, item_id:, output_index:, sequence_number:, text:, agent: nil, type: :"response.reasoning_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent} for more details. - # # Emitted when a reasoning text is completed. # - # @param content_index [Integer] The index of the reasoning content part. + # @param content_index [Integer] + # The index of the reasoning content part. # - # @param item_id [String] The ID of the item this reasoning text is associated with. + # @param item_id [String] + # The ID of the item this reasoning text is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param text [String] The full text of the completed reasoning content. + # @param text [String] + # The full text of the completed reasoning content. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.reasoning_text.done"] The type of the event. Always `response.reasoning_text.done`. + # @param type [Symbol, :"response.reasoning_text.done"] + # The type of the event. Always `response.reasoning_text.done`. # @see OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -77,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_refusal_delta_event.rb b/lib/openai/models/beta/beta_response_refusal_delta_event.rb index 0c83d7556..9ef04ef61 100644 --- a/lib/openai/models/beta/beta_response_refusal_delta_event.rb +++ b/lib/openai/models/beta/beta_response_refusal_delta_event.rb @@ -47,24 +47,28 @@ class BetaResponseRefusalDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseRefusalDeltaEvent::Agent }, nil?: true # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.refusal.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent} for more details. - # # Emitted when there is a partial refusal text. # - # @param content_index [Integer] The index of the content part that the refusal text is added to. + # @param content_index [Integer] + # The index of the content part that the refusal text is added to. # - # @param delta [String] The refusal text that is added. + # @param delta [String] + # The refusal text that is added. # - # @param item_id [String] The ID of the output item that the refusal text is added to. + # @param item_id [String] + # The ID of the output item that the refusal text is added to. # - # @param output_index [Integer] The index of the output item that the refusal text is added to. + # @param output_index [Integer] + # The index of the output item that the refusal text is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.refusal.delta"] The type of the event. Always `response.refusal.delta`. + # @param type [Symbol, :"response.refusal.delta"] + # The type of the event. Always `response.refusal.delta`. # @see OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -77,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_refusal_done_event.rb b/lib/openai/models/beta/beta_response_refusal_done_event.rb index 9b296b911..4d1564e60 100644 --- a/lib/openai/models/beta/beta_response_refusal_done_event.rb +++ b/lib/openai/models/beta/beta_response_refusal_done_event.rb @@ -47,24 +47,28 @@ class BetaResponseRefusalDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseRefusalDoneEvent::Agent }, nil?: true # @!method initialize(content_index:, item_id:, output_index:, refusal:, sequence_number:, agent: nil, type: :"response.refusal.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseRefusalDoneEvent} for more details. - # # Emitted when refusal text is finalized. # - # @param content_index [Integer] The index of the content part that the refusal text is finalized. + # @param content_index [Integer] + # The index of the content part that the refusal text is finalized. # - # @param item_id [String] The ID of the output item that the refusal text is finalized. + # @param item_id [String] + # The ID of the output item that the refusal text is finalized. # - # @param output_index [Integer] The index of the output item that the refusal text is finalized. + # @param output_index [Integer] + # The index of the output item that the refusal text is finalized. # - # @param refusal [String] The refusal text that is finalized. + # @param refusal [String] + # The refusal text that is finalized. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.refusal.done"] The type of the event. Always `response.refusal.done`. + # @param type [Symbol, :"response.refusal.done"] + # The type of the event. Always `response.refusal.done`. # @see OpenAI::Models::Beta::BetaResponseRefusalDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -77,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_shell_call_command_added_event.rb b/lib/openai/models/beta/beta_response_shell_call_command_added_event.rb index cbedc6712..1396fbd17 100644 --- a/lib/openai/models/beta/beta_response_shell_call_command_added_event.rb +++ b/lib/openai/models/beta/beta_response_shell_call_command_added_event.rb @@ -43,17 +43,23 @@ class BetaResponseShellCallCommandAddedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, command_index:, output_index:, sequence_number:, agent: nil, type: :"response.shell_call_command.added") # A streaming event that indicated a shell command was added to a tool call. # - # @param command [String] The shell command that was added. + # @param command [String] + # The shell command that was added. # - # @param command_index [Integer] The index of the shell command that was added. + # @param command_index [Integer] + # The index of the shell command that was added. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.shell_call_command.added"] The type of the event, always `response.shell_call_command.added`. + # @param type [Symbol, :"response.shell_call_command.added"] + # The type of the event, always `response.shell_call_command.added`. # @see OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -66,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_shell_call_command_delta_event.rb b/lib/openai/models/beta/beta_response_shell_call_command_delta_event.rb index 0e3e73d50..292b05301 100644 --- a/lib/openai/models/beta/beta_response_shell_call_command_delta_event.rb +++ b/lib/openai/models/beta/beta_response_shell_call_command_delta_event.rb @@ -49,19 +49,26 @@ class BetaResponseShellCallCommandDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command_index:, delta:, output_index:, sequence_number:, agent: nil, obfuscation: nil, type: :"response.shell_call_command.delta") # A streaming event that indicated a shell command was incrementally updated. # - # @param command_index [Integer] The index of the shell command that was updated. + # @param command_index [Integer] + # The index of the shell command that was updated. # - # @param delta [String] The shell command delta that was appended. + # @param delta [String] + # The shell command delta that was appended. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param obfuscation [String] An obfuscation string that was added to pad the event payload. + # @param obfuscation [String] + # An obfuscation string that was added to pad the event payload. # - # @param type [Symbol, :"response.shell_call_command.delta"] The type of the event, always `response.shell_call_command.delta`. + # @param type [Symbol, :"response.shell_call_command.delta"] + # The type of the event, always `response.shell_call_command.delta`. # @see OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -74,7 +81,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_shell_call_command_done_event.rb b/lib/openai/models/beta/beta_response_shell_call_command_done_event.rb index 32500107e..3bdb67d8b 100644 --- a/lib/openai/models/beta/beta_response_shell_call_command_done_event.rb +++ b/lib/openai/models/beta/beta_response_shell_call_command_done_event.rb @@ -43,17 +43,23 @@ class BetaResponseShellCallCommandDoneEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, command_index:, output_index:, sequence_number:, agent: nil, type: :"response.shell_call_command.done") # A streaming event that indicated a shell command was completed. # - # @param command [String] The final shell command that was emitted. + # @param command [String] + # The final shell command that was emitted. # - # @param command_index [Integer] The index of the shell command that was completed. + # @param command_index [Integer] + # The index of the shell command that was completed. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.shell_call_command.done"] The type of the event, always `response.shell_call_command.done`. + # @param type [Symbol, :"response.shell_call_command.done"] + # The type of the event, always `response.shell_call_command.done`. # @see OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -66,7 +72,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_shell_call_output_content_delta_event.rb b/lib/openai/models/beta/beta_response_shell_call_output_content_delta_event.rb index 0a2da8a63..81387f617 100644 --- a/lib/openai/models/beta/beta_response_shell_call_output_content_delta_event.rb +++ b/lib/openai/models/beta/beta_response_shell_call_output_content_delta_event.rb @@ -49,19 +49,26 @@ class BetaResponseShellCallOutputContentDeltaEvent < OpenAI::Internal::Type::Bas # @!method initialize(command_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.shell_call_output_content.delta") # A streaming event that indicated shell call output was incrementally added. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param delta [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Delta] The stdout/stderr delta that was emitted. + # @param delta [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Delta] + # The stdout/stderr delta that was emitted. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.shell_call_output_content.delta"] The type of the event, always `response.shell_call_output_content.delta`. + # @param type [Symbol, :"response.shell_call_output_content.delta"] + # The type of the event, always `response.shell_call_output_content.delta`. # @see OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent#delta class Delta < OpenAI::Internal::Type::BaseModel @@ -80,9 +87,11 @@ class Delta < OpenAI::Internal::Type::BaseModel # @!method initialize(stderr: nil, stdout: nil) # The stdout/stderr delta that was emitted. # - # @param stderr [String] The stderr delta that was emitted. + # @param stderr [String] + # The stderr delta that was emitted. # - # @param stdout [String] The stdout delta that was emitted. + # @param stdout [String] + # The stdout delta that was emitted. end # @see OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent#agent @@ -96,7 +105,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb b/lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb index f3f9f1c70..17def64c6 100644 --- a/lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb +++ b/lib/openai/models/beta/beta_response_shell_call_output_content_done_event.rb @@ -52,20 +52,26 @@ class BetaResponseShellCallOutputContentDoneEvent < OpenAI::Internal::Type::Base # @!method initialize(command_index:, item_id:, output:, output_index:, sequence_number:, agent: nil, type: :"response.shell_call_output_content.done") # A streaming event that indicated shell call output was completed. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output [Array] The output contents emitted for the shell command. + # @param output [Array] + # The output contents emitted for the shell command. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.shell_call_output_content.done"] The type of the event, always `response.shell_call_output_content.done`. - + # @param type [Symbol, :"response.shell_call_output_content.done"] + # The type of the event, always `response.shell_call_output_content.done`. class Output < OpenAI::Internal::Type::BaseModel # @!attribute outcome # Represents either an exit outcome (with an exit code) or a timeout outcome for a @@ -96,19 +102,20 @@ class Output < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(outcome:, stderr:, stdout:, created_by: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output} for - # more details. - # # The content of a shell tool call output that was emitted. # - # @param outcome [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Exit] Represents either an exit outcome (with an exit code) or a timeout outcome for a + # @param outcome [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Timeout, OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Output::Outcome::Exit] + # Represents either an exit outcome (with an exit code) or a timeout outcome for a + # shell call output chunk. # - # @param stderr [String] The standard error output that was captured. + # @param stderr [String] + # The standard error output that was captured. # - # @param stdout [String] The standard output that was captured. + # @param stdout [String] + # The standard output that was captured. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # Represents either an exit outcome (with an exit code) or a timeout outcome for a # shell call output chunk. @@ -138,7 +145,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -157,9 +165,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] Exit code from the shell process. + # @param exit_code [Integer] + # Exit code from the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants @@ -178,7 +188,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_steer_accepted_event.rb b/lib/openai/models/beta/beta_response_steer_accepted_event.rb index a8daa7625..9ec81f1a5 100644 --- a/lib/openai/models/beta/beta_response_steer_accepted_event.rb +++ b/lib/openai/models/beta/beta_response_steer_accepted_event.rb @@ -30,9 +30,6 @@ class BetaResponseSteerAcceptedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(sequence_number:, steer:, stream_id: nil, type: :"response.steer.accepted") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerAcceptedEvent} for more details. - # # Emitted when steering input has been validated and queued. Acceptance means the # server owns the input, not that it has been applied. The successor's # `response.created` event is the commit point. If accepted input cannot be @@ -44,13 +41,18 @@ class BetaResponseSteerAcceptedEvent < OpenAI::Internal::Type::BaseModel # results and send one matching explicit `response.create` per parent. Do not # resend accepted input while it is still queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Beta::BetaResponseSteerAcceptedEvent::Steer] The accepted steering submission. + # @param steer [OpenAI::Models::Beta::BetaResponseSteerAcceptedEvent::Steer] + # The accepted steering submission. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # target response's `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.accepted"] The event discriminator. Always `response.steer.accepted`. + # @param type [Symbol, :"response.steer.accepted"] + # The event discriminator. Always `response.steer.accepted`. # @see OpenAI::Models::Beta::BetaResponseSteerAcceptedEvent#steer class Steer < OpenAI::Internal::Type::BaseModel @@ -69,9 +71,11 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, previous_response_id:) # The accepted steering submission. # - # @param id [String] The ID assigned to the steering submission. + # @param id [String] + # The ID assigned to the steering submission. # - # @param previous_response_id [String] The ID of the response being steered. + # @param previous_response_id [String] + # The ID of the response being steered. end end end diff --git a/lib/openai/models/beta/beta_response_steer_event.rb b/lib/openai/models/beta/beta_response_steer_event.rb index b8e20fbb5..4a6d17202 100644 --- a/lib/openai/models/beta/beta_response_steer_event.rb +++ b/lib/openai/models/beta/beta_response_steer_event.rb @@ -31,9 +31,6 @@ class BetaResponseSteerEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.steer" # @!method initialize(input:, previous_response_id:, type: :"response.steer") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerEvent} for more details. - # # Queues user input to steer a response on this WebSocket connection. Input can # contain text, images, and files. Steering is supported only for single-agent # responses on models and execution modes that support steering. Responses bound @@ -62,11 +59,22 @@ class BetaResponseSteerEvent < OpenAI::Internal::Type::BaseModel # This event accepts only `type`, `previous_response_id`, and `input`. Do not send # `stream_id`; the target response determines the WebSocket lane. # - # @param input [String, ArrayObject}>] Input to queue for a continuation of the response. Uses the same string or + # @param input [String, ArrayObject}>] + # Input to queue for a continuation of the response. Uses the same string or + # input-item shape as `response.create.input`, with a non-empty array when + # supplying input items. + # + # Steering accepts only messages with the `user` role. Each message may contain + # only `type`, `role`, and `content`, with `content` as a string or an array of + # `input_text`, `input_image`, and `input_file` parts. The optional `type` must be + # `message`. Other roles, tool outputs, and item types are not supported for + # steering. # - # @param previous_response_id [String] The ID of the response to steer on this WebSocket connection. + # @param previous_response_id [String] + # The ID of the response to steer on this WebSocket connection. # - # @param type [Symbol, :"response.steer"] The event discriminator. Always `response.steer`. + # @param type [Symbol, :"response.steer"] + # The event discriminator. Always `response.steer`. end end diff --git a/lib/openai/models/beta/beta_response_steer_failed_event.rb b/lib/openai/models/beta/beta_response_steer_failed_event.rb index ba7249876..a3054eb23 100644 --- a/lib/openai/models/beta/beta_response_steer_failed_event.rb +++ b/lib/openai/models/beta/beta_response_steer_failed_event.rb @@ -36,9 +36,6 @@ class BetaResponseSteerFailedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(error:, sequence_number:, steer:, stream_id: nil, type: :"response.steer.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerFailedEvent} for more details. - # # Emitted when steering input is rejected or cannot be committed to a successor # response. Returns the original, uncommitted input so the client can carry it # into `response.create` when appropriate. Invalid input must be corrected before @@ -48,15 +45,21 @@ class BetaResponseSteerFailedEvent < OpenAI::Internal::Type::BaseModel # allocated omit `steer.id`. A lost connection or missing acknowledgement leaves # the outcome unknown; it is not proof that the input was rejected. # - # @param error [OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Error] Information about why the input could not be committed. + # @param error [OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Error] + # Information about why the input could not be committed. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Steer] The steering submission that could not be committed. + # @param steer [OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Steer] + # The steering submission that could not be committed. # - # @param stream_id [String] The WebSocket lane that emitted this event, when the target response is + # @param stream_id [String] + # The WebSocket lane that emitted this event, when the target response is + # available and its `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.failed"] The event discriminator. Always `response.steer.failed`. + # @param type [Symbol, :"response.steer.failed"] + # The event discriminator. Always `response.steer.failed`. # @see OpenAI::Models::Beta::BetaResponseSteerFailedEvent#error class Error < OpenAI::Internal::Type::BaseModel @@ -91,16 +94,28 @@ class Error < OpenAI::Internal::Type::BaseModel required :type, const: :invalid_request_error # @!method initialize(code:, message:, type: :invalid_request_error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Error} for more details. - # # Information about why the input could not be committed. # - # @param code [Symbol, String, OpenAI::Models::Beta::BetaResponseSteerErrorCode] A machine-readable steering error code. Clients should handle unknown - # - # @param message [String] A human-readable description of the error. - # - # @param type [Symbol, :invalid_request_error] The error type. Always `invalid_request_error`. + # @param code [Symbol, String, OpenAI::Models::Beta::BetaResponseSteerErrorCode] + # A machine-readable steering error code. Clients should handle unknown values + # because additional codes may be introduced. Known values include: + # + # - `response_not_found`: The target response is not available on this connection. + # - `invalid_input`: The event or input failed validation. + # - `steering_not_supported`: The model or response execution mode does not + # support steering. + # - `too_many_pending_steers`: Too much steering input is pending for the + # response. + # - `response_already_completed`: The response completed and is no longer + # accepting steering input. + # - `response_not_active`: The response is no longer accepting steering input. + # - `successor_creation_failed`: The successor response could not be created. + # + # @param message [String] + # A human-readable description of the error. + # + # @param type [Symbol, :invalid_request_error] + # The error type. Always `invalid_request_error`. end # @see OpenAI::Models::Beta::BetaResponseSteerFailedEvent#steer @@ -132,16 +147,24 @@ class Steer < OpenAI::Internal::Type::BaseModel optional :id, String # @!method initialize(input:, previous_response_id:, id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerFailedEvent::Steer} for more details. - # # The steering submission that could not be committed. # - # @param input [String, ArrayObject}>] Input to queue for a continuation of the response. Uses the same string or + # @param input [String, ArrayObject}>] + # Input to queue for a continuation of the response. Uses the same string or + # input-item shape as `response.create.input`, with a non-empty array when + # supplying input items. + # + # Steering accepts only messages with the `user` role. Each message may contain + # only `type`, `role`, and `content`, with `content` as a string or an array of + # `input_text`, `input_image`, and `input_file` parts. The optional `type` must be + # `message`. Other roles, tool outputs, and item types are not supported for + # steering. # - # @param previous_response_id [String] The ID of the response that was targeted for steering. + # @param previous_response_id [String] + # The ID of the response that was targeted for steering. # - # @param id [String] The ID assigned to the steering submission, if one was allocated. + # @param id [String] + # The ID assigned to the steering submission, if one was allocated. end end end diff --git a/lib/openai/models/beta/beta_response_steer_input.rb b/lib/openai/models/beta/beta_response_steer_input.rb index 994cfc547..58ef0b57e 100644 --- a/lib/openai/models/beta/beta_response_steer_input.rb +++ b/lib/openai/models/beta/beta_response_steer_input.rb @@ -80,17 +80,23 @@ class Message < OpenAI::Internal::Type::BaseModel optional :status, String, nil?: true # @!method initialize(content:, id: nil, agent: nil, status: nil, role: :user, type: :message) - # @param content [Array, String] The message content, as an array of content parts. + # @param content [Array, String] + # The message content, as an array of content parts. # - # @param id [String, nil] The unique ID of this message item. + # @param id [String, nil] + # The unique ID of this message item. # - # @param agent [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::Message::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::Message::Agent, nil] + # The agent that produced this item. # - # @param status [String, nil] The status of the message item. + # @param status [String, nil] + # The status of the message item. # - # @param role [Symbol, :user] The message role. Always `user`. + # @param role [Symbol, :user] + # The message role. Always `user`. # - # @param type [Symbol, :message] The item type. Always `message`. + # @param type [Symbol, :message] + # The item type. Always `message`. # The message content, as an array of content parts. # @@ -127,7 +133,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end @@ -213,29 +220,36 @@ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(output:, id: nil, agent: nil, call_id: nil, caller_: nil, name: nil, namespace: nil, status: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput} - # for more details. - # # The output of a function tool call. # - # @param output [String, Array] Text, image, or file output of the function tool call. + # @param output [String, Array] + # Text, image, or file output of the function tool call. # - # @param id [String, nil] The unique ID of the function tool call output. Populated when this item is retu + # @param id [String, nil] + # The unique ID of the function tool call output. Populated when this item is + # returned via API. # - # @param agent [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Agent, nil] + # The agent that produced this item. # - # @param call_id [String, nil] The unique ID of the function tool call generated by the model. + # @param call_id [String, nil] + # The unique ID of the function tool call generated by the model. # - # @param caller_ [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Direct, OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param name [String, nil] The name of the tool that produced the output. + # @param name [String, nil] + # The name of the tool that produced the output. # - # @param namespace [String, nil] The namespace of the tool that produced the output. + # @param namespace [String, nil] + # The namespace of the tool that produced the output. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. Popu + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # Text, image, or file output of the function tool call. # @@ -264,7 +278,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # The execution context that produced this tool call. @@ -297,7 +312,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -314,9 +330,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_response_steer_input_content.rb b/lib/openai/models/beta/beta_response_steer_input_content.rb index 0bfebf976..84f68e831 100644 --- a/lib/openai/models/beta/beta_response_steer_input_content.rb +++ b/lib/openai/models/beta/beta_response_steer_input_content.rb @@ -12,7 +12,7 @@ module BetaResponseSteerInputContent # A text input to the model. variant :input_text, -> { OpenAI::Beta::BetaResponseInputTextContent } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) variant :input_image, -> { OpenAI::Beta::BetaResponseInputImageContent } # A file input to the model. diff --git a/lib/openai/models/beta/beta_response_steer_pending_event.rb b/lib/openai/models/beta/beta_response_steer_pending_event.rb index 75449ca38..e59c65a85 100644 --- a/lib/openai/models/beta/beta_response_steer_pending_event.rb +++ b/lib/openai/models/beta/beta_response_steer_pending_event.rb @@ -52,9 +52,6 @@ class BetaResponseSteerPendingEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(reason:, required_input:, sequence_number:, steer:, stream_id: nil, type: :"response.steer.pending") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseSteerPendingEvent} for more details. - # # Emitted when accepted steering input remains queued after the target response # completes. The server still owns the input. Do not resend it. The successor's # `response.created` event is the commit point. @@ -72,17 +69,31 @@ class BetaResponseSteerPendingEvent < OpenAI::Internal::Type::BaseModel # submissions for the same parent can report the same required inputs; they do not # each require a separate continuation. # - # @param reason [Symbol, :waiting_for_required_input, String] An extensible enum describing why accepted steering input is still queued. + # @param reason [Symbol, :waiting_for_required_input, String] + # An extensible enum describing why accepted steering input is still queued. + # Clients should handle unknown values because additional reasons may be + # introduced. Known values include: + # + # - `waiting_for_required_input`: The response is waiting for the tool results or + # approval decisions identified by `required_input`. # - # @param required_input [Array] Input stubs identifying outstanding client-owned tool results or + # @param required_input [Array] + # Input stubs identifying outstanding client-owned tool results or approval + # decisions. Each stub contains identifying fields only; the client supplies the + # result before including it in `response.create`. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Beta::BetaResponseSteerPendingEvent::Steer] The steering submission that remains queued. + # @param steer [OpenAI::Models::Beta::BetaResponseSteerPendingEvent::Steer] + # The steering submission that remains queued. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # target response's `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.pending"] The event discriminator. Always `response.steer.pending`. + # @param type [Symbol, :"response.steer.pending"] + # The event discriminator. Always `response.steer.pending`. # @see OpenAI::Models::Beta::BetaResponseSteerPendingEvent#steer class Steer < OpenAI::Internal::Type::BaseModel @@ -101,9 +112,11 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, previous_response_id:) # The steering submission that remains queued. # - # @param id [String] The ID assigned to the steering submission. + # @param id [String] + # The ID assigned to the steering submission. # - # @param previous_response_id [String] The ID of the response being steered. + # @param previous_response_id [String] + # The ID of the response being steered. end end end diff --git a/lib/openai/models/beta/beta_response_text_config.rb b/lib/openai/models/beta/beta_response_text_config.rb index 574e3f002..4b52a86ac 100644 --- a/lib/openai/models/beta/beta_response_text_config.rb +++ b/lib/openai/models/beta/beta_response_text_config.rb @@ -9,7 +9,7 @@ class BetaResponseTextConfig < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -32,18 +32,32 @@ class BetaResponseTextConfig < OpenAI::Internal::Type::BaseModel optional :verbosity, enum: -> { OpenAI::Beta::BetaResponseTextConfig::Verbosity }, nil?: true # @!method initialize(format_: nil, verbosity: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseTextConfig} for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::Beta::BetaResponseFormatTextConfig::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig, OpenAI::Models::Beta::BetaResponseFormatTextConfig::JSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::Beta::BetaResponseFormatTextConfig::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig, OpenAI::Models::Beta::BetaResponseFormatTextConfig::JSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. # - # @param verbosity [Symbol, OpenAI::Models::Beta::BetaResponseTextConfig::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in + # @param verbosity [Symbol, OpenAI::Models::Beta::BetaResponseTextConfig::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose diff --git a/lib/openai/models/beta/beta_response_text_delta_event.rb b/lib/openai/models/beta/beta_response_text_delta_event.rb index c16c10bc0..5ebd23619 100644 --- a/lib/openai/models/beta/beta_response_text_delta_event.rb +++ b/lib/openai/models/beta/beta_response_text_delta_event.rb @@ -56,27 +56,31 @@ class BetaResponseTextDeltaEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseTextDeltaEvent::Agent }, nil?: true # @!method initialize(content_index:, delta:, item_id:, logprobs:, output_index:, sequence_number:, agent: nil, type: :"response.output_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseTextDeltaEvent} for more details. - # # Emitted when there is an additional text delta. # - # @param content_index [Integer] The index of the content part that the text delta was added to. + # @param content_index [Integer] + # The index of the content part that the text delta was added to. # - # @param delta [String] The text delta that was added. + # @param delta [String] + # The text delta that was added. # - # @param item_id [String] The ID of the output item that the text delta was added to. + # @param item_id [String] + # The ID of the output item that the text delta was added to. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text delta was added to. + # @param output_index [Integer] + # The index of the output item that the text delta was added to. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.output_text.delta"] The type of the event. Always `response.output_text.delta`. - + # @param type [Symbol, :"response.output_text.delta"] + # The type of the event. Always `response.output_text.delta`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -100,19 +104,18 @@ class Logprob < OpenAI::Internal::Type::BaseModel ) # @!method initialize(token:, logprob:, top_logprobs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseTextDeltaEvent::Logprob} for more details. - # # A logprob is the logarithmic probability that the model assigns to producing a # particular token at a given position in the sequence. Less-negative (higher) # logprob values indicate greater model confidence in that token choice. # - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. # - # @param top_logprobs [Array] The log probabilities of up to 20 of the most likely tokens. - + # @param top_logprobs [Array] + # The log probabilities of up to 20 of the most likely tokens. class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -127,9 +130,11 @@ class TopLogprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, logprob: nil) - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. end end @@ -144,7 +149,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_text_done_event.rb b/lib/openai/models/beta/beta_response_text_done_event.rb index d134a741d..3e6d93f03 100644 --- a/lib/openai/models/beta/beta_response_text_done_event.rb +++ b/lib/openai/models/beta/beta_response_text_done_event.rb @@ -56,27 +56,31 @@ class BetaResponseTextDoneEvent < OpenAI::Internal::Type::BaseModel optional :agent, -> { OpenAI::Beta::BetaResponseTextDoneEvent::Agent }, nil?: true # @!method initialize(content_index:, item_id:, logprobs:, output_index:, sequence_number:, text:, agent: nil, type: :"response.output_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseTextDoneEvent} for more details. - # # Emitted when text content is finalized. # - # @param content_index [Integer] The index of the content part that the text content is finalized. + # @param content_index [Integer] + # The index of the content part that the text content is finalized. # - # @param item_id [String] The ID of the output item that the text content is finalized. + # @param item_id [String] + # The ID of the output item that the text content is finalized. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text content is finalized. + # @param output_index [Integer] + # The index of the output item that the text content is finalized. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param text [String] The text content that is finalized. + # @param text [String] + # The text content that is finalized. # - # @param agent [OpenAI::Models::Beta::BetaResponseTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.output_text.done"] The type of the event. Always `response.output_text.done`. - + # @param type [Symbol, :"response.output_text.done"] + # The type of the event. Always `response.output_text.done`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -100,19 +104,18 @@ class Logprob < OpenAI::Internal::Type::BaseModel ) # @!method initialize(token:, logprob:, top_logprobs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseTextDoneEvent::Logprob} for more details. - # # A logprob is the logarithmic probability that the model assigns to producing a # particular token at a given position in the sequence. Less-negative (higher) # logprob values indicate greater model confidence in that token choice. # - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. # - # @param top_logprobs [Array] The log probabilities of up to 20 of the most likely tokens. - + # @param top_logprobs [Array] + # The log probabilities of up to 20 of the most likely tokens. class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -127,9 +130,11 @@ class TopLogprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, logprob: nil) - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. end end @@ -144,7 +149,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_tool_search_call.rb b/lib/openai/models/beta/beta_response_tool_search_call.rb index d3e33d148..292a008bc 100644 --- a/lib/openai/models/beta/beta_response_tool_search_call.rb +++ b/lib/openai/models/beta/beta_response_tool_search_call.rb @@ -53,21 +53,29 @@ class BetaResponseToolSearchCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, arguments:, call_id:, execution:, status:, agent: nil, created_by: nil, type: :tool_search_call) - # @param id [String] The unique ID of the tool search call item. + # @param id [String] + # The unique ID of the tool search call item. # - # @param arguments [Object] Arguments used for the tool search call. + # @param arguments [Object] + # Arguments used for the tool search call. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchCall::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchCall::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchCall::Status] The status of the tool search call item that was recorded. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchCall::Status] + # The status of the tool search call item that was recorded. # - # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchCall::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchCall::Agent] + # The agent that produced this item. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :tool_search_call] The type of the item. Always `tool_search_call`. + # @param type [Symbol, :tool_search_call] + # The type of the item. Always `tool_search_call`. # Whether tool search was executed by the server or by the client. # @@ -107,7 +115,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_tool_search_output_item.rb b/lib/openai/models/beta/beta_response_tool_search_output_item.rb index 807cb46e8..0265f1a01 100644 --- a/lib/openai/models/beta/beta_response_tool_search_output_item.rb +++ b/lib/openai/models/beta/beta_response_tool_search_output_item.rb @@ -53,21 +53,29 @@ class BetaResponseToolSearchOutputItem < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, execution:, status:, tools:, agent: nil, created_by: nil, type: :tool_search_output) - # @param id [String] The unique ID of the tool search output item. + # @param id [String] + # The unique ID of the tool search output item. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Status] The status of the tool search output item that was recorded. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Status] + # The status of the tool search output item that was recorded. # - # @param tools [Array] The loaded tool definitions returned by tool search. + # @param tools [Array] + # The loaded tool definitions returned by tool search. # - # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Agent] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchOutputItem::Agent] + # The agent that produced this item. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :tool_search_output] The type of the item. Always `tool_search_output`. + # @param type [Symbol, :tool_search_output] + # The type of the item. Always `tool_search_output`. # Whether tool search was executed by the server or by the client. # @@ -107,7 +115,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb b/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb index 263c7992f..586ab2dc9 100644 --- a/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +++ b/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb @@ -47,19 +47,26 @@ class BetaResponseToolSearchOutputItemParam < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Status }, nil?: true # @!method initialize(tools:, id: nil, agent: nil, call_id: nil, execution: nil, status: nil, type: :tool_search_output) - # @param tools [Array] The loaded tool definitions returned by the tool search output. + # @param tools [Array] + # The loaded tool definitions returned by the tool search output. # - # @param id [String, nil] The unique ID of this tool search output. + # @param id [String, nil] + # The unique ID of this tool search output. # - # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Agent, nil] The agent that produced this item. + # @param agent [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Agent, nil] + # The agent that produced this item. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Status, nil] The status of the tool search output. + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Status, nil] + # The status of the tool search output. # - # @param type [Symbol, :tool_search_output] The item type. Always `tool_search_output`. + # @param type [Symbol, :tool_search_output] + # The item type. Always `tool_search_output`. # @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -72,7 +79,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that produced this item. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end # Whether tool search was executed by the server or by the client. diff --git a/lib/openai/models/beta/beta_response_usage.rb b/lib/openai/models/beta/beta_response_usage.rb index 1314cf49a..1ef3f2b31 100644 --- a/lib/openai/models/beta/beta_response_usage.rb +++ b/lib/openai/models/beta/beta_response_usage.rb @@ -38,15 +38,20 @@ class BetaResponseUsage < OpenAI::Internal::Type::BaseModel # Represents token usage details including input tokens, output tokens, a # breakdown of output tokens, and the total tokens used. # - # @param input_tokens [Integer] The number of input tokens. + # @param input_tokens [Integer] + # The number of input tokens. # - # @param input_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails] A detailed breakdown of the input tokens. + # @param input_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails] + # A detailed breakdown of the input tokens. # - # @param output_tokens [Integer] The number of output tokens. + # @param output_tokens [Integer] + # The number of output tokens. # - # @param output_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::OutputTokensDetails] A detailed breakdown of the output tokens. + # @param output_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::OutputTokensDetails] + # A detailed breakdown of the output tokens. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. # @see OpenAI::Models::Beta::BetaResponseUsage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel @@ -58,20 +63,20 @@ class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!attribute cached_tokens # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [Integer] required :cached_tokens, Integer # @!method initialize(cache_write_tokens:, cached_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails} for more details. - # # A detailed breakdown of the input tokens. # - # @param cache_write_tokens [Integer] The number of input tokens that were written to the cache. + # @param cache_write_tokens [Integer] + # The number of input tokens that were written to the cache. # - # @param cached_tokens [Integer] The number of tokens that were retrieved from the cache. + # @param cached_tokens [Integer] + # The number of tokens that were retrieved from the cache. + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). end # @see OpenAI::Models::Beta::BetaResponseUsage#output_tokens_details @@ -85,7 +90,8 @@ class OutputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(reasoning_tokens:) # A detailed breakdown of the output tokens. # - # @param reasoning_tokens [Integer] The number of reasoning tokens. + # @param reasoning_tokens [Integer] + # The number of reasoning tokens. end end end diff --git a/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb b/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb index 0841dc2a5..22474491a 100644 --- a/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb +++ b/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb @@ -35,21 +35,22 @@ class BetaResponseWebSearchCallCompletedEvent < OpenAI::Internal::Type::BaseMode optional :agent, -> { OpenAI::Beta::BetaResponseWebSearchCallCompletedEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.web_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent} for more - # details. - # # Emitted when a web search call is completed. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.web_search_call.completed"] The type of the event. Always `response.web_search_call.completed`. + # @param type [Symbol, :"response.web_search_call.completed"] + # The type of the event. Always `response.web_search_call.completed`. # @see OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb b/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb index a91c73878..662c50616 100644 --- a/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb +++ b/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb @@ -35,21 +35,22 @@ class BetaResponseWebSearchCallInProgressEvent < OpenAI::Internal::Type::BaseMod optional :agent, -> { OpenAI::Beta::BetaResponseWebSearchCallInProgressEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.web_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent} for more - # details. - # # Emitted when a web search call is initiated. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.web_search_call.in_progress"] The type of the event. Always `response.web_search_call.in_progress`. + # @param type [Symbol, :"response.web_search_call.in_progress"] + # The type of the event. Always `response.web_search_call.in_progress`. # @see OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb b/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb index 043fd3073..5a3644504 100644 --- a/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb +++ b/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb @@ -35,21 +35,22 @@ class BetaResponseWebSearchCallSearchingEvent < OpenAI::Internal::Type::BaseMode optional :agent, -> { OpenAI::Beta::BetaResponseWebSearchCallSearchingEvent::Agent }, nil?: true # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, type: :"response.web_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent} for more - # details. - # # Emitted when a web search call is executing. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param type [Symbol, :"response.web_search_call.searching"] The type of the event. Always `response.web_search_call.searching`. + # @param type [Symbol, :"response.web_search_call.searching"] + # The type of the event. Always `response.web_search_call.searching`. # @see OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent#agent class Agent < OpenAI::Internal::Type::BaseModel @@ -62,7 +63,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end end diff --git a/lib/openai/models/beta/beta_responses_client_event.rb b/lib/openai/models/beta/beta_responses_client_event.rb index c140bf310..bbcb357f7 100644 --- a/lib/openai/models/beta/beta_responses_client_event.rb +++ b/lib/openai/models/beta/beta_responses_client_event.rb @@ -63,7 +63,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -125,11 +125,11 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @return [String, Array, nil] optional :input, union: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input } @@ -147,7 +147,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -176,8 +176,8 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [Symbol, String, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model, nil] optional :model, union: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model } @@ -211,7 +211,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -219,7 +219,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Beta::BetaResponsePrompt, nil] optional :prompt, -> { OpenAI::Beta::BetaResponsePrompt }, nil?: true @@ -227,7 +227,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -240,7 +240,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions, nil] @@ -257,7 +257,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -279,7 +279,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] optional( @@ -296,7 +296,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -309,13 +309,15 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -338,7 +340,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). # # @return [Boolean, nil] optional :store, OpenAI::Internal::Type::Boolean, nil?: true @@ -348,7 +350,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. # # @return [Boolean, nil] @@ -387,8 +389,8 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Beta::BetaResponseTextConfig, nil] optional :text, -> { OpenAI::Beta::BetaResponseTextConfig } @@ -409,17 +411,18 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array, nil] @@ -468,16 +471,12 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate} for more - # details. - # # Client event for creating a response over a persistent WebSocket connection. # This payload uses the same top-level fields as `POST /v1/responses`, plus # WebSocket-only envelope metadata. @@ -488,74 +487,271 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # - `background` is not supported over WebSocket. # - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`. # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [Symbol, String, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param multi_agent [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent, nil] Configuration for server-hosted multi-agent execution. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream [Boolean, nil] If set to true, the model response data will be streamed to the client - # - # @param stream_id [String] The WebSocket lane for this response. Requests with the same - # - # @param stream_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param type [Symbol, :"response.create"] The type of the client event. Always `response.create`. - + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [Symbol, String, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param multi_agent [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent, nil] + # Configuration for server-hosted multi-agent execution. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream [Boolean, nil] + # If set to true, the model response data will be streamed to the client as it is + # generated using + # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). + # See the + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) + # for more information. + # + # @param stream_id [String] + # The WebSocket lane for this response. Requests with the same `stream_id` are + # processed FIFO, and events for the response echo the same `stream_id`. + # + # `stream_id` controls routing; `previous_response_id` controls conversation + # lineage, so a new lane can fork from a response created on another lane. + # + # @param stream_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param type [Symbol, :"response.create"] + # The type of the client event. Always `response.create`. class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. @@ -570,9 +766,11 @@ class ContextManagement < OpenAI::Internal::Type::BaseModel optional :compact_threshold, Integer, nil?: true # @!method initialize(type:, compact_threshold: nil) - # @param type [String] The context management entry type. Currently only 'compaction' is supported. + # @param type [String] + # The context management entry type. Currently only 'compaction' is supported. # - # @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry. + # @param compact_threshold [Integer, nil] + # Token threshold at which compaction should be triggered for this entry. end # The conversation that this response belongs to. Items from this conversation are @@ -598,11 +796,11 @@ module Conversation # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#input module Input @@ -623,8 +821,8 @@ module Input # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#model module Model @@ -1150,15 +1348,14 @@ class Moderation < OpenAI::Internal::Type::BaseModel ) # @!method initialize(model:, policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation} for - # more details. - # # Configuration for running moderation on the input and output of this response. # - # @param model [String] The moderation model to use for moderated completions, e.g. 'omni-moderation-lat + # @param model [String] + # The moderation model to use for moderated completions, e.g. + # 'omni-moderation-latest'. # - # @param policy [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy, nil] The policy to apply to moderated response input and output. + # @param policy [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy, nil] + # The policy to apply to moderated response input and output. # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation#policy class Policy < OpenAI::Internal::Type::BaseModel @@ -1189,9 +1386,11 @@ class Policy < OpenAI::Internal::Type::BaseModel # @!method initialize(input: nil, output: nil) # The policy to apply to moderated response input and output. # - # @param input [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input, nil] The moderation policy for the response input. + # @param input [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input, nil] + # The moderation policy for the response input. # - # @param output [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output, nil] The moderation policy for the response output. + # @param output [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output, nil] + # The moderation policy for the response output. # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy#input class Input < OpenAI::Internal::Type::BaseModel @@ -1269,15 +1468,18 @@ class MultiAgent < OpenAI::Internal::Type::BaseModel optional :max_concurrent_subagents, Integer # @!method initialize(enabled:, max_concurrent_subagents: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent} for - # more details. - # # Configuration for server-hosted multi-agent execution. # - # @param enabled [Boolean] Whether to enable server-hosted multi-agent execution for this response. + # @param enabled [Boolean] + # Whether to enable server-hosted multi-agent execution for this response. # - # @param max_concurrent_subagents [Integer] `max_concurrent_subagents` sets the maximum number of subagents that can be acti + # @param max_concurrent_subagents [Integer] + # `max_concurrent_subagents` sets the maximum number of subagents that can be + # active simultaneously across the entire agent tree. It includes all + # descendants—children, grandchildren, and deeper subagents—but excludes the root + # agent. The API does not impose a fixed upper bound on this setting. The default + # is `3`, which is recommended for most workloads. Multi-agent runs also have no + # fixed limit on tree depth or the total number of subagents created during a run. end # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#prompt_cache_options @@ -1315,10 +1517,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel ) # @!method initialize(comparison_response_id: nil, mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions} - # for more details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -1326,14 +1524,25 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param comparison_response_id [String, nil] The ID of a response to compare when diagnosing prompt cache reuse. Supplying th + # @param comparison_response_id [String, nil] + # The ID of a response to compare when diagnosing prompt cache reuse. Supplying + # this field requests prompt cache diagnostics when the feature is enabled. # - # @param mode [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -1375,7 +1584,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1421,7 +1630,7 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort, nil] @@ -1473,22 +1682,44 @@ class Reasoning < OpenAI::Internal::Type::BaseModel ) # @!method initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning} for - # more details. - # # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # - # @param context [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns. + # @param context [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context, nil] + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. # - # @param effort [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # When returned on a response, this is the effective reasoning context mode used + # for the response. # - # @param generate_summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead. + # @param effort [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param mode [String, Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode] Controls the reasoning execution mode for the request. + # @param generate_summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary, nil] + # **Deprecated:** use `summary` instead. # - # @param summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. + # + # @param mode [String, Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode] + # Controls the reasoning execution mode for the request. + # + # When returned on a response, this is the effective execution mode. + # + # @param summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary, nil] + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. + # + # `concise` is supported for `computer-use-preview` models and all reasoning + # models after `gpt-5`. # Controls which reasoning items are rendered back to the model on later turns. If # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` @@ -1513,7 +1744,7 @@ module Context # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning#effort @@ -1614,13 +1845,15 @@ module Summary # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -1662,13 +1895,15 @@ class StreamOptions < OpenAI::Internal::Type::BaseModel optional :include_obfuscation, OpenAI::Internal::Type::Boolean # @!method initialize(include_obfuscation: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions} - # for more details. - # # Options for streaming responses. Only set this when you set `stream: true`. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. end # How the model should select which tool (or tools) to use when generating a @@ -1693,7 +1928,7 @@ module ToolChoice variant -> { OpenAI::Beta::BetaToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Beta::BetaToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -1725,7 +1960,8 @@ class BetaSpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseMod required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_responses_server_event.rb b/lib/openai/models/beta/beta_responses_server_event.rb index 04176539b..1bc6f5e1e 100644 --- a/lib/openai/models/beta/beta_responses_server_event.rb +++ b/lib/openai/models/beta/beta_responses_server_event.rb @@ -389,21 +389,23 @@ class BetaResponseAudioWsDelta < OpenAI::Models::Beta::BetaResponseAudioDeltaEve optional :stream_id, String # @!method initialize(delta:, sequence_number:, agent: nil, stream_id: nil, type: :"response.audio.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseAudioWsDelta} for - # more details. - # # Emitted when there is a partial audio response. # - # @param delta [String] A chunk of Base64 encoded response audio bytes. + # @param delta [String] + # A chunk of Base64 encoded response audio bytes. # - # @param sequence_number [Integer] A sequence number for this chunk of the stream response. + # @param sequence_number [Integer] + # A sequence number for this chunk of the stream response. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.delta"] The type of the event. Always `response.audio.delta`. + # @param type [Symbol, :"response.audio.delta"] + # The type of the event. Always `response.audio.delta`. end class BetaResponseAudioWsDone < OpenAI::Models::Beta::BetaResponseAudioDoneEvent @@ -415,19 +417,20 @@ class BetaResponseAudioWsDone < OpenAI::Models::Beta::BetaResponseAudioDoneEvent optional :stream_id, String # @!method initialize(sequence_number:, agent: nil, stream_id: nil, type: :"response.audio.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseAudioWsDone} for - # more details. - # # Emitted when the audio response is complete. # - # @param sequence_number [Integer] The sequence number of the delta. + # @param sequence_number [Integer] + # The sequence number of the delta. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.done"] The type of the event. Always `response.audio.done`. + # @param type [Symbol, :"response.audio.done"] + # The type of the event. Always `response.audio.done`. end class BetaResponseAudioTranscriptWsDelta < OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent @@ -439,21 +442,23 @@ class BetaResponseAudioTranscriptWsDelta < OpenAI::Models::Beta::BetaResponseAud optional :stream_id, String # @!method initialize(delta:, sequence_number:, agent: nil, stream_id: nil, type: :"response.audio.transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseAudioTranscriptWsDelta} - # for more details. - # # Emitted when there is a partial transcript of audio. # - # @param delta [String] The partial transcript of the audio response. + # @param delta [String] + # The partial transcript of the audio response. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.transcript.delta"] The type of the event. Always `response.audio.transcript.delta`. + # @param type [Symbol, :"response.audio.transcript.delta"] + # The type of the event. Always `response.audio.transcript.delta`. end class BetaResponseAudioTranscriptWsDone < OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent @@ -465,19 +470,20 @@ class BetaResponseAudioTranscriptWsDone < OpenAI::Models::Beta::BetaResponseAudi optional :stream_id, String # @!method initialize(sequence_number:, agent: nil, stream_id: nil, type: :"response.audio.transcript.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseAudioTranscriptWsDone} - # for more details. - # # Emitted when the full audio transcript is completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseAudioTranscriptDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.transcript.done"] The type of the event. Always `response.audio.transcript.done`. + # @param type [Symbol, :"response.audio.transcript.done"] + # The type of the event. Always `response.audio.transcript.done`. end class BetaResponseCodeInterpreterCallCodeWsDelta < OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent @@ -489,25 +495,30 @@ class BetaResponseCodeInterpreterCallCodeWsDelta < OpenAI::Models::Beta::BetaRes optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.code_interpreter_call_code.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCodeInterpreterCallCodeWsDelta} - # for more details. - # # Emitted when a partial code snippet is streamed by the code interpreter. # - # @param delta [String] The partial code snippet being streamed by the code interpreter. + # @param delta [String] + # The partial code snippet being streamed by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is being streame + # @param output_index [Integer] + # The index of the output item in the response for which the code is being + # streamed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call_code.delta"] The type of the event. Always `response.code_interpreter_call_code.delta`. + # @param type [Symbol, :"response.code_interpreter_call_code.delta"] + # The type of the event. Always `response.code_interpreter_call_code.delta`. end class BetaResponseCodeInterpreterCallCodeWsDone < OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent @@ -519,25 +530,29 @@ class BetaResponseCodeInterpreterCallCodeWsDone < OpenAI::Models::Beta::BetaResp optional :stream_id, String # @!method initialize(code:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.code_interpreter_call_code.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCodeInterpreterCallCodeWsDone} - # for more details. - # # Emitted when the code snippet is finalized by the code interpreter. # - # @param code [String] The final code snippet output by the code interpreter. + # @param code [String] + # The final code snippet output by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is finalized. + # @param output_index [Integer] + # The index of the output item in the response for which the code is finalized. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCodeDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call_code.done"] The type of the event. Always `response.code_interpreter_call_code.done`. + # @param type [Symbol, :"response.code_interpreter_call_code.done"] + # The type of the event. Always `response.code_interpreter_call_code.done`. end class BetaResponseCodeInterpreterCallWsCompleted < OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent @@ -549,23 +564,27 @@ class BetaResponseCodeInterpreterCallWsCompleted < OpenAI::Models::Beta::BetaRes optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.code_interpreter_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCodeInterpreterCallWsCompleted} - # for more details. - # # Emitted when the code interpreter call is completed. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is completed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.completed"] The type of the event. Always `response.code_interpreter_call.completed`. + # @param type [Symbol, :"response.code_interpreter_call.completed"] + # The type of the event. Always `response.code_interpreter_call.completed`. end class BetaResponseCodeInterpreterCallInWsProgress < OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent @@ -577,23 +596,27 @@ class BetaResponseCodeInterpreterCallInWsProgress < OpenAI::Models::Beta::BetaRe optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.code_interpreter_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCodeInterpreterCallInWsProgress} - # for more details. - # # Emitted when a code interpreter call is in progress. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is in progress. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.in_progress"] The type of the event. Always `response.code_interpreter_call.in_progress`. + # @param type [Symbol, :"response.code_interpreter_call.in_progress"] + # The type of the event. Always `response.code_interpreter_call.in_progress`. end class BetaResponseCodeInterpreterCallWsInterpreting < OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent @@ -605,23 +628,27 @@ class BetaResponseCodeInterpreterCallWsInterpreting < OpenAI::Models::Beta::Beta optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.code_interpreter_call.interpreting") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCodeInterpreterCallWsInterpreting} - # for more details. - # # Emitted when the code interpreter is actively interpreting the code snippet. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter is i + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter is + # interpreting code. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCodeInterpreterCallInterpretingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.interpreting"] The type of the event. Always `response.code_interpreter_call.interpreting`. + # @param type [Symbol, :"response.code_interpreter_call.interpreting"] + # The type of the event. Always `response.code_interpreter_call.interpreting`. end class BetaResponseWsCompleted < OpenAI::Models::Beta::BetaResponseCompletedEvent @@ -633,21 +660,23 @@ class BetaResponseWsCompleted < OpenAI::Models::Beta::BetaResponseCompletedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsCompleted} for - # more details. - # # Emitted when the model response is complete. # - # @param response [OpenAI::Models::Beta::BetaResponse] Properties of the completed response. + # @param response [OpenAI::Models::Beta::BetaResponse] + # Properties of the completed response. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.completed"] The type of the event. Always `response.completed`. + # @param type [Symbol, :"response.completed"] + # The type of the event. Always `response.completed`. end class BetaResponseContentPartWsAdded < OpenAI::Models::Beta::BetaResponseContentPartAddedEvent @@ -659,27 +688,32 @@ class BetaResponseContentPartWsAdded < OpenAI::Models::Beta::BetaResponseContent optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, agent: nil, stream_id: nil, type: :"response.content_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseContentPartWsAdded} - # for more details. - # # Emitted when a new content part is added. # - # @param content_index [Integer] The index of the content part that was added. + # @param content_index [Integer] + # The index of the content part that was added. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added. + # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Part::ReasoningText] + # The content part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseContentPartAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.content_part.added"] The type of the event. Always `response.content_part.added`. + # @param type [Symbol, :"response.content_part.added"] + # The type of the event. Always `response.content_part.added`. end class BetaResponseContentPartWsDone < OpenAI::Models::Beta::BetaResponseContentPartDoneEvent @@ -691,27 +725,32 @@ class BetaResponseContentPartWsDone < OpenAI::Models::Beta::BetaResponseContentP optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, agent: nil, stream_id: nil, type: :"response.content_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseContentPartWsDone} - # for more details. - # # Emitted when a content part is done. # - # @param content_index [Integer] The index of the content part that is done. + # @param content_index [Integer] + # The index of the content part that is done. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done. + # @param part [OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal, OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Part::ReasoningText] + # The content part that is done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseContentPartDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.content_part.done"] The type of the event. Always `response.content_part.done`. + # @param type [Symbol, :"response.content_part.done"] + # The type of the event. Always `response.content_part.done`. end class BetaResponseWsCreated < OpenAI::Models::Beta::BetaResponseCreatedEvent @@ -723,21 +762,23 @@ class BetaResponseWsCreated < OpenAI::Models::Beta::BetaResponseCreatedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsCreated} for more - # details. - # # An event that is emitted when a response is created. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that was created. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that was created. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCreatedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCreatedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.created"] The type of the event. Always `response.created`. + # @param type [Symbol, :"response.created"] + # The type of the event. Always `response.created`. end class BetaResponseFileSearchCallWsCompleted < OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent @@ -749,23 +790,26 @@ class BetaResponseFileSearchCallWsCompleted < OpenAI::Models::Beta::BetaResponse optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.file_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseFileSearchCallWsCompleted} - # for more details. - # # Emitted when a file search call is completed (results found). # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.completed"] The type of the event. Always `response.file_search_call.completed`. + # @param type [Symbol, :"response.file_search_call.completed"] + # The type of the event. Always `response.file_search_call.completed`. end class BetaResponseFileSearchCallInWsProgress < OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent @@ -777,23 +821,26 @@ class BetaResponseFileSearchCallInWsProgress < OpenAI::Models::Beta::BetaRespons optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.file_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseFileSearchCallInWsProgress} - # for more details. - # # Emitted when a file search call is initiated. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.in_progress"] The type of the event. Always `response.file_search_call.in_progress`. + # @param type [Symbol, :"response.file_search_call.in_progress"] + # The type of the event. Always `response.file_search_call.in_progress`. end class BetaResponseFileSearchCallWsSearching < OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent @@ -805,23 +852,26 @@ class BetaResponseFileSearchCallWsSearching < OpenAI::Models::Beta::BetaResponse optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.file_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseFileSearchCallWsSearching} - # for more details. - # # Emitted when a file search is currently searching. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is searching. + # @param output_index [Integer] + # The index of the output item that the file search call is searching. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFileSearchCallSearchingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.searching"] The type of the event. Always `response.file_search_call.searching`. + # @param type [Symbol, :"response.file_search_call.searching"] + # The type of the event. Always `response.file_search_call.searching`. end class BetaResponseFunctionCallArgumentsWsDelta < OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent @@ -833,25 +883,29 @@ class BetaResponseFunctionCallArgumentsWsDelta < OpenAI::Models::Beta::BetaRespo optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.function_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseFunctionCallArgumentsWsDelta} - # for more details. - # # Emitted when there is a partial function-call arguments delta. # - # @param delta [String] The function-call arguments delta that is added. + # @param delta [String] + # The function-call arguments delta that is added. # - # @param item_id [String] The ID of the output item that the function-call arguments delta is added to. + # @param item_id [String] + # The ID of the output item that the function-call arguments delta is added to. # - # @param output_index [Integer] The index of the output item that the function-call arguments delta is added to. + # @param output_index [Integer] + # The index of the output item that the function-call arguments delta is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.function_call_arguments.delta"] The type of the event. Always `response.function_call_arguments.delta`. + # @param type [Symbol, :"response.function_call_arguments.delta"] + # The type of the event. Always `response.function_call_arguments.delta`. end class BetaResponseFunctionCallArgumentsWsDone < OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDoneEvent @@ -863,23 +917,26 @@ class BetaResponseFunctionCallArgumentsWsDone < OpenAI::Models::Beta::BetaRespon optional :stream_id, String # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.function_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseFunctionCallArgumentsWsDone} - # for more details. - # # Emitted when function-call arguments are finalized. # - # @param arguments [String] The function-call arguments. + # @param arguments [String] + # The function-call arguments. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item. + # @param output_index [Integer] + # The index of the output item. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFunctionCallArgumentsDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # # @param type [Symbol, :"response.function_call_arguments.done"] end @@ -893,25 +950,29 @@ class BetaResponseShellCallCommandWsAdded < OpenAI::Models::Beta::BetaResponseSh optional :stream_id, String # @!method initialize(command:, command_index:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.shell_call_command.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseShellCallCommandWsAdded} - # for more details. - # # A streaming event that indicated a shell command was added to a tool call. # - # @param command [String] The shell command that was added. + # @param command [String] + # The shell command that was added. # - # @param command_index [Integer] The index of the shell command that was added. + # @param command_index [Integer] + # The index of the shell command that was added. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandAddedEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.added"] The type of the event, always `response.shell_call_command.added`. + # @param type [Symbol, :"response.shell_call_command.added"] + # The type of the event, always `response.shell_call_command.added`. end class BetaResponseShellCallCommandWsDelta < OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent @@ -923,27 +984,32 @@ class BetaResponseShellCallCommandWsDelta < OpenAI::Models::Beta::BetaResponseSh optional :stream_id, String # @!method initialize(command_index:, delta:, output_index:, sequence_number:, agent: nil, obfuscation: nil, stream_id: nil, type: :"response.shell_call_command.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseShellCallCommandWsDelta} - # for more details. - # # A streaming event that indicated a shell command was incrementally updated. # - # @param command_index [Integer] The index of the shell command that was updated. + # @param command_index [Integer] + # The index of the shell command that was updated. # - # @param delta [String] The shell command delta that was appended. + # @param delta [String] + # The shell command delta that was appended. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDeltaEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param obfuscation [String] An obfuscation string that was added to pad the event payload. + # @param obfuscation [String] + # An obfuscation string that was added to pad the event payload. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.delta"] The type of the event, always `response.shell_call_command.delta`. + # @param type [Symbol, :"response.shell_call_command.delta"] + # The type of the event, always `response.shell_call_command.delta`. end class BetaResponseShellCallCommandWsDone < OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent @@ -955,25 +1021,29 @@ class BetaResponseShellCallCommandWsDone < OpenAI::Models::Beta::BetaResponseShe optional :stream_id, String # @!method initialize(command:, command_index:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.shell_call_command.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseShellCallCommandWsDone} - # for more details. - # # A streaming event that indicated a shell command was completed. # - # @param command [String] The final shell command that was emitted. + # @param command [String] + # The final shell command that was emitted. # - # @param command_index [Integer] The index of the shell command that was completed. + # @param command_index [Integer] + # The index of the shell command that was completed. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallCommandDoneEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.done"] The type of the event, always `response.shell_call_command.done`. + # @param type [Symbol, :"response.shell_call_command.done"] + # The type of the event, always `response.shell_call_command.done`. end class BetaResponseShellCallOutputContentWsDelta < OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent @@ -985,27 +1055,32 @@ class BetaResponseShellCallOutputContentWsDelta < OpenAI::Models::Beta::BetaResp optional :stream_id, String # @!method initialize(command_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.shell_call_output_content.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseShellCallOutputContentWsDelta} - # for more details. - # # A streaming event that indicated shell call output was incrementally added. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param delta [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Delta] The stdout/stderr delta that was emitted. + # @param delta [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Delta] + # The stdout/stderr delta that was emitted. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDeltaEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_output_content.delta"] The type of the event, always `response.shell_call_output_content.delta`. + # @param type [Symbol, :"response.shell_call_output_content.delta"] + # The type of the event, always `response.shell_call_output_content.delta`. end class BetaResponseShellCallOutputContentWsDone < OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent @@ -1017,27 +1092,32 @@ class BetaResponseShellCallOutputContentWsDone < OpenAI::Models::Beta::BetaRespo optional :stream_id, String # @!method initialize(command_index:, item_id:, output:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.shell_call_output_content.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseShellCallOutputContentWsDone} - # for more details. - # # A streaming event that indicated shell call output was completed. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output [Array] The output contents emitted for the shell command. + # @param output [Array] + # The output contents emitted for the shell command. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseShellCallOutputContentDoneEvent::Agent] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_output_content.done"] The type of the event, always `response.shell_call_output_content.done`. + # @param type [Symbol, :"response.shell_call_output_content.done"] + # The type of the event, always `response.shell_call_output_content.done`. end class BetaResponseInWsProgress < OpenAI::Models::Beta::BetaResponseInProgressEvent @@ -1049,21 +1129,23 @@ class BetaResponseInWsProgress < OpenAI::Models::Beta::BetaResponseInProgressEve optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseInWsProgress} for - # more details. - # # Emitted when the response is in progress. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that is in progress. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that is in progress. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.in_progress"] The type of the event. Always `response.in_progress`. + # @param type [Symbol, :"response.in_progress"] + # The type of the event. Always `response.in_progress`. end class BetaResponseWsFailed < OpenAI::Models::Beta::BetaResponseFailedEvent @@ -1075,21 +1157,23 @@ class BetaResponseWsFailed < OpenAI::Models::Beta::BetaResponseFailedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsFailed} for more - # details. - # # An event that is emitted when a response fails. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that failed. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.failed"] The type of the event. Always `response.failed`. + # @param type [Symbol, :"response.failed"] + # The type of the event. Always `response.failed`. end class BetaResponseWsIncomplete < OpenAI::Models::Beta::BetaResponseIncompleteEvent @@ -1101,25 +1185,27 @@ class BetaResponseWsIncomplete < OpenAI::Models::Beta::BetaResponseIncompleteEve optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsIncomplete} for - # more details. - # # An event that is emitted when a response finishes as incomplete. # # Over WebSocket, steering can finish a response with # `response.incomplete_details.reason` set to `steered`, followed automatically by # a successor `response.created` that commits the queued steering input. # - # @param response [OpenAI::Models::Beta::BetaResponse] The response that was incomplete. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The response that was incomplete. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseIncompleteEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseIncompleteEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.incomplete"] The type of the event. Always `response.incomplete`. + # @param type [Symbol, :"response.incomplete"] + # The type of the event. Always `response.incomplete`. end class BetaResponseOutputItemWsAdded < OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent @@ -1131,23 +1217,29 @@ class BetaResponseOutputItemWsAdded < OpenAI::Models::Beta::BetaResponseOutputIt optional :stream_id, String # @!method initialize(item:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.output_item.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseOutputItemWsAdded} - # for more details. - # # Emitted when a new output item is added. # - # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was added. For reasoning items, `encrypted_content` + # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] + # The output item that was added. For reasoning items, `encrypted_content` may be + # incomplete while the item is in progress. Use the reasoning item from the + # corresponding `response.output_item.done` event when passing it as input to a + # subsequent request. # - # @param output_index [Integer] The index of the output item that was added. + # @param output_index [Integer] + # The index of the output item that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_item.added"] The type of the event. Always `response.output_item.added`. + # @param type [Symbol, :"response.output_item.added"] + # The type of the event. Always `response.output_item.added`. end class BetaResponseOutputItemWsDone < OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent @@ -1159,23 +1251,26 @@ class BetaResponseOutputItemWsDone < OpenAI::Models::Beta::BetaResponseOutputIte optional :stream_id, String # @!method initialize(item:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.output_item.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseOutputItemWsDone} - # for more details. - # # Emitted when an output item is marked done. # - # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was marked done. + # @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] + # The output item that was marked done. # - # @param output_index [Integer] The index of the output item that was marked done. + # @param output_index [Integer] + # The index of the output item that was marked done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputItemDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_item.done"] The type of the event. Always `response.output_item.done`. + # @param type [Symbol, :"response.output_item.done"] + # The type of the event. Always `response.output_item.done`. end class BetaResponseReasoningSummaryPartWsAdded < OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent @@ -1187,27 +1282,32 @@ class BetaResponseReasoningSummaryPartWsAdded < OpenAI::Models::Beta::BetaRespon optional :stream_id, String # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, agent: nil, stream_id: nil, type: :"response.reasoning_summary_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningSummaryPartWsAdded} - # for more details. - # # Emitted when a new reasoning summary part is added. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Part] The summary part that was added. + # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Part] + # The summary part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_part.added"] The type of the event. Always `response.reasoning_summary_part.added`. + # @param type [Symbol, :"response.reasoning_summary_part.added"] + # The type of the event. Always `response.reasoning_summary_part.added`. end class BetaResponseReasoningSummaryPartWsDone < OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent @@ -1219,29 +1319,36 @@ class BetaResponseReasoningSummaryPartWsDone < OpenAI::Models::Beta::BetaRespons optional :stream_id, String # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, agent: nil, status: nil, stream_id: nil, type: :"response.reasoning_summary_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningSummaryPartWsDone} - # for more details. - # # Emitted when a reasoning summary part is completed. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Part] The completed summary part. + # @param part [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Part] + # The completed summary part. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Status] The completion status of the summary part. Omitted when the part completed + # @param status [Symbol, OpenAI::Models::Beta::BetaResponseReasoningSummaryPartDoneEvent::Status] + # The completion status of the summary part. Omitted when the part completed + # normally and set to `incomplete` when generation was interrupted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_part.done"] The type of the event. Always `response.reasoning_summary_part.done`. + # @param type [Symbol, :"response.reasoning_summary_part.done"] + # The type of the event. Always `response.reasoning_summary_part.done`. end class BetaResponseReasoningSummaryTextWsDelta < OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent @@ -1253,27 +1360,32 @@ class BetaResponseReasoningSummaryTextWsDelta < OpenAI::Models::Beta::BetaRespon optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, summary_index:, agent: nil, stream_id: nil, type: :"response.reasoning_summary_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningSummaryTextWsDelta} - # for more details. - # # Emitted when a delta is added to a reasoning summary text. # - # @param delta [String] The text delta that was added to the summary. + # @param delta [String] + # The text delta that was added to the summary. # - # @param item_id [String] The ID of the item this summary text delta is associated with. + # @param item_id [String] + # The ID of the item this summary text delta is associated with. # - # @param output_index [Integer] The index of the output item this summary text delta is associated with. + # @param output_index [Integer] + # The index of the output item this summary text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_text.delta"] The type of the event. Always `response.reasoning_summary_text.delta`. + # @param type [Symbol, :"response.reasoning_summary_text.delta"] + # The type of the event. Always `response.reasoning_summary_text.delta`. end class BetaResponseReasoningSummaryTextWsDone < OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent @@ -1285,27 +1397,32 @@ class BetaResponseReasoningSummaryTextWsDone < OpenAI::Models::Beta::BetaRespons optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, summary_index:, text:, agent: nil, stream_id: nil, type: :"response.reasoning_summary_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningSummaryTextWsDone} - # for more details. - # # Emitted when a reasoning summary text is completed. # - # @param item_id [String] The ID of the item this summary text is associated with. + # @param item_id [String] + # The ID of the item this summary text is associated with. # - # @param output_index [Integer] The index of the output item this summary text is associated with. + # @param output_index [Integer] + # The index of the output item this summary text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param text [String] The full text of the completed reasoning summary. + # @param text [String] + # The full text of the completed reasoning summary. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningSummaryTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_text.done"] The type of the event. Always `response.reasoning_summary_text.done`. + # @param type [Symbol, :"response.reasoning_summary_text.done"] + # The type of the event. Always `response.reasoning_summary_text.done`. end class BetaResponseReasoningTextWsDelta < OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent @@ -1317,27 +1434,32 @@ class BetaResponseReasoningTextWsDelta < OpenAI::Models::Beta::BetaResponseReaso optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.reasoning_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningTextWsDelta} - # for more details. - # # Emitted when a delta is added to a reasoning text. # - # @param content_index [Integer] The index of the reasoning content part this delta is associated with. + # @param content_index [Integer] + # The index of the reasoning content part this delta is associated with. # - # @param delta [String] The text delta that was added to the reasoning content. + # @param delta [String] + # The text delta that was added to the reasoning content. # - # @param item_id [String] The ID of the item this reasoning text delta is associated with. + # @param item_id [String] + # The ID of the item this reasoning text delta is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text delta is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_text.delta"] The type of the event. Always `response.reasoning_text.delta`. + # @param type [Symbol, :"response.reasoning_text.delta"] + # The type of the event. Always `response.reasoning_text.delta`. end class BetaResponseReasoningTextWsDone < OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent @@ -1349,27 +1471,32 @@ class BetaResponseReasoningTextWsDone < OpenAI::Models::Beta::BetaResponseReason optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, sequence_number:, text:, agent: nil, stream_id: nil, type: :"response.reasoning_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseReasoningTextWsDone} - # for more details. - # # Emitted when a reasoning text is completed. # - # @param content_index [Integer] The index of the reasoning content part. + # @param content_index [Integer] + # The index of the reasoning content part. # - # @param item_id [String] The ID of the item this reasoning text is associated with. + # @param item_id [String] + # The ID of the item this reasoning text is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param text [String] The full text of the completed reasoning content. + # @param text [String] + # The full text of the completed reasoning content. # - # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseReasoningTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_text.done"] The type of the event. Always `response.reasoning_text.done`. + # @param type [Symbol, :"response.reasoning_text.done"] + # The type of the event. Always `response.reasoning_text.done`. end class BetaResponseRefusalWsDelta < OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent @@ -1381,27 +1508,32 @@ class BetaResponseRefusalWsDelta < OpenAI::Models::Beta::BetaResponseRefusalDelt optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.refusal.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseRefusalWsDelta} for - # more details. - # # Emitted when there is a partial refusal text. # - # @param content_index [Integer] The index of the content part that the refusal text is added to. + # @param content_index [Integer] + # The index of the content part that the refusal text is added to. # - # @param delta [String] The refusal text that is added. + # @param delta [String] + # The refusal text that is added. # - # @param item_id [String] The ID of the output item that the refusal text is added to. + # @param item_id [String] + # The ID of the output item that the refusal text is added to. # - # @param output_index [Integer] The index of the output item that the refusal text is added to. + # @param output_index [Integer] + # The index of the output item that the refusal text is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.refusal.delta"] The type of the event. Always `response.refusal.delta`. + # @param type [Symbol, :"response.refusal.delta"] + # The type of the event. Always `response.refusal.delta`. end class BetaResponseRefusalWsDone < OpenAI::Models::Beta::BetaResponseRefusalDoneEvent @@ -1413,27 +1545,32 @@ class BetaResponseRefusalWsDone < OpenAI::Models::Beta::BetaResponseRefusalDoneE optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, refusal:, sequence_number:, agent: nil, stream_id: nil, type: :"response.refusal.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseRefusalWsDone} for - # more details. - # # Emitted when refusal text is finalized. # - # @param content_index [Integer] The index of the content part that the refusal text is finalized. + # @param content_index [Integer] + # The index of the content part that the refusal text is finalized. # - # @param item_id [String] The ID of the output item that the refusal text is finalized. + # @param item_id [String] + # The ID of the output item that the refusal text is finalized. # - # @param output_index [Integer] The index of the output item that the refusal text is finalized. + # @param output_index [Integer] + # The index of the output item that the refusal text is finalized. # - # @param refusal [String] The refusal text that is finalized. + # @param refusal [String] + # The refusal text that is finalized. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseRefusalDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.refusal.done"] The type of the event. Always `response.refusal.done`. + # @param type [Symbol, :"response.refusal.done"] + # The type of the event. Always `response.refusal.done`. end class BetaResponseTextWsDelta < OpenAI::Models::Beta::BetaResponseTextDeltaEvent @@ -1445,29 +1582,35 @@ class BetaResponseTextWsDelta < OpenAI::Models::Beta::BetaResponseTextDeltaEvent optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, logprobs:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.output_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseTextWsDelta} for - # more details. - # # Emitted when there is an additional text delta. # - # @param content_index [Integer] The index of the content part that the text delta was added to. + # @param content_index [Integer] + # The index of the content part that the text delta was added to. # - # @param delta [String] The text delta that was added. + # @param delta [String] + # The text delta that was added. # - # @param item_id [String] The ID of the output item that the text delta was added to. + # @param item_id [String] + # The ID of the output item that the text delta was added to. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text delta was added to. + # @param output_index [Integer] + # The index of the output item that the text delta was added to. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseTextDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseTextDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.delta"] The type of the event. Always `response.output_text.delta`. + # @param type [Symbol, :"response.output_text.delta"] + # The type of the event. Always `response.output_text.delta`. end class BetaResponseTextWsDone < OpenAI::Models::Beta::BetaResponseTextDoneEvent @@ -1479,29 +1622,35 @@ class BetaResponseTextWsDone < OpenAI::Models::Beta::BetaResponseTextDoneEvent optional :stream_id, String # @!method initialize(content_index:, item_id:, logprobs:, output_index:, sequence_number:, text:, agent: nil, stream_id: nil, type: :"response.output_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseTextWsDone} for - # more details. - # # Emitted when text content is finalized. # - # @param content_index [Integer] The index of the content part that the text content is finalized. + # @param content_index [Integer] + # The index of the content part that the text content is finalized. # - # @param item_id [String] The ID of the output item that the text content is finalized. + # @param item_id [String] + # The ID of the output item that the text content is finalized. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text content is finalized. + # @param output_index [Integer] + # The index of the output item that the text content is finalized. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param text [String] The text content that is finalized. + # @param text [String] + # The text content that is finalized. # - # @param agent [OpenAI::Models::Beta::BetaResponseTextDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseTextDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.done"] The type of the event. Always `response.output_text.done`. + # @param type [Symbol, :"response.output_text.done"] + # The type of the event. Always `response.output_text.done`. end class BetaResponseWebSearchCallWsCompleted < OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent @@ -1513,23 +1662,26 @@ class BetaResponseWebSearchCallWsCompleted < OpenAI::Models::Beta::BetaResponseW optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.web_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWebSearchCallWsCompleted} - # for more details. - # # Emitted when a web search call is completed. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.completed"] The type of the event. Always `response.web_search_call.completed`. + # @param type [Symbol, :"response.web_search_call.completed"] + # The type of the event. Always `response.web_search_call.completed`. end class BetaResponseWebSearchCallInWsProgress < OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent @@ -1541,23 +1693,26 @@ class BetaResponseWebSearchCallInWsProgress < OpenAI::Models::Beta::BetaResponse optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.web_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWebSearchCallInWsProgress} - # for more details. - # # Emitted when a web search call is initiated. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.in_progress"] The type of the event. Always `response.web_search_call.in_progress`. + # @param type [Symbol, :"response.web_search_call.in_progress"] + # The type of the event. Always `response.web_search_call.in_progress`. end class BetaResponseWebSearchCallWsSearching < OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent @@ -1569,23 +1724,26 @@ class BetaResponseWebSearchCallWsSearching < OpenAI::Models::Beta::BetaResponseW optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.web_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWebSearchCallWsSearching} - # for more details. - # # Emitted when a web search call is executing. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseWebSearchCallSearchingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.searching"] The type of the event. Always `response.web_search_call.searching`. + # @param type [Symbol, :"response.web_search_call.searching"] + # The type of the event. Always `response.web_search_call.searching`. end class BetaResponseImageGenCallWsCompleted < OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent @@ -1597,24 +1755,27 @@ class BetaResponseImageGenCallWsCompleted < OpenAI::Models::Beta::BetaResponseIm optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.image_generation_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseImageGenCallWsCompleted} - # for more details. - # # Emitted when an image generation tool call has completed and the final image is # available. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.completed"] The type of the event. Always 'response.image_generation_call.completed'. + # @param type [Symbol, :"response.image_generation_call.completed"] + # The type of the event. Always 'response.image_generation_call.completed'. end class BetaResponseImageGenCallWsGenerating < OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent @@ -1626,24 +1787,27 @@ class BetaResponseImageGenCallWsGenerating < OpenAI::Models::Beta::BetaResponseI optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.image_generation_call.generating") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseImageGenCallWsGenerating} - # for more details. - # # Emitted when an image generation tool call is actively generating an image # (intermediate state). # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallGeneratingEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.generating"] The type of the event. Always 'response.image_generation_call.generating'. + # @param type [Symbol, :"response.image_generation_call.generating"] + # The type of the event. Always 'response.image_generation_call.generating'. end class BetaResponseImageGenCallInWsProgress < OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent @@ -1655,23 +1819,26 @@ class BetaResponseImageGenCallInWsProgress < OpenAI::Models::Beta::BetaResponseI optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.image_generation_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseImageGenCallInWsProgress} - # for more details. - # # Emitted when an image generation tool call is in progress. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.in_progress"] The type of the event. Always 'response.image_generation_call.in_progress'. + # @param type [Symbol, :"response.image_generation_call.in_progress"] + # The type of the event. Always 'response.image_generation_call.in_progress'. end class BetaResponseImageGenCallPartialWsImage < OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent @@ -1683,35 +1850,45 @@ class BetaResponseImageGenCallPartialWsImage < OpenAI::Models::Beta::BetaRespons optional :stream_id, String # @!method initialize(item_id:, output_index:, partial_image_b64:, partial_image_index:, sequence_number:, agent: nil, background: nil, output_format: nil, quality: nil, size: nil, stream_id: nil, type: :"response.image_generation_call.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseImageGenCallPartialWsImage} - # for more details. - # # Emitted when a partial image is available during image generation streaming. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param partial_image_b64 [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param partial_image_b64 [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param partial_image_index [Integer] 0-based index for the partial image (backend is 1-based, but this is 0-based for + # @param partial_image_index [Integer] + # 0-based index for the partial image (backend is 1-based, but this is 0-based for + # the user). # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseImageGenCallPartialImageEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param background [String] The background setting that was used. + # @param background [String] + # The background setting that was used. # - # @param output_format [String] The output format that was used. + # @param output_format [String] + # The output format that was used. # - # @param quality [String] The image quality that was used. + # @param quality [String] + # The image quality that was used. # - # @param size [String] The image size that was used. + # @param size [String] + # The image size that was used. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.partial_image"] The type of the event. Always 'response.image_generation_call.partial_image'. + # @param type [Symbol, :"response.image_generation_call.partial_image"] + # The type of the event. Always 'response.image_generation_call.partial_image'. end class BetaResponseMcpCallArgumentsWsDelta < OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent @@ -1723,26 +1900,31 @@ class BetaResponseMcpCallArgumentsWsDelta < OpenAI::Models::Beta::BetaResponseMc optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpCallArgumentsWsDelta} - # for more details. - # # Emitted when there is a delta (partial update) to the arguments of an MCP tool # call. # - # @param delta [String] A JSON string containing the partial update to the arguments for the MCP tool ca + # @param delta [String] + # A JSON string containing the partial update to the arguments for the MCP tool + # call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call_arguments.delta"] The type of the event. Always 'response.mcp_call_arguments.delta'. + # @param type [Symbol, :"response.mcp_call_arguments.delta"] + # The type of the event. Always 'response.mcp_call_arguments.delta'. end class BetaResponseMcpCallArgumentsWsDone < OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent @@ -1754,25 +1936,29 @@ class BetaResponseMcpCallArgumentsWsDone < OpenAI::Models::Beta::BetaResponseMcp optional :stream_id, String # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpCallArgumentsWsDone} - # for more details. - # # Emitted when the arguments for an MCP tool call are finalized. # - # @param arguments [String] A JSON string containing the finalized arguments for the MCP tool call. + # @param arguments [String] + # A JSON string containing the finalized arguments for the MCP tool call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallArgumentsDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call_arguments.done"] The type of the event. Always 'response.mcp_call_arguments.done'. + # @param type [Symbol, :"response.mcp_call_arguments.done"] + # The type of the event. Always 'response.mcp_call_arguments.done'. end class BetaResponseMcpCallWsCompleted < OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent @@ -1784,23 +1970,26 @@ class BetaResponseMcpCallWsCompleted < OpenAI::Models::Beta::BetaResponseMcpCall optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpCallWsCompleted} - # for more details. - # # Emitted when an MCP tool call has completed successfully. # - # @param item_id [String] The ID of the MCP tool call item that completed. + # @param item_id [String] + # The ID of the MCP tool call item that completed. # - # @param output_index [Integer] The index of the output item that completed. + # @param output_index [Integer] + # The index of the output item that completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.completed"] The type of the event. Always 'response.mcp_call.completed'. + # @param type [Symbol, :"response.mcp_call.completed"] + # The type of the event. Always 'response.mcp_call.completed'. end class BetaResponseMcpCallWsFailed < OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent @@ -1812,23 +2001,26 @@ class BetaResponseMcpCallWsFailed < OpenAI::Models::Beta::BetaResponseMcpCallFai optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_call.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpCallWsFailed} - # for more details. - # # Emitted when an MCP tool call has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.failed"] The type of the event. Always 'response.mcp_call.failed'. + # @param type [Symbol, :"response.mcp_call.failed"] + # The type of the event. Always 'response.mcp_call.failed'. end class BetaResponseMcpCallInWsProgress < OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent @@ -1840,23 +2032,26 @@ class BetaResponseMcpCallInWsProgress < OpenAI::Models::Beta::BetaResponseMcpCal optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpCallInWsProgress} - # for more details. - # # Emitted when an MCP tool call is in progress. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpCallInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.in_progress"] The type of the event. Always 'response.mcp_call.in_progress'. + # @param type [Symbol, :"response.mcp_call.in_progress"] + # The type of the event. Always 'response.mcp_call.in_progress'. end class BetaResponseMcpListToolsWsCompleted < OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent @@ -1868,23 +2063,26 @@ class BetaResponseMcpListToolsWsCompleted < OpenAI::Models::Beta::BetaResponseMc optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_list_tools.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpListToolsWsCompleted} - # for more details. - # # Emitted when the list of available MCP tools has been successfully retrieved. # - # @param item_id [String] The ID of the MCP tool call item that produced this output. + # @param item_id [String] + # The ID of the MCP tool call item that produced this output. # - # @param output_index [Integer] The index of the output item that was processed. + # @param output_index [Integer] + # The index of the output item that was processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsCompletedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.completed"] The type of the event. Always 'response.mcp_list_tools.completed'. + # @param type [Symbol, :"response.mcp_list_tools.completed"] + # The type of the event. Always 'response.mcp_list_tools.completed'. end class BetaResponseMcpListToolsWsFailed < OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent @@ -1896,23 +2094,26 @@ class BetaResponseMcpListToolsWsFailed < OpenAI::Models::Beta::BetaResponseMcpLi optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_list_tools.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpListToolsWsFailed} - # for more details. - # # Emitted when the attempt to list available MCP tools has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsFailedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.failed"] The type of the event. Always 'response.mcp_list_tools.failed'. + # @param type [Symbol, :"response.mcp_list_tools.failed"] + # The type of the event. Always 'response.mcp_list_tools.failed'. end class BetaResponseMcpListToolsInWsProgress < OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent @@ -1924,24 +2125,27 @@ class BetaResponseMcpListToolsInWsProgress < OpenAI::Models::Beta::BetaResponseM optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.mcp_list_tools.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseMcpListToolsInWsProgress} - # for more details. - # # Emitted when the system is in the process of retrieving the list of available # MCP tools. # - # @param item_id [String] The ID of the MCP tool call item that is being processed. + # @param item_id [String] + # The ID of the MCP tool call item that is being processed. # - # @param output_index [Integer] The index of the output item that is being processed. + # @param output_index [Integer] + # The index of the output item that is being processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseMcpListToolsInProgressEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.in_progress"] The type of the event. Always 'response.mcp_list_tools.in_progress'. + # @param type [Symbol, :"response.mcp_list_tools.in_progress"] + # The type of the event. Always 'response.mcp_list_tools.in_progress'. end class BetaResponseOutputTextAnnotationWsAdded < OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent @@ -1953,29 +2157,35 @@ class BetaResponseOutputTextAnnotationWsAdded < OpenAI::Models::Beta::BetaRespon optional :stream_id, String # @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.output_text.annotation.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseOutputTextAnnotationWsAdded} - # for more details. - # # Emitted when an annotation is added to output text content. # - # @param annotation [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text. + # @param annotation [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] + # An annotation that applies to a span of output text. # - # @param annotation_index [Integer] The index of the annotation within the content part. + # @param annotation_index [Integer] + # The index of the annotation within the content part. # - # @param content_index [Integer] The index of the content part within the output item. + # @param content_index [Integer] + # The index of the content part within the output item. # - # @param item_id [String] The unique identifier of the item to which the annotation is being added. + # @param item_id [String] + # The unique identifier of the item to which the annotation is being added. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'. + # @param type [Symbol, :"response.output_text.annotation.added"] + # The type of the event. Always 'response.output_text.annotation.added'. end class BetaResponseWsQueued < OpenAI::Models::Beta::BetaResponseQueuedEvent @@ -1987,21 +2197,23 @@ class BetaResponseWsQueued < OpenAI::Models::Beta::BetaResponseQueuedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, agent: nil, stream_id: nil, type: :"response.queued") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsQueued} for more - # details. - # # Emitted when a response is queued and waiting to be processed. # - # @param response [OpenAI::Models::Beta::BetaResponse] The full response object that is queued. + # @param response [OpenAI::Models::Beta::BetaResponse] + # The full response object that is queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseQueuedEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseQueuedEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.queued"] The type of the event. Always 'response.queued'. + # @param type [Symbol, :"response.queued"] + # The type of the event. Always 'response.queued'. end class BetaResponseCustomToolCallInputWsDelta < OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent @@ -2013,25 +2225,29 @@ class BetaResponseCustomToolCallInputWsDelta < OpenAI::Models::Beta::BetaRespons optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.custom_tool_call_input.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCustomToolCallInputWsDelta} - # for more details. - # # Event representing a delta (partial update) to the input of a custom tool call. # - # @param delta [String] The incremental input data (delta) for the custom tool call. + # @param delta [String] + # The incremental input data (delta) for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this delta applies to. + # @param output_index [Integer] + # The index of the output this delta applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDeltaEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.custom_tool_call_input.delta"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.delta"] + # The event type identifier. end class BetaResponseCustomToolCallInputWsDone < OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent @@ -2043,25 +2259,29 @@ class BetaResponseCustomToolCallInputWsDone < OpenAI::Models::Beta::BetaResponse optional :stream_id, String # @!method initialize(input:, item_id:, output_index:, sequence_number:, agent: nil, stream_id: nil, type: :"response.custom_tool_call_input.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseCustomToolCallInputWsDone} - # for more details. - # # Event indicating that input for a custom tool call is complete. # - # @param input [String] The complete input data for the custom tool call. + # @param input [String] + # The complete input data for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this event applies to. + # @param output_index [Integer] + # The index of the output this event applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponseCustomToolCallInputDoneEvent::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.custom_tool_call_input.done"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.done"] + # The event type identifier. end class BetaResponseWsError < OpenAI::Internal::Type::BaseModel @@ -2109,23 +2329,26 @@ class BetaResponseWsError < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(error:, agent: nil, sequence_number: nil, status: nil, stream_id: nil, type: :error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError} for more - # details. - # # Emitted when an error occurs while processing a Responses WebSocket request. # - # @param error [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error] Details about the error. + # @param error [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error] + # Details about the error. # - # @param agent [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Agent, nil] The agent that owns this multi-agent streaming event. + # @param agent [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Agent, nil] + # The agent that owns this multi-agent streaming event. # - # @param sequence_number [Integer] The sequence number of an error emitted by the response stream. + # @param sequence_number [Integer] + # The sequence number of an error emitted by the response stream. # - # @param status [Integer] The HTTP status code associated with a WebSocket protocol error. + # @param status [Integer] + # The HTTP status code associated with a WebSocket protocol error. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when the + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :error] The type of the event. Always `error`. + # @param type [Symbol, :error] + # The type of the event. Always `error`. # @see OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError#error class Error < OpenAI::Internal::Type::BaseModel @@ -2170,15 +2393,20 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, param:, type:, headers: nil, misalignment: nil) # Details about the error. # - # @param code [String, nil] The error code that was emitted, if any. + # @param code [String, nil] + # The error code that was emitted, if any. # - # @param message [String] The human-readable error message that was emitted. + # @param message [String] + # The human-readable error message that was emitted. # - # @param param [String, nil] The parameter name that was associated with the error, if any. + # @param param [String, nil] + # The parameter name that was associated with the error, if any. # - # @param type [String] The error type that was emitted. + # @param type [String] + # The error type that was emitted. # - # @param headers [Hash{Symbol=>String}] The response headers that were emitted with the error, if any. + # @param headers [Hash{Symbol=>String}] + # The response headers that were emitted with the error, if any. # # @param misalignment [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment] @@ -2211,11 +2439,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -2282,7 +2513,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end @@ -2298,7 +2530,8 @@ class Agent < OpenAI::Internal::Type::BaseModel # @!method initialize(agent_name:) # The agent that owns this multi-agent streaming event. # - # @param agent_name [String] The canonical name of the agent that produced this item. + # @param agent_name [String] + # The canonical name of the agent that produced this item. end end diff --git a/lib/openai/models/beta/beta_skill_reference.rb b/lib/openai/models/beta/beta_skill_reference.rb index 7e055a507..f13beaafb 100644 --- a/lib/openai/models/beta/beta_skill_reference.rb +++ b/lib/openai/models/beta/beta_skill_reference.rb @@ -23,11 +23,14 @@ class BetaSkillReference < OpenAI::Internal::Type::BaseModel optional :version, String # @!method initialize(skill_id:, version: nil, type: :skill_reference) - # @param skill_id [String] The ID of the referenced skill. + # @param skill_id [String] + # The ID of the referenced skill. # - # @param version [String] Optional skill version. Use a positive integer or 'latest'. Omit for default. + # @param version [String] + # Optional skill version. Use a positive integer or 'latest'. Omit for default. # - # @param type [Symbol, :skill_reference] References a skill created with the /v1/skills endpoint. + # @param type [Symbol, :skill_reference] + # References a skill created with the /v1/skills endpoint. end end diff --git a/lib/openai/models/beta/beta_tool.rb b/lib/openai/models/beta/beta_tool.rb index d6026af70..e98e7ed44 100644 --- a/lib/openai/models/beta/beta_tool.rb +++ b/lib/openai/models/beta/beta_tool.rb @@ -9,20 +9,20 @@ module BetaTool discriminator :type - # Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + # Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). variant :function, -> { OpenAI::Beta::BetaFunctionTool } - # A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). variant :file_search, -> { OpenAI::Beta::BetaFileSearchTool } - # A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). variant :computer, -> { OpenAI::Beta::BetaComputerTool } - # A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). variant :computer_use_preview, -> { OpenAI::Beta::BetaComputerUsePreviewTool } # Give the model access to additional tools via remote Model Context Protocol - # (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). variant :mcp, -> { OpenAI::Beta::BetaTool::Mcp } # A tool that runs Python code to help generate a response to a prompt. @@ -39,7 +39,7 @@ module BetaTool # A tool that allows the model to execute shell commands. variant :shell, -> { OpenAI::Beta::BetaFunctionShellTool } - # A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) variant :custom, -> { OpenAI::Beta::BetaCustomTool } # Groups function/custom tools under a shared namespace. @@ -52,10 +52,10 @@ module BetaTool variant :apply_patch, -> { OpenAI::Beta::BetaApplyPatchTool } # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). variant -> { OpenAI::Beta::BetaWebSearchTool } - # This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). variant -> { OpenAI::Beta::BetaWebSearchPreviewTool } class Mcp < OpenAI::Internal::Type::BaseModel @@ -99,7 +99,7 @@ class Mcp < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -155,37 +155,64 @@ class Mcp < OpenAI::Internal::Type::BaseModel optional :tunnel_id, String # @!method initialize(server_label:, allowed_callers: nil, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::Mcp} for more details. - # # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - # @param server_label [String] A label for this MCP server, used to identify it in tool calls. + # @param server_label [String] + # A label for this MCP server, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param allowed_tools [Array, OpenAI::Models::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object. + # @param allowed_tools [Array, OpenAI::Models::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter, nil] + # List of allowed tool names or a filter object. # - # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either + # @param authorization [String] + # An OAuth access token that can be used with a remote MCP server, either with a + # custom MCP server URL or a service connector. Your application must handle the + # OAuth authorization flow and provide the token here. # - # @param connector_id [Symbol, OpenAI::Models::Beta::BetaTool::Mcp::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of + # @param connector_id [Symbol, OpenAI::Models::Beta::BetaTool::Mcp::ConnectorID] + # Identifier for service connectors, like those available in ChatGPT. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about + # service connectors + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # - # @param defer_loading [Boolean] Whether this MCP tool is deferred and discovered via tool search. + # Currently supported `connector_id` values are: # - # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication + # - Dropbox: `connector_dropbox` + # - Gmail: `connector_gmail` + # - Google Calendar: `connector_googlecalendar` + # - Google Drive: `connector_googledrive` + # - Microsoft Teams: `connector_microsoftteams` + # - Outlook Calendar: `connector_outlookcalendar` + # - Outlook Email: `connector_outlookemail` + # - SharePoint: `connector_sharepoint` # - # @param require_approval [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval. + # @param defer_loading [Boolean] + # Whether this MCP tool is deferred and discovered via tool search. # - # @param server_description [String] Optional description of the MCP server, used to provide more context. + # @param headers [Hash{Symbol=>String}, nil] + # Optional HTTP headers to send to the MCP server. Use for authentication or other + # purposes. # - # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or + # @param require_approval [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting, nil] + # Specify which of the MCP server's tools require approval. # - # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # @param server_description [String] + # Optional description of the MCP server, used to provide more context. # - # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`. - + # @param server_url [String] + # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` + # must be provided. + # + # @param tunnel_id [String] + # The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. + # + # @param type [Symbol, :mcp] + # The type of the MCP tool. Always `mcp`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -225,15 +252,16 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter} for more - # details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @!method self.variants @@ -246,7 +274,7 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -306,16 +334,14 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel optional :never, -> { OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never } # @!method initialize(always: nil, never: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter} - # for more details. - # # Specify which of the MCP server's tools require approval. Can be `always`, # `never`, or a filter object associated with tools that require approval. # - # @param always [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed. + # @param always [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always] + # A filter object to specify which tools are allowed. # - # @param never [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed. + # @param never [OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never] + # A filter object to specify which tools are allowed. # @see OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter#always class Always < OpenAI::Internal::Type::BaseModel @@ -335,15 +361,16 @@ class Always < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @see OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter#never @@ -364,15 +391,16 @@ class Never < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end end @@ -422,16 +450,18 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(container:, allowed_callers: nil, type: :code_interpreter) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::CodeInterpreter} for more details. - # # A tool that runs Python code to help generate a response to a prompt. # - # @param container [String, OpenAI::Models::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto] The code interpreter container. Can be a container ID or an object that + # @param container [String, OpenAI::Models::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto] + # The code interpreter container. Can be a container ID or an object that + # specifies uploaded file IDs to make available to your code, along with an + # optional `memory_limit` setting. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param type [Symbol, :code_interpreter] The type of the code interpreter tool. Always `code_interpreter`. + # @param type [Symbol, :code_interpreter] + # The type of the code interpreter tool. Always `code_interpreter`. # The code interpreter container. Can be a container ID or an object that # specifies uploaded file IDs to make available to your code, along with an @@ -487,13 +517,17 @@ class CodeInterpreterToolAuto < OpenAI::Internal::Type::BaseModel # Configuration for a code interpreter container. Optionally specify the IDs of # the files to run the code on. # - # @param file_ids [Array] An optional list of uploaded files to make available to your code. + # @param file_ids [Array] + # An optional list of uploaded files to make available to your code. # - # @param memory_limit [Symbol, OpenAI::Models::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit, nil] The memory limit for the code interpreter container. + # @param memory_limit [Symbol, OpenAI::Models::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit, nil] + # The memory limit for the code interpreter container. # - # @param network_policy [OpenAI::Models::Beta::BetaContainerNetworkPolicyDisabled, OpenAI::Models::Beta::BetaContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Beta::BetaContainerNetworkPolicyDisabled, OpenAI::Models::Beta::BetaContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. # The memory limit for the code interpreter container. # @@ -550,7 +584,8 @@ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The type of the tool. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The type of the tool. Always `programmatic_tool_calling`. end class ImageGeneration < OpenAI::Internal::Type::BaseModel @@ -665,34 +700,75 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel optional :size, union: -> { OpenAI::Beta::BetaTool::ImageGeneration::Size } # @!method initialize(action: nil, background: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, type: :image_generation) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::ImageGeneration} for more details. - # # A tool that generates images using the GPT image models. # - # @param action [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Action] Whether to generate a new image or edit an existing image. Default: `auto`. - # - # @param background [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Background] Allows to set transparency for the background of the generated image(s). Must - # - # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es - # - # @param input_image_mask [OpenAI::Models::Beta::BetaTool::ImageGeneration::InputImageMask] Optional mask for inpainting. Contains `image_url` - # - # @param model [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Model] The image generation model to use. One of `gpt-image-1`, - # - # @param moderation [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Moderation] Moderation level for the generated image. Default: `auto`. - # - # @param output_compression [Integer] Compression level for the output image. Default: 100. - # - # @param output_format [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat] The output format of the generated image. One of `png`, `webp`, or - # - # @param partial_images [Integer] Number of partial images to generate in streaming mode, from 0 (default value) t - # - # @param quality [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Quality] The quality of the generated image. The GPT image models support `low`, - # - # @param size [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Size] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param type [Symbol, :image_generation] The type of the image generation tool. Always `image_generation`. + # @param action [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Action] + # Whether to generate a new image or edit an existing image. Default: `auto`. + # + # @param background [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Background] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil] + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. This parameter is only supported + # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for + # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + # + # @param input_image_mask [OpenAI::Models::Beta::BetaTool::ImageGeneration::InputImageMask] + # Optional mask for inpainting. Contains `image_url` (string, optional) and + # `file_id` (string, optional). + # + # @param model [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Model] + # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`. Default: `gpt-image-1`. + # + # @param moderation [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Moderation] + # Moderation level for the generated image. Default: `auto`. + # + # @param output_compression [Integer] + # Compression level for the output image. Default: 100. + # + # @param output_format [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat] + # The output format of the generated image. One of `png`, `webp`, or `jpeg`. + # Default: `png`. + # + # @param partial_images [Integer] + # Number of partial images to generate in streaming mode, from 0 (default value) + # to 3. + # + # @param quality [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Quality] + # The quality of the generated image. The GPT image models support `low`, + # `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, + # including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: + # `auto`. + # + # @param size [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Size] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param type [Symbol, :image_generation] + # The type of the image generation tool. Always `image_generation`. # Whether to generate a new image or edit an existing image. Default: `auto`. # @@ -761,16 +837,14 @@ class InputImageMask < OpenAI::Internal::Type::BaseModel optional :image_url, String # @!method initialize(file_id: nil, image_url: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaTool::ImageGeneration::InputImageMask} for more - # details. - # # Optional mask for inpainting. Contains `image_url` (string, optional) and # `file_id` (string, optional). # - # @param file_id [String] File ID for the mask image. + # @param file_id [String] + # File ID for the mask image. # - # @param image_url [String] Base64-encoded mask image. + # @param image_url [String] + # Base64-encoded mask image. end # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, @@ -935,7 +1009,8 @@ class LocalShell < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :local_shell) # A tool that allows the model to execute shell commands in a local environment. # - # @param type [Symbol, :local_shell] The type of the local shell tool. Always `local_shell`. + # @param type [Symbol, :local_shell] + # The type of the local shell tool. Always `local_shell`. end # @!method self.variants diff --git a/lib/openai/models/beta/beta_tool_choice_allowed.rb b/lib/openai/models/beta/beta_tool_choice_allowed.rb index eb4206b25..9f2062c31 100644 --- a/lib/openai/models/beta/beta_tool_choice_allowed.rb +++ b/lib/openai/models/beta/beta_tool_choice_allowed.rb @@ -41,16 +41,31 @@ class BetaToolChoiceAllowed < OpenAI::Internal::Type::BaseModel required :type, const: :allowed_tools # @!method initialize(mode:, tools:, type: :allowed_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaToolChoiceAllowed} for more details. - # # Constrains the tools available to the model to a pre-defined set. # - # @param mode [Symbol, OpenAI::Models::Beta::BetaToolChoiceAllowed::Mode] Constrains the tools available to the model to a pre-defined set. + # @param mode [Symbol, OpenAI::Models::Beta::BetaToolChoiceAllowed::Mode] + # Constrains the tools available to the model to a pre-defined set. + # + # `auto` allows the model to pick from among the allowed tools and generate a + # message. + # + # `required` requires the model to call one or more of the allowed tools. + # + # @param tools [ArrayObject}>] + # A list of tool definitions that the model should be allowed to call. + # + # For the Responses API, the list of tool definitions might look like: # - # @param tools [ArrayObject}>] A list of tool definitions that the model should be allowed to call. + # ```json + # [ + # { "type": "function", "name": "get_weather" }, + # { "type": "mcp", "server_label": "deepwiki" }, + # { "type": "image_generation" } + # ] + # ``` # - # @param type [Symbol, :allowed_tools] Allowed tool configuration type. Always `allowed_tools`. + # @param type [Symbol, :allowed_tools] + # Allowed tool configuration type. Always `allowed_tools`. # Constrains the tools available to the model to a pre-defined set. # diff --git a/lib/openai/models/beta/beta_tool_choice_apply_patch.rb b/lib/openai/models/beta/beta_tool_choice_apply_patch.rb index ac5208730..fc4700dfe 100644 --- a/lib/openai/models/beta/beta_tool_choice_apply_patch.rb +++ b/lib/openai/models/beta/beta_tool_choice_apply_patch.rb @@ -13,7 +13,8 @@ class BetaToolChoiceApplyPatch < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :apply_patch) # Forces the model to call the apply_patch tool when executing a tool call. # - # @param type [Symbol, :apply_patch] The tool to call. Always `apply_patch`. + # @param type [Symbol, :apply_patch] + # The tool to call. Always `apply_patch`. end end diff --git a/lib/openai/models/beta/beta_tool_choice_custom.rb b/lib/openai/models/beta/beta_tool_choice_custom.rb index 108f9e149..1715fc80d 100644 --- a/lib/openai/models/beta/beta_tool_choice_custom.rb +++ b/lib/openai/models/beta/beta_tool_choice_custom.rb @@ -19,9 +19,11 @@ class BetaToolChoiceCustom < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, type: :custom) # Use this option to force the model to call a specific custom tool. # - # @param name [String] The name of the custom tool to call. + # @param name [String] + # The name of the custom tool to call. # - # @param type [Symbol, :custom] For custom tool calling, the type is always `custom`. + # @param type [Symbol, :custom] + # For custom tool calling, the type is always `custom`. end end diff --git a/lib/openai/models/beta/beta_tool_choice_function.rb b/lib/openai/models/beta/beta_tool_choice_function.rb index 934e357f4..2b2ef160d 100644 --- a/lib/openai/models/beta/beta_tool_choice_function.rb +++ b/lib/openai/models/beta/beta_tool_choice_function.rb @@ -19,9 +19,11 @@ class BetaToolChoiceFunction < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, type: :function) # Use this option to force the model to call a specific function. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. # - # @param type [Symbol, :function] For function calling, the type is always `function`. + # @param type [Symbol, :function] + # For function calling, the type is always `function`. end end diff --git a/lib/openai/models/beta/beta_tool_choice_mcp.rb b/lib/openai/models/beta/beta_tool_choice_mcp.rb index bca36aa07..f5a0b0d83 100644 --- a/lib/openai/models/beta/beta_tool_choice_mcp.rb +++ b/lib/openai/models/beta/beta_tool_choice_mcp.rb @@ -23,17 +23,17 @@ class BetaToolChoiceMcp < OpenAI::Internal::Type::BaseModel optional :name, String, nil?: true # @!method initialize(server_label:, name: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaToolChoiceMcp} for more details. - # # Use this option to force the model to call a specific tool on a remote MCP # server. # - # @param server_label [String] The label of the MCP server to use. + # @param server_label [String] + # The label of the MCP server to use. # - # @param name [String, nil] The name of the tool to call on the server. + # @param name [String, nil] + # The name of the tool to call on the server. # - # @param type [Symbol, :mcp] For MCP tools, the type is always `mcp`. + # @param type [Symbol, :mcp] + # For MCP tools, the type is always `mcp`. end end diff --git a/lib/openai/models/beta/beta_tool_choice_shell.rb b/lib/openai/models/beta/beta_tool_choice_shell.rb index 3268b21fe..0555676ac 100644 --- a/lib/openai/models/beta/beta_tool_choice_shell.rb +++ b/lib/openai/models/beta/beta_tool_choice_shell.rb @@ -13,7 +13,8 @@ class BetaToolChoiceShell < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :shell) # Forces the model to call the shell tool when a tool call is required. # - # @param type [Symbol, :shell] The tool to call. Always `shell`. + # @param type [Symbol, :shell] + # The tool to call. Always `shell`. end end diff --git a/lib/openai/models/beta/beta_tool_choice_types.rb b/lib/openai/models/beta/beta_tool_choice_types.rb index 932a8ead6..48dfeaab2 100644 --- a/lib/openai/models/beta/beta_tool_choice_types.rb +++ b/lib/openai/models/beta/beta_tool_choice_types.rb @@ -6,7 +6,7 @@ module Beta class BetaToolChoiceTypes < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -22,16 +22,25 @@ class BetaToolChoiceTypes < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Beta::BetaToolChoiceTypes::Type } # @!method initialize(type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaToolChoiceTypes} for more details. - # # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). + # + # @param type [Symbol, OpenAI::Models::Beta::BetaToolChoiceTypes::Type] + # The type of hosted tool the model should to use. Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # + # Allowed values are: # - # @param type [Symbol, OpenAI::Models::Beta::BetaToolChoiceTypes::Type] The type of hosted tool the model should to use. Learn more about + # - `file_search` + # - `web_search_preview` + # - `computer` + # - `computer_use_preview` + # - `computer_use` + # - `code_interpreter` + # - `image_generation` # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # diff --git a/lib/openai/models/beta/beta_tool_search_tool.rb b/lib/openai/models/beta/beta_tool_search_tool.rb index 1748c9353..841df19ce 100644 --- a/lib/openai/models/beta/beta_tool_search_tool.rb +++ b/lib/openai/models/beta/beta_tool_search_tool.rb @@ -31,13 +31,17 @@ class BetaToolSearchTool < OpenAI::Internal::Type::BaseModel # @!method initialize(description: nil, execution: nil, parameters: nil, type: :tool_search) # Hosted or BYOT tool search configuration for deferred tools. # - # @param description [String, nil] Description shown to the model for a client-executed tool search tool. + # @param description [String, nil] + # Description shown to the model for a client-executed tool search tool. # - # @param execution [Symbol, OpenAI::Models::Beta::BetaToolSearchTool::Execution] Whether tool search is executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Beta::BetaToolSearchTool::Execution] + # Whether tool search is executed by the server or by the client. # - # @param parameters [Object, nil] Parameter schema for a client-executed tool search tool. + # @param parameters [Object, nil] + # Parameter schema for a client-executed tool search tool. # - # @param type [Symbol, :tool_search] The type of the tool. Always `tool_search`. + # @param type [Symbol, :tool_search] + # The type of the tool. Always `tool_search`. # Whether tool search is executed by the server or by the client. # diff --git a/lib/openai/models/beta/beta_web_search_preview_tool.rb b/lib/openai/models/beta/beta_web_search_preview_tool.rb index 31b28dd9d..b2a14da17 100644 --- a/lib/openai/models/beta/beta_web_search_preview_tool.rb +++ b/lib/openai/models/beta/beta_web_search_preview_tool.rb @@ -33,20 +33,22 @@ class BetaWebSearchPreviewTool < OpenAI::Internal::Type::BaseModel optional :user_location, -> { OpenAI::Beta::BetaWebSearchPreviewTool::UserLocation }, nil?: true # @!method initialize(type:, search_content_types: nil, search_context_size: nil, user_location: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaWebSearchPreviewTool} for more details. - # # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchPreviewTool::Type] The type of the web search tool. One of `web_search_preview` or `web_search_prev + # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchPreviewTool::Type] + # The type of the web search tool. One of `web_search_preview` or + # `web_search_preview_2025_03_11`. # # @param search_content_types [Array] # - # @param search_context_size [Symbol, OpenAI::Models::Beta::BetaWebSearchPreviewTool::SearchContextSize] High level guidance for the amount of context window space to use for the search + # @param search_context_size [Symbol, OpenAI::Models::Beta::BetaWebSearchPreviewTool::SearchContextSize] + # High level guidance for the amount of context window space to use for the + # search. One of `low`, `medium`, or `high`. `medium` is the default. # - # @param user_location [OpenAI::Models::Beta::BetaWebSearchPreviewTool::UserLocation, nil] The user's location. + # @param user_location [OpenAI::Models::Beta::BetaWebSearchPreviewTool::UserLocation, nil] + # The user's location. # The type of the web search tool. One of `web_search_preview` or # `web_search_preview_2025_03_11`. @@ -122,20 +124,24 @@ class UserLocation < OpenAI::Internal::Type::BaseModel optional :timezone, String, nil?: true # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaWebSearchPreviewTool::UserLocation} for more details. - # # The user's location. # - # @param city [String, nil] Free text input for the city of the user, e.g. `San Francisco`. + # @param city [String, nil] + # Free text input for the city of the user, e.g. `San Francisco`. # - # @param country [String, nil] The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of t + # @param country [String, nil] + # The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of + # the user, e.g. `US`. # - # @param region [String, nil] Free text input for the region of the user, e.g. `California`. + # @param region [String, nil] + # Free text input for the region of the user, e.g. `California`. # - # @param timezone [String, nil] The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user + # @param timezone [String, nil] + # The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the + # user, e.g. `America/Los_Angeles`. # - # @param type [Symbol, :approximate] The type of location approximation. Always `approximate`. + # @param type [Symbol, :approximate] + # The type of location approximation. Always `approximate`. end end end diff --git a/lib/openai/models/beta/beta_web_search_tool.rb b/lib/openai/models/beta/beta_web_search_tool.rb index a702d4abf..6f5c0ca51 100644 --- a/lib/openai/models/beta/beta_web_search_tool.rb +++ b/lib/openai/models/beta/beta_web_search_tool.rb @@ -38,21 +38,26 @@ class BetaWebSearchTool < OpenAI::Internal::Type::BaseModel optional :user_location, -> { OpenAI::Beta::BetaWebSearchTool::UserLocation }, nil?: true # @!method initialize(type:, external_web_access: nil, filters: nil, search_context_size: nil, user_location: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaWebSearchTool} for more details. - # # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::Type] The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::Type] + # The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. # - # @param external_web_access [Boolean] Allow live internet access for web search. Defaults to true when omitted. When f + # @param external_web_access [Boolean] + # Allow live internet access for web search. Defaults to true when omitted. When + # false, the web search tool runs in offline/cache-only mode and will not fetch + # new external content. # - # @param filters [OpenAI::Models::Beta::BetaWebSearchTool::Filters, nil] Filters for the search. + # @param filters [OpenAI::Models::Beta::BetaWebSearchTool::Filters, nil] + # Filters for the search. # - # @param search_context_size [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::SearchContextSize] High level guidance for the amount of context window space to use for the search + # @param search_context_size [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::SearchContextSize] + # High level guidance for the amount of context window space to use for the + # search. One of `low`, `medium`, or `high`. `medium` is the default. # - # @param user_location [OpenAI::Models::Beta::BetaWebSearchTool::UserLocation, nil] The approximate location of the user. + # @param user_location [OpenAI::Models::Beta::BetaWebSearchTool::UserLocation, nil] + # The approximate location of the user. # The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. # @@ -79,12 +84,13 @@ class Filters < OpenAI::Internal::Type::BaseModel optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(allowed_domains: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaWebSearchTool::Filters} for more details. - # # Filters for the search. # - # @param allowed_domains [Array, nil] Allowed domains for the search. If not provided, all domains are allowed. + # @param allowed_domains [Array, nil] + # Allowed domains for the search. If not provided, all domains are allowed. + # Subdomains of the provided domains are allowed as well. + # + # Example: `["pubmed.ncbi.nlm.nih.gov"]` end # High level guidance for the amount of context window space to use for the @@ -137,20 +143,24 @@ class UserLocation < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Beta::BetaWebSearchTool::UserLocation::Type } # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::BetaWebSearchTool::UserLocation} for more details. - # # The approximate location of the user. # - # @param city [String, nil] Free text input for the city of the user, e.g. `San Francisco`. + # @param city [String, nil] + # Free text input for the city of the user, e.g. `San Francisco`. # - # @param country [String, nil] The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of t + # @param country [String, nil] + # The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of + # the user, e.g. `US`. # - # @param region [String, nil] Free text input for the region of the user, e.g. `California`. + # @param region [String, nil] + # Free text input for the region of the user, e.g. `California`. # - # @param timezone [String, nil] The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user + # @param timezone [String, nil] + # The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the + # user, e.g. `America/Los_Angeles`. # - # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::UserLocation::Type] The type of location approximation. Always `approximate`. + # @param type [Symbol, OpenAI::Models::Beta::BetaWebSearchTool::UserLocation::Type] + # The type of location approximation. Always `approximate`. # The type of location approximation. Always `approximate`. # diff --git a/lib/openai/models/beta/chatkit/chat_session.rb b/lib/openai/models/beta/chatkit/chat_session.rb index d4e992de4..35bd20fef 100644 --- a/lib/openai/models/beta/chatkit/chat_session.rb +++ b/lib/openai/models/beta/chatkit/chat_session.rb @@ -68,25 +68,35 @@ class ChatSession < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, chatkit_configuration:, client_secret:, expires_at:, max_requests_per_1_minute:, rate_limits:, status:, user:, workflow:, object: :"chatkit.session") # Represents a ChatKit session and its resolved configuration. # - # @param id [String] Identifier for the ChatKit session. + # @param id [String] + # Identifier for the ChatKit session. # - # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfiguration] Resolved ChatKit feature configuration for the session. + # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfiguration] + # Resolved ChatKit feature configuration for the session. # - # @param client_secret [String] Ephemeral client secret that authenticates session requests. + # @param client_secret [String] + # Ephemeral client secret that authenticates session requests. # - # @param expires_at [Integer] Unix timestamp (in seconds) for when the session expires. + # @param expires_at [Integer] + # Unix timestamp (in seconds) for when the session expires. # - # @param max_requests_per_1_minute [Integer] Convenience copy of the per-minute request limit. + # @param max_requests_per_1_minute [Integer] + # Convenience copy of the per-minute request limit. # - # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimits] Resolved rate limit values. + # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimits] + # Resolved rate limit values. # - # @param status [Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionStatus] Current lifecycle state of the session. + # @param status [Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionStatus] + # Current lifecycle state of the session. # - # @param user [String] User identifier associated with the session. + # @param user [String] + # User identifier associated with the session. # - # @param workflow [OpenAI::Models::Beta::ChatKitWorkflow] Workflow metadata for the session. + # @param workflow [OpenAI::Models::Beta::ChatKitWorkflow] + # Workflow metadata for the session. # - # @param object [Symbol, :"chatkit.session"] Type discriminator that is always `chatkit.session`. + # @param object [Symbol, :"chatkit.session"] + # Type discriminator that is always `chatkit.session`. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rb b/lib/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rb index 4fab5d6e5..42030ab0c 100644 --- a/lib/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rb +++ b/lib/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rb @@ -14,7 +14,8 @@ class ChatSessionAutomaticThreadTitling < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Automatic thread title preferences for the session. # - # @param enabled [Boolean] Whether automatic thread titling is enabled. + # @param enabled [Boolean] + # Whether automatic thread titling is enabled. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration.rb b/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration.rb index cad3b35aa..ab440a0f3 100644 --- a/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration.rb +++ b/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration.rb @@ -26,11 +26,14 @@ class ChatSessionChatKitConfiguration < OpenAI::Internal::Type::BaseModel # @!method initialize(automatic_thread_titling:, file_upload:, history:) # ChatKit configuration for the session. # - # @param automatic_thread_titling [OpenAI::Models::Beta::ChatKit::ChatSessionAutomaticThreadTitling] Automatic thread titling preferences. + # @param automatic_thread_titling [OpenAI::Models::Beta::ChatKit::ChatSessionAutomaticThreadTitling] + # Automatic thread titling preferences. # - # @param file_upload [OpenAI::Models::Beta::ChatKit::ChatSessionFileUpload] Upload settings for the session. + # @param file_upload [OpenAI::Models::Beta::ChatKit::ChatSessionFileUpload] + # Upload settings for the session. # - # @param history [OpenAI::Models::Beta::ChatKit::ChatSessionHistory] History retention configuration. + # @param history [OpenAI::Models::Beta::ChatKit::ChatSessionHistory] + # History retention configuration. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rb b/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rb index aa350d328..0990825f0 100644 --- a/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rb +++ b/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rb @@ -30,17 +30,19 @@ class ChatSessionChatKitConfigurationParam < OpenAI::Internal::Type::BaseModel optional :history, -> { OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History } # @!method initialize(automatic_thread_titling: nil, file_upload: nil, history: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam} for more - # details. - # # Optional per-session configuration settings for ChatKit behavior. # - # @param automatic_thread_titling [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling] Configuration for automatic thread titling. When omitted, automatic thread titli + # @param automatic_thread_titling [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling] + # Configuration for automatic thread titling. When omitted, automatic thread + # titling is enabled by default. # - # @param file_upload [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload] Configuration for upload enablement and limits. When omitted, uploads are disabl + # @param file_upload [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload] + # Configuration for upload enablement and limits. When omitted, uploads are + # disabled by default (max_files 10, max_file_size 512 MB). # - # @param history [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History] Configuration for chat history retention. When omitted, history is enabled by de + # @param history [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History] + # Configuration for chat history retention. When omitted, history is enabled by + # default with no limit on recent_threads (null). # @see OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam#automatic_thread_titling class AutomaticThreadTitling < OpenAI::Internal::Type::BaseModel @@ -54,7 +56,8 @@ class AutomaticThreadTitling < OpenAI::Internal::Type::BaseModel # Configuration for automatic thread titling. When omitted, automatic thread # titling is enabled by default. # - # @param enabled [Boolean] Enable automatic thread title generation. Defaults to true. + # @param enabled [Boolean] + # Enable automatic thread title generation. Defaults to true. end # @see OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam#file_upload @@ -79,18 +82,18 @@ class FileUpload < OpenAI::Internal::Type::BaseModel optional :max_files, Integer # @!method initialize(enabled: nil, max_file_size: nil, max_files: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload} - # for more details. - # # Configuration for upload enablement and limits. When omitted, uploads are # disabled by default (max_files 10, max_file_size 512 MB). # - # @param enabled [Boolean] Enable uploads for this session. Defaults to false. + # @param enabled [Boolean] + # Enable uploads for this session. Defaults to false. # - # @param max_file_size [Integer] Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is t + # @param max_file_size [Integer] + # Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is + # the maximum allowable size. # - # @param max_files [Integer] Maximum number of files that can be uploaded to the session. Defaults to 10. + # @param max_files [Integer] + # Maximum number of files that can be uploaded to the session. Defaults to 10. end # @see OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam#history @@ -109,16 +112,15 @@ class History < OpenAI::Internal::Type::BaseModel optional :recent_threads, Integer # @!method initialize(enabled: nil, recent_threads: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History} - # for more details. - # # Configuration for chat history retention. When omitted, history is enabled by # default with no limit on recent_threads (null). # - # @param enabled [Boolean] Enables chat users to access previous ChatKit threads. Defaults to true. + # @param enabled [Boolean] + # Enables chat users to access previous ChatKit threads. Defaults to true. # - # @param recent_threads [Integer] Number of recent ChatKit threads users have access to. Defaults to unlimited whe + # @param recent_threads [Integer] + # Number of recent ChatKit threads users have access to. Defaults to unlimited + # when unset. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_expires_after_param.rb b/lib/openai/models/beta/chatkit/chat_session_expires_after_param.rb index 071b3ae4f..ed50877f6 100644 --- a/lib/openai/models/beta/chatkit/chat_session_expires_after_param.rb +++ b/lib/openai/models/beta/chatkit/chat_session_expires_after_param.rb @@ -20,9 +20,11 @@ class ChatSessionExpiresAfterParam < OpenAI::Internal::Type::BaseModel # @!method initialize(seconds:, anchor: :created_at) # Controls when the session expires relative to an anchor timestamp. # - # @param seconds [Integer] Number of seconds after the anchor when the session expires. + # @param seconds [Integer] + # Number of seconds after the anchor when the session expires. # - # @param anchor [Symbol, :created_at] Base timestamp used to calculate expiration. Currently fixed to `created_at`. + # @param anchor [Symbol, :created_at] + # Base timestamp used to calculate expiration. Currently fixed to `created_at`. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_file_upload.rb b/lib/openai/models/beta/chatkit/chat_session_file_upload.rb index 2eb1db796..b78195687 100644 --- a/lib/openai/models/beta/chatkit/chat_session_file_upload.rb +++ b/lib/openai/models/beta/chatkit/chat_session_file_upload.rb @@ -26,11 +26,14 @@ class ChatSessionFileUpload < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:, max_file_size:, max_files:) # Upload permissions and limits applied to the session. # - # @param enabled [Boolean] Indicates if uploads are enabled for the session. + # @param enabled [Boolean] + # Indicates if uploads are enabled for the session. # - # @param max_file_size [Integer, nil] Maximum upload size in megabytes. + # @param max_file_size [Integer, nil] + # Maximum upload size in megabytes. # - # @param max_files [Integer, nil] Maximum number of uploads allowed during the session. + # @param max_files [Integer, nil] + # Maximum number of uploads allowed during the session. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_history.rb b/lib/openai/models/beta/chatkit/chat_session_history.rb index 8defcd7e1..579e5ab41 100644 --- a/lib/openai/models/beta/chatkit/chat_session_history.rb +++ b/lib/openai/models/beta/chatkit/chat_session_history.rb @@ -19,14 +19,14 @@ class ChatSessionHistory < OpenAI::Internal::Type::BaseModel required :recent_threads, Integer, nil?: true # @!method initialize(enabled:, recent_threads:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatSessionHistory} for more details. - # # History retention preferences returned for the session. # - # @param enabled [Boolean] Indicates if chat history is persisted for the session. + # @param enabled [Boolean] + # Indicates if chat history is persisted for the session. # - # @param recent_threads [Integer, nil] Number of prior threads surfaced in history views. Defaults to null when all his + # @param recent_threads [Integer, nil] + # Number of prior threads surfaced in history views. Defaults to null when all + # history is retained. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_rate_limits.rb b/lib/openai/models/beta/chatkit/chat_session_rate_limits.rb index 79e9a97b0..236cbfc52 100644 --- a/lib/openai/models/beta/chatkit/chat_session_rate_limits.rb +++ b/lib/openai/models/beta/chatkit/chat_session_rate_limits.rb @@ -14,7 +14,8 @@ class ChatSessionRateLimits < OpenAI::Internal::Type::BaseModel # @!method initialize(max_requests_per_1_minute:) # Active per-minute request limit for the session. # - # @param max_requests_per_1_minute [Integer] Maximum allowed requests per one-minute window. + # @param max_requests_per_1_minute [Integer] + # Maximum allowed requests per one-minute window. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_rate_limits_param.rb b/lib/openai/models/beta/chatkit/chat_session_rate_limits_param.rb index 4f889e5a9..4f8434926 100644 --- a/lib/openai/models/beta/chatkit/chat_session_rate_limits_param.rb +++ b/lib/openai/models/beta/chatkit/chat_session_rate_limits_param.rb @@ -14,7 +14,8 @@ class ChatSessionRateLimitsParam < OpenAI::Internal::Type::BaseModel # @!method initialize(max_requests_per_1_minute: nil) # Controls request rate limits for the session. # - # @param max_requests_per_1_minute [Integer] Maximum number of requests allowed per minute for the session. Defaults to 10. + # @param max_requests_per_1_minute [Integer] + # Maximum number of requests allowed per minute for the session. Defaults to 10. end end end diff --git a/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb b/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb index 05042b7bb..9bd8c6fe6 100644 --- a/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb +++ b/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb @@ -37,19 +37,21 @@ class ChatSessionWorkflowParam < OpenAI::Internal::Type::BaseModel optional :version, String # @!method initialize(id:, state_variables: nil, tracing: nil, version: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam} for more details. - # # Workflow reference and overrides applied to the chat session. # - # @param id [String] Identifier for the workflow invoked by the session. + # @param id [String] + # Identifier for the workflow invoked by the session. # - # @param state_variables [Hash{Symbol=>String, Boolean, Float}] State variables forwarded to the workflow. Keys may be up to 64 characters, valu + # @param state_variables [Hash{Symbol=>String, Boolean, Float}] + # State variables forwarded to the workflow. Keys may be up to 64 characters, + # values must be primitive types, and the map defaults to an empty object. # - # @param tracing [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::Tracing] Optional tracing overrides for the workflow invocation. When omitted, tracing is + # @param tracing [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::Tracing] + # Optional tracing overrides for the workflow invocation. When omitted, tracing is + # enabled by default. # - # @param version [String] Specific workflow version to run. Defaults to the latest deployed version. - + # @param version [String] + # Specific workflow version to run. Defaults to the latest deployed version. module StateVariable extend OpenAI::Internal::Type::Union @@ -75,7 +77,8 @@ class Tracing < OpenAI::Internal::Type::BaseModel # Optional tracing overrides for the workflow invocation. When omitted, tracing is # enabled by default. # - # @param enabled [Boolean] Whether tracing is enabled during the session. Defaults to true. + # @param enabled [Boolean] + # Whether tracing is enabled during the session. Defaults to true. end end end diff --git a/lib/openai/models/beta/chatkit/chatkit_attachment.rb b/lib/openai/models/beta/chatkit/chatkit_attachment.rb index f8c1fee0b..d122f2d53 100644 --- a/lib/openai/models/beta/chatkit/chatkit_attachment.rb +++ b/lib/openai/models/beta/chatkit/chatkit_attachment.rb @@ -38,15 +38,20 @@ class ChatKitAttachment < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, mime_type:, name:, preview_url:, type:) # Attachment metadata included on thread items. # - # @param id [String] Identifier for the attachment. + # @param id [String] + # Identifier for the attachment. # - # @param mime_type [String] MIME type of the attachment. + # @param mime_type [String] + # MIME type of the attachment. # - # @param name [String] Original display name for the attachment. + # @param name [String] + # Original display name for the attachment. # - # @param preview_url [String, nil] Preview URL for rendering the attachment inline. + # @param preview_url [String, nil] + # Preview URL for rendering the attachment inline. # - # @param type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitAttachment::Type] Attachment discriminator. + # @param type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitAttachment::Type] + # Attachment discriminator. # Attachment discriminator. # diff --git a/lib/openai/models/beta/chatkit/chatkit_response_output_text.rb b/lib/openai/models/beta/chatkit/chatkit_response_output_text.rb index a0893c999..89b1616e8 100644 --- a/lib/openai/models/beta/chatkit/chatkit_response_output_text.rb +++ b/lib/openai/models/beta/chatkit/chatkit_response_output_text.rb @@ -29,11 +29,14 @@ class ChatKitResponseOutputText < OpenAI::Internal::Type::BaseModel # @!method initialize(annotations:, text:, type: :output_text) # Assistant response text accompanied by optional annotations. # - # @param annotations [Array] Ordered list of annotations attached to the response text. + # @param annotations [Array] + # Ordered list of annotations attached to the response text. # - # @param text [String] Assistant generated text. + # @param text [String] + # Assistant generated text. # - # @param type [Symbol, :output_text] Type discriminator that is always `output_text`. + # @param type [Symbol, :output_text] + # Type discriminator that is always `output_text`. # Annotation object describing a cited source. module Annotation @@ -63,9 +66,11 @@ class File < OpenAI::Internal::Type::BaseModel # @!method initialize(source:, type: :file) # Annotation that references an uploaded file. # - # @param source [OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source] File attachment referenced by the annotation. + # @param source [OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source] + # File attachment referenced by the annotation. # - # @param type [Symbol, :file] Type discriminator that is always `file` for this annotation. + # @param type [Symbol, :file] + # Type discriminator that is always `file` for this annotation. # @see OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File#source class Source < OpenAI::Internal::Type::BaseModel @@ -84,9 +89,11 @@ class Source < OpenAI::Internal::Type::BaseModel # @!method initialize(filename:, type: :file) # File attachment referenced by the annotation. # - # @param filename [String] Filename referenced by the annotation. + # @param filename [String] + # Filename referenced by the annotation. # - # @param type [Symbol, :file] Type discriminator that is always `file`. + # @param type [Symbol, :file] + # Type discriminator that is always `file`. end end @@ -106,9 +113,11 @@ class URL < OpenAI::Internal::Type::BaseModel # @!method initialize(source:, type: :url) # Annotation that references a URL. # - # @param source [OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source] URL referenced by the annotation. + # @param source [OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source] + # URL referenced by the annotation. # - # @param type [Symbol, :url] Type discriminator that is always `url` for this annotation. + # @param type [Symbol, :url] + # Type discriminator that is always `url` for this annotation. # @see OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL#source class Source < OpenAI::Internal::Type::BaseModel @@ -127,9 +136,11 @@ class Source < OpenAI::Internal::Type::BaseModel # @!method initialize(url:, type: :url) # URL referenced by the annotation. # - # @param url [String] URL referenced by the annotation. + # @param url [String] + # URL referenced by the annotation. # - # @param type [Symbol, :url] Type discriminator that is always `url`. + # @param type [Symbol, :url] + # Type discriminator that is always `url`. end end diff --git a/lib/openai/models/beta/chatkit/chatkit_thread.rb b/lib/openai/models/beta/chatkit/chatkit_thread.rb index 2643f5597..444ef5861 100644 --- a/lib/openai/models/beta/chatkit/chatkit_thread.rb +++ b/lib/openai/models/beta/chatkit/chatkit_thread.rb @@ -44,22 +44,26 @@ class ChatKitThread < OpenAI::Internal::Type::BaseModel required :user, String # @!method initialize(id:, created_at:, status:, title:, user:, object: :"chatkit.thread") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatKitThread} for more details. - # # Represents a ChatKit thread and its current status. # - # @param id [String] Identifier of the thread. + # @param id [String] + # Identifier of the thread. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the thread was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the thread was created. # - # @param status [OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Active, OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Locked, OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Closed] Current status for the thread. Defaults to `active` for newly created threads. + # @param status [OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Active, OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Locked, OpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Closed] + # Current status for the thread. Defaults to `active` for newly created threads. # - # @param title [String, nil] Optional human-readable title for the thread. Defaults to null when no title has + # @param title [String, nil] + # Optional human-readable title for the thread. Defaults to null when no title has + # been generated. # - # @param user [String] Free-form string that identifies your end user who owns the thread. + # @param user [String] + # Free-form string that identifies your end user who owns the thread. # - # @param object [Symbol, :"chatkit.thread"] Type discriminator that is always `chatkit.thread`. + # @param object [Symbol, :"chatkit.thread"] + # Type discriminator that is always `chatkit.thread`. # Current status for the thread. Defaults to `active` for newly created threads. # @@ -88,7 +92,8 @@ class Active < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :active) # Indicates that a thread is active. # - # @param type [Symbol, :active] Status discriminator that is always `active`. + # @param type [Symbol, :active] + # Status discriminator that is always `active`. end class Locked < OpenAI::Internal::Type::BaseModel @@ -107,9 +112,11 @@ class Locked < OpenAI::Internal::Type::BaseModel # @!method initialize(reason:, type: :locked) # Indicates that a thread is locked and cannot accept new input. # - # @param reason [String, nil] Reason that the thread was locked. Defaults to null when no reason is recorded. + # @param reason [String, nil] + # Reason that the thread was locked. Defaults to null when no reason is recorded. # - # @param type [Symbol, :locked] Status discriminator that is always `locked`. + # @param type [Symbol, :locked] + # Status discriminator that is always `locked`. end class Closed < OpenAI::Internal::Type::BaseModel @@ -128,9 +135,11 @@ class Closed < OpenAI::Internal::Type::BaseModel # @!method initialize(reason:, type: :closed) # Indicates that a thread has been closed. # - # @param reason [String, nil] Reason that the thread was closed. Defaults to null when no reason is recorded. + # @param reason [String, nil] + # Reason that the thread was closed. Defaults to null when no reason is recorded. # - # @param type [Symbol, :closed] Status discriminator that is always `closed`. + # @param type [Symbol, :closed] + # Status discriminator that is always `closed`. end # @!method self.variants diff --git a/lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb b/lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb index ea6bc7fdb..099c5284d 100644 --- a/lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb +++ b/lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb @@ -47,17 +47,23 @@ class ChatKitThreadAssistantMessageItem < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, content:, created_at:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.assistant_message") # Assistant-authored message within a thread. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param content [Array] Ordered assistant response segments. + # @param content [Array] + # Ordered assistant response segments. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # - # @param type [Symbol, :"chatkit.assistant_message"] Type discriminator that is always `chatkit.assistant_message`. + # @param type [Symbol, :"chatkit.assistant_message"] + # Type discriminator that is always `chatkit.assistant_message`. end end diff --git a/lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb b/lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb index b37e6a7d4..2f496f880 100644 --- a/lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb +++ b/lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb @@ -41,15 +41,20 @@ class ChatKitThreadItemList < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) # A paginated list of thread items rendered for the ChatKit API. # - # @param data [Array] A list of items + # @param data [Array] + # A list of items # - # @param first_id [String, nil] The ID of the first item in the list. + # @param first_id [String, nil] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String, nil] The ID of the last item in the list. + # @param last_id [String, nil] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. # User-authored messages within a thread. module Data @@ -144,31 +149,38 @@ class ChatKitClientToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :"chatkit.client_tool_call" # @!method initialize(id:, arguments:, call_id:, created_at:, name:, output:, status:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.client_tool_call") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall} - # for more details. - # # Record of a client side tool invocation initiated by the assistant. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param arguments [String] JSON-encoded arguments that were sent to the tool. + # @param arguments [String] + # JSON-encoded arguments that were sent to the tool. # - # @param call_id [String] Identifier for the client tool call. + # @param call_id [String] + # Identifier for the client tool call. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param name [String] Tool name that was invoked. + # @param name [String] + # Tool name that was invoked. # - # @param output [String, nil] JSON-encoded output captured from the tool. Defaults to null while execution is + # @param output [String, nil] + # JSON-encoded output captured from the tool. Defaults to null while execution is + # in progress. # - # @param status [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status] Execution status for the tool call. + # @param status [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status] + # Execution status for the tool call. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # - # @param type [Symbol, :"chatkit.client_tool_call"] Type discriminator that is always `chatkit.client_tool_call`. + # @param type [Symbol, :"chatkit.client_tool_call"] + # Type discriminator that is always `chatkit.client_tool_call`. # Execution status for the tool call. # @@ -239,21 +251,29 @@ class ChatKitTask < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, heading:, summary:, task_type:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.task") # Task emitted by the workflow to show progress and status updates. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param heading [String, nil] Optional heading for the task. Defaults to null when not provided. + # @param heading [String, nil] + # Optional heading for the task. Defaults to null when not provided. # - # @param summary [String, nil] Optional summary that describes the task. Defaults to null when omitted. + # @param summary [String, nil] + # Optional summary that describes the task. Defaults to null when omitted. # - # @param task_type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType] Subtype for the task. + # @param task_type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType] + # Subtype for the task. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # - # @param type [Symbol, :"chatkit.task"] Type discriminator that is always `chatkit.task`. + # @param type [Symbol, :"chatkit.task"] + # Type discriminator that is always `chatkit.task`. # Subtype for the task. # @@ -316,18 +336,23 @@ class ChatKitTaskGroup < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, tasks:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.task_group") # Collection of workflow tasks grouped together in the thread. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param tasks [Array] Tasks included in the group. + # @param tasks [Array] + # Tasks included in the group. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # - # @param type [Symbol, :"chatkit.task_group"] Type discriminator that is always `chatkit.task_group`. - + # @param type [Symbol, :"chatkit.task_group"] + # Type discriminator that is always `chatkit.task_group`. class Task < OpenAI::Internal::Type::BaseModel # @!attribute heading # Optional heading for the grouped task. Defaults to null when not provided. @@ -351,17 +376,16 @@ class Task < OpenAI::Internal::Type::BaseModel ) # @!method initialize(heading:, summary:, type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task} - # for more details. - # # Task entry that appears within a TaskGroup. # - # @param heading [String, nil] Optional heading for the grouped task. Defaults to null when not provided. + # @param heading [String, nil] + # Optional heading for the grouped task. Defaults to null when not provided. # - # @param summary [String, nil] Optional summary that describes the grouped task. Defaults to null when omitted. + # @param summary [String, nil] + # Optional summary that describes the grouped task. Defaults to null when omitted. # - # @param type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type] Subtype for the grouped task. + # @param type [Symbol, OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type] + # Subtype for the grouped task. # Subtype for the grouped task. # diff --git a/lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb b/lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb index 9d99c5f3f..88c3e64c9 100644 --- a/lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb +++ b/lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb @@ -62,19 +62,26 @@ class ChatKitThreadUserMessageItem < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, attachments:, content:, created_at:, inference_options:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.user_message") # User-authored messages within a thread. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param attachments [Array] Attachments associated with the user message. Defaults to an empty list. + # @param attachments [Array] + # Attachments associated with the user message. Defaults to an empty list. # - # @param content [Array] Ordered content elements supplied by the user. + # @param content [Array] + # Ordered content elements supplied by the user. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param inference_options [OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions, nil] Inference overrides applied to the message. Defaults to null when unset. + # @param inference_options [OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions, nil] + # Inference overrides applied to the message. Defaults to null when unset. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # # @param type [Symbol, :"chatkit.user_message"] @@ -106,9 +113,11 @@ class InputText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :input_text) # Text block that a user contributed to the thread. # - # @param text [String] Plain-text content supplied by the user. + # @param text [String] + # Plain-text content supplied by the user. # - # @param type [Symbol, :input_text] Type discriminator that is always `input_text`. + # @param type [Symbol, :input_text] + # Type discriminator that is always `input_text`. end class QuotedText < OpenAI::Internal::Type::BaseModel @@ -127,9 +136,11 @@ class QuotedText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :quoted_text) # Quoted snippet that the user referenced in their message. # - # @param text [String] Quoted text content. + # @param text [String] + # Quoted text content. # - # @param type [Symbol, :quoted_text] Type discriminator that is always `quoted_text`. + # @param type [Symbol, :quoted_text] + # Type discriminator that is always `quoted_text`. end # @!method self.variants @@ -156,15 +167,14 @@ class InferenceOptions < OpenAI::Internal::Type::BaseModel ) # @!method initialize(model:, tool_choice:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions} - # for more details. - # # Inference overrides applied to the message. Defaults to null when unset. # - # @param model [String, nil] Model name that generated the response. Defaults to null when using the session + # @param model [String, nil] + # Model name that generated the response. Defaults to null when using the session + # default. # - # @param tool_choice [OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions::ToolChoice, nil] Preferred tool to invoke. Defaults to null when ChatKit should auto-select. + # @param tool_choice [OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions::ToolChoice, nil] + # Preferred tool to invoke. Defaults to null when ChatKit should auto-select. # @see OpenAI::Models::Beta::ChatKit::ChatKitThreadUserMessageItem::InferenceOptions#tool_choice class ToolChoice < OpenAI::Internal::Type::BaseModel @@ -177,7 +187,8 @@ class ToolChoice < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Preferred tool to invoke. Defaults to null when ChatKit should auto-select. # - # @param id [String] Identifier of the requested tool. + # @param id [String] + # Identifier of the requested tool. end end end diff --git a/lib/openai/models/beta/chatkit/chatkit_widget_item.rb b/lib/openai/models/beta/chatkit/chatkit_widget_item.rb index 951566be6..10e416710 100644 --- a/lib/openai/models/beta/chatkit/chatkit_widget_item.rb +++ b/lib/openai/models/beta/chatkit/chatkit_widget_item.rb @@ -44,17 +44,23 @@ class ChatKitWidgetItem < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, thread_id:, widget:, object: :"chatkit.thread_item", type: :"chatkit.widget") # Thread item that renders a widget payload. # - # @param id [String] Identifier of the thread item. + # @param id [String] + # Identifier of the thread item. # - # @param created_at [Integer] Unix timestamp (in seconds) for when the item was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) for when the item was created. # - # @param thread_id [String] Identifier of the parent thread. + # @param thread_id [String] + # Identifier of the parent thread. # - # @param widget [String] Serialized widget payload rendered in the UI. + # @param widget [String] + # Serialized widget payload rendered in the UI. # - # @param object [Symbol, :"chatkit.thread_item"] Type discriminator that is always `chatkit.thread_item`. + # @param object [Symbol, :"chatkit.thread_item"] + # Type discriminator that is always `chatkit.thread_item`. # - # @param type [Symbol, :"chatkit.widget"] Type discriminator that is always `chatkit.widget`. + # @param type [Symbol, :"chatkit.widget"] + # Type discriminator that is always `chatkit.widget`. end end diff --git a/lib/openai/models/beta/chatkit/session_create_params.rb b/lib/openai/models/beta/chatkit/session_create_params.rb index b8ecea408..4cec4bc10 100644 --- a/lib/openai/models/beta/chatkit/session_create_params.rb +++ b/lib/openai/models/beta/chatkit/session_create_params.rb @@ -42,18 +42,22 @@ class SessionCreateParams < OpenAI::Internal::Type::BaseModel optional :rate_limits, -> { OpenAI::Beta::ChatKit::ChatSessionRateLimitsParam } # @!method initialize(user:, workflow:, chatkit_configuration: nil, expires_after: nil, rate_limits: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::SessionCreateParams} for more details. + # @param user [String] + # A free-form string that identifies your end user; ensures this Session can + # access other objects that have the same `user` scope. # - # @param user [String] A free-form string that identifies your end user; ensures this Session can acces + # @param workflow [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam] + # Workflow that powers the session. # - # @param workflow [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam] Workflow that powers the session. + # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam] + # Optional overrides for ChatKit runtime configuration features # - # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam] Optional overrides for ChatKit runtime configuration features + # @param expires_after [OpenAI::Models::Beta::ChatKit::ChatSessionExpiresAfterParam] + # Optional override for session expiration timing in seconds from creation. + # Defaults to 10 minutes. # - # @param expires_after [OpenAI::Models::Beta::ChatKit::ChatSessionExpiresAfterParam] Optional override for session expiration timing in seconds from creation. Defaul - # - # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimitsParam] Optional override for per-minute request limits. When omitted, defaults to 10. + # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimitsParam] + # Optional override for per-minute request limits. When omitted, defaults to 10. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/beta/chatkit/thread_delete_response.rb b/lib/openai/models/beta/chatkit/thread_delete_response.rb index 05d53435d..469872024 100644 --- a/lib/openai/models/beta/chatkit/thread_delete_response.rb +++ b/lib/openai/models/beta/chatkit/thread_delete_response.rb @@ -27,11 +27,14 @@ class ThreadDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"chatkit.thread.deleted") # Confirmation payload returned after deleting a thread. # - # @param id [String] Identifier of the deleted thread. + # @param id [String] + # Identifier of the deleted thread. # - # @param deleted [Boolean] Indicates that the thread has been deleted. + # @param deleted [Boolean] + # Indicates that the thread has been deleted. # - # @param object [Symbol, :"chatkit.thread.deleted"] Type discriminator that is always `chatkit.thread.deleted`. + # @param object [Symbol, :"chatkit.thread.deleted"] + # Type discriminator that is always `chatkit.thread.deleted`. end end end diff --git a/lib/openai/models/beta/chatkit/thread_list_items_params.rb b/lib/openai/models/beta/chatkit/thread_list_items_params.rb index 349caa2b4..b1bfe8f64 100644 --- a/lib/openai/models/beta/chatkit/thread_list_items_params.rb +++ b/lib/openai/models/beta/chatkit/thread_list_items_params.rb @@ -41,18 +41,21 @@ class ThreadListItemsParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Beta::ChatKit::ThreadListItemsParams::Order } # @!method initialize(thread_id:, after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ThreadListItemsParams} for more details. - # # @param thread_id [String] # - # @param after [String] List items created after this thread item ID. Defaults to null for the first pag + # @param after [String] + # List items created after this thread item ID. Defaults to null for the first + # page. # - # @param before [String] List items created before this thread item ID. Defaults to null for the newest r + # @param before [String] + # List items created before this thread item ID. Defaults to null for the newest + # results. # - # @param limit [Integer] Maximum number of thread items to return. Defaults to 20. + # @param limit [Integer] + # Maximum number of thread items to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListItemsParams::Order] Sort order for results by creation time. Defaults to `desc`. + # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListItemsParams::Order] + # Sort order for results by creation time. Defaults to `desc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/chatkit/thread_list_params.rb b/lib/openai/models/beta/chatkit/thread_list_params.rb index 88b2c9b63..70b44265e 100644 --- a/lib/openai/models/beta/chatkit/thread_list_params.rb +++ b/lib/openai/models/beta/chatkit/thread_list_params.rb @@ -43,18 +43,23 @@ class ThreadListParams < OpenAI::Internal::Type::BaseModel optional :user, String # @!method initialize(after: nil, before: nil, limit: nil, order: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ThreadListParams} for more details. + # @param after [String] + # List items created after this thread item ID. Defaults to null for the first + # page. # - # @param after [String] List items created after this thread item ID. Defaults to null for the first pag + # @param before [String] + # List items created before this thread item ID. Defaults to null for the newest + # results. # - # @param before [String] List items created before this thread item ID. Defaults to null for the newest r + # @param limit [Integer] + # Maximum number of thread items to return. Defaults to 20. # - # @param limit [Integer] Maximum number of thread items to return. Defaults to 20. + # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListParams::Order] + # Sort order for results by creation time. Defaults to `desc`. # - # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListParams::Order] Sort order for results by creation time. Defaults to `desc`. - # - # @param user [String] Filter threads that belong to this user identifier. Defaults to null to return a + # @param user [String] + # Filter threads that belong to this user identifier. Defaults to null to return + # all users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/chatkit_workflow.rb b/lib/openai/models/beta/chatkit_workflow.rb index 99bd57538..14df572cb 100644 --- a/lib/openai/models/beta/chatkit_workflow.rb +++ b/lib/openai/models/beta/chatkit_workflow.rb @@ -35,19 +35,21 @@ class ChatKitWorkflow < OpenAI::Internal::Type::BaseModel required :version, String, nil?: true # @!method initialize(id:, state_variables:, tracing:, version:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKitWorkflow} for more details. - # # Workflow metadata and state returned for the session. # - # @param id [String] Identifier of the workflow backing the session. + # @param id [String] + # Identifier of the workflow backing the session. # - # @param state_variables [Hash{Symbol=>String, Boolean, Float}, nil] State variable key-value pairs applied when invoking the workflow. Defaults to n + # @param state_variables [Hash{Symbol=>String, Boolean, Float}, nil] + # State variable key-value pairs applied when invoking the workflow. Defaults to + # null when no overrides were provided. # - # @param tracing [OpenAI::Models::Beta::ChatKitWorkflow::Tracing] Tracing settings applied to the workflow. + # @param tracing [OpenAI::Models::Beta::ChatKitWorkflow::Tracing] + # Tracing settings applied to the workflow. # - # @param version [String, nil] Specific workflow version used for the session. Defaults to null when using the - + # @param version [String, nil] + # Specific workflow version used for the session. Defaults to null when using the + # latest deployment. module StateVariable extend OpenAI::Internal::Type::Union @@ -72,7 +74,8 @@ class Tracing < OpenAI::Internal::Type::BaseModel # @!method initialize(enabled:) # Tracing settings applied to the workflow. # - # @param enabled [Boolean] Indicates whether tracing is enabled. + # @param enabled [Boolean] + # Indicates whether tracing is enabled. end end end diff --git a/lib/openai/models/beta/code_interpreter_tool.rb b/lib/openai/models/beta/code_interpreter_tool.rb index ee84099ec..ea6552518 100644 --- a/lib/openai/models/beta/code_interpreter_tool.rb +++ b/lib/openai/models/beta/code_interpreter_tool.rb @@ -11,7 +11,8 @@ class CodeInterpreterTool < OpenAI::Internal::Type::BaseModel required :type, const: :code_interpreter # @!method initialize(type: :code_interpreter) - # @param type [Symbol, :code_interpreter] The type of tool being defined: `code_interpreter` + # @param type [Symbol, :code_interpreter] + # The type of tool being defined: `code_interpreter` end end end diff --git a/lib/openai/models/beta/file_search_tool.rb b/lib/openai/models/beta/file_search_tool.rb index e12b3e5ad..4ae99c0df 100644 --- a/lib/openai/models/beta/file_search_tool.rb +++ b/lib/openai/models/beta/file_search_tool.rb @@ -17,9 +17,11 @@ class FileSearchTool < OpenAI::Internal::Type::BaseModel optional :file_search, -> { OpenAI::Beta::FileSearchTool::FileSearch } # @!method initialize(file_search: nil, type: :file_search) - # @param file_search [OpenAI::Models::Beta::FileSearchTool::FileSearch] Overrides for the file search tool. + # @param file_search [OpenAI::Models::Beta::FileSearchTool::FileSearch] + # Overrides for the file search tool. # - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` # @see OpenAI::Models::Beta::FileSearchTool#file_search class FileSearch < OpenAI::Internal::Type::BaseModel @@ -30,7 +32,7 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # # Note that the file search tool may output fewer than `max_num_results` results. # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # # @return [Integer, nil] @@ -41,21 +43,32 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # will use the `auto` ranker and a score_threshold of 0. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # # @return [OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions, nil] optional :ranking_options, -> { OpenAI::Beta::FileSearchTool::FileSearch::RankingOptions } # @!method initialize(max_num_results: nil, ranking_options: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::FileSearchTool::FileSearch} for more details. - # # Overrides for the file search tool. # - # @param max_num_results [Integer] The maximum number of results the file search tool should output. The default is + # @param max_num_results [Integer] + # The maximum number of results the file search tool should output. The default is + # 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between + # 1 and 50 inclusive. + # + # Note that the file search tool may output fewer than `max_num_results` results. + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. # - # @param ranking_options [OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions] The ranking options for the file search. If not specified, the file search tool + # @param ranking_options [OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions] + # The ranking options for the file search. If not specified, the file search tool + # will use the `auto` ranker and a score_threshold of 0. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. # @see OpenAI::Models::Beta::FileSearchTool::FileSearch#ranking_options class RankingOptions < OpenAI::Internal::Type::BaseModel @@ -74,20 +87,20 @@ class RankingOptions < OpenAI::Internal::Type::BaseModel optional :ranker, enum: -> { OpenAI::Beta::FileSearchTool::FileSearch::RankingOptions::Ranker } # @!method initialize(score_threshold:, ranker: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions} for more - # details. - # # The ranking options for the file search. If not specified, the file search tool # will use the `auto` ranker and a score_threshold of 0. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # - # @param score_threshold [Float] The score threshold for the file search. All values must be a floating point num + # @param score_threshold [Float] + # The score threshold for the file search. All values must be a floating point + # number between 0 and 1. # - # @param ranker [Symbol, OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions::Ranker] The ranker to use for the file search. If not specified will use the `auto` rank + # @param ranker [Symbol, OpenAI::Models::Beta::FileSearchTool::FileSearch::RankingOptions::Ranker] + # The ranker to use for the file search. If not specified will use the `auto` + # ranker. # The ranker to use for the file search. If not specified will use the `auto` # ranker. diff --git a/lib/openai/models/beta/function_tool.rb b/lib/openai/models/beta/function_tool.rb index 361c2c440..51f2659d1 100644 --- a/lib/openai/models/beta/function_tool.rb +++ b/lib/openai/models/beta/function_tool.rb @@ -18,7 +18,8 @@ class FunctionTool < OpenAI::Internal::Type::BaseModel # @!method initialize(function:, type: :function) # @param function [OpenAI::Models::FunctionDefinition] # - # @param type [Symbol, :function] The type of tool being defined: `function` + # @param type [Symbol, :function] + # The type of tool being defined: `function` end end end diff --git a/lib/openai/models/beta/message_stream_event.rb b/lib/openai/models/beta/message_stream_event.rb index 1c147dd78..94f575d1a 100644 --- a/lib/openai/models/beta/message_stream_event.rb +++ b/lib/openai/models/beta/message_stream_event.rb @@ -4,32 +4,32 @@ module OpenAI module Models module Beta # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. module MessageStreamEvent extend OpenAI::Internal::Type::Union discriminator :event - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.message.created", -> { OpenAI::Beta::MessageStreamEvent::ThreadMessageCreated } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. variant :"thread.message.in_progress", -> { OpenAI::Beta::MessageStreamEvent::ThreadMessageInProgress } - # Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + # Occurs when parts of a [Message](https://developers.openai.com/api/docs/assistants/migration) are being streamed. variant :"thread.message.delta", -> { OpenAI::Beta::MessageStreamEvent::ThreadMessageDelta } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.message.completed", -> { OpenAI::Beta::MessageStreamEvent::ThreadMessageCompleted } - # Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + # Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends before it is completed. variant :"thread.message.incomplete", -> { OpenAI::Beta::MessageStreamEvent::ThreadMessageIncomplete } class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -40,15 +40,13 @@ class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.created" # @!method initialize(data:, event: :"thread.message.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::MessageStreamEvent::ThreadMessageCreated} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.created"] end @@ -56,7 +54,7 @@ class ThreadMessageCreated < OpenAI::Internal::Type::BaseModel class ThreadMessageInProgress < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -67,15 +65,13 @@ class ThreadMessageInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.in_progress" # @!method initialize(data:, event: :"thread.message.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::MessageStreamEvent::ThreadMessageInProgress} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) moves - # to an `in_progress` state. + # [message](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.in_progress"] end @@ -94,14 +90,13 @@ class ThreadMessageDelta < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.delta" # @!method initialize(data:, event: :"thread.message.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::MessageStreamEvent::ThreadMessageDelta} for more details. - # # Occurs when parts of a - # [Message](https://platform.openai.com/docs/api-reference/messages/object) are - # being streamed. + # [Message](https://developers.openai.com/api/docs/assistants/migration) are being + # streamed. # - # @param data [OpenAI::Models::Beta::Threads::MessageDeltaEvent] Represents a message delta i.e. any changed fields on a message during streaming + # @param data [OpenAI::Models::Beta::Threads::MessageDeltaEvent] + # Represents a message delta i.e. any changed fields on a message during + # streaming. # # @param event [Symbol, :"thread.message.delta"] end @@ -109,7 +104,7 @@ class ThreadMessageDelta < OpenAI::Internal::Type::BaseModel class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -120,15 +115,13 @@ class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.completed" # @!method initialize(data:, event: :"thread.message.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::MessageStreamEvent::ThreadMessageCompleted} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # completed. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.completed"] end @@ -136,7 +129,7 @@ class ThreadMessageCompleted < OpenAI::Internal::Type::BaseModel class ThreadMessageIncomplete < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Message] required :data, -> { OpenAI::Beta::Threads::Message } @@ -147,15 +140,13 @@ class ThreadMessageIncomplete < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.message.incomplete" # @!method initialize(data:, event: :"thread.message.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::MessageStreamEvent::ThreadMessageIncomplete} for more - # details. - # # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) ends + # [message](https://developers.openai.com/api/docs/assistants/migration) ends # before it is completed. # - # @param data [OpenAI::Models::Beta::Threads::Message] Represents a message within a [thread](https://platform.openai.com/docs/api-refe + # @param data [OpenAI::Models::Beta::Threads::Message] + # Represents a message within a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.message.incomplete"] end diff --git a/lib/openai/models/beta/response_compact_params.rb b/lib/openai/models/beta/response_compact_params.rb index 867827d78..c8e1f352c 100644 --- a/lib/openai/models/beta/response_compact_params.rb +++ b/lib/openai/models/beta/response_compact_params.rb @@ -12,8 +12,8 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil] required :model, union: -> { OpenAI::Beta::ResponseCompactParams::Model }, nil?: true @@ -36,7 +36,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -56,7 +56,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions, nil] @@ -86,17 +86,17 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. # # @return [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] optional :service_tier, enum: -> { OpenAI::Beta::ResponseCompactParams::ServiceTier }, nil?: true @@ -107,24 +107,62 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCompactParams::Beta] } # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCompactParams} for more details. + # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil] Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu + # @param prompt_cache_key [String, nil] + # A key to use when reading from or writing to the prompt cache. # - # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. + # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions, nil] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. # - # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions, nil] Options for prompt caching. Supported for `gpt-5.6` and later models. By default + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] + # How long to retain a prompt cache entry created by this request. # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request. - # - # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto' + # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. - 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'. - + # If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. # # @param betas [Array] # @@ -133,8 +171,8 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -506,10 +544,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel optional :ttl, enum: -> { OpenAI::Beta::ResponseCompactParams::PromptCacheOptions::Ttl } # @!method initialize(mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions} for more - # details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -517,12 +551,21 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param mode [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -575,17 +618,17 @@ module PromptCacheRetention # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. module ServiceTier extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/beta/response_create_params.rb b/lib/openai/models/beta/response_create_params.rb index 12d252e58..b2fe8c257 100644 --- a/lib/openai/models/beta/response_create_params.rb +++ b/lib/openai/models/beta/response_create_params.rb @@ -12,7 +12,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -70,11 +70,11 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @return [String, Array, nil] optional :input, union: -> { OpenAI::Beta::ResponseCreateParams::Input } @@ -92,7 +92,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -121,8 +121,8 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model, nil] optional :model, union: -> { OpenAI::Beta::ResponseCreateParams::Model } @@ -148,7 +148,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -156,7 +156,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Beta::BetaResponsePrompt, nil] optional :prompt, -> { OpenAI::Beta::BetaResponsePrompt }, nil?: true @@ -164,7 +164,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -177,7 +177,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions, nil] @@ -191,7 +191,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -213,7 +213,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] optional :reasoning, -> { OpenAI::Beta::ResponseCreateParams::Reasoning }, nil?: true @@ -224,7 +224,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -237,13 +237,15 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -262,7 +264,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). # # @return [Boolean, nil] optional :store, OpenAI::Internal::Type::Boolean, nil?: true @@ -286,8 +288,8 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Beta::BetaResponseTextConfig, nil] optional :text, -> { OpenAI::Beta::BetaResponseTextConfig } @@ -308,17 +310,18 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array, nil] @@ -363,7 +366,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String @@ -374,70 +377,253 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCreateParams::Beta] } # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams} for more details. - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] Configuration for server-hosted multi-agent execution. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] + # Configuration for server-hosted multi-agent execution. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param betas [Array] # @@ -457,9 +643,11 @@ class ContextManagement < OpenAI::Internal::Type::BaseModel optional :compact_threshold, Integer, nil?: true # @!method initialize(type:, compact_threshold: nil) - # @param type [String] The context management entry type. Currently only 'compaction' is supported. + # @param type [String] + # The context management entry type. Currently only 'compaction' is supported. # - # @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry. + # @param compact_threshold [Integer, nil] + # Token threshold at which compaction should be triggered for this entry. end # The conversation that this response belongs to. Items from this conversation are @@ -483,11 +671,11 @@ module Conversation # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -506,8 +694,8 @@ module Input # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -852,14 +1040,14 @@ class Moderation < OpenAI::Internal::Type::BaseModel optional :policy, -> { OpenAI::Beta::ResponseCreateParams::Moderation::Policy }, nil?: true # @!method initialize(model:, policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams::Moderation} for more details. - # # Configuration for running moderation on the input and output of this response. # - # @param model [String] The moderation model to use for moderated completions, e.g. 'omni-moderation-lat + # @param model [String] + # The moderation model to use for moderated completions, e.g. + # 'omni-moderation-latest'. # - # @param policy [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy, nil] The policy to apply to moderated response input and output. + # @param policy [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy, nil] + # The policy to apply to moderated response input and output. # @see OpenAI::Models::Beta::ResponseCreateParams::Moderation#policy class Policy < OpenAI::Internal::Type::BaseModel @@ -884,9 +1072,11 @@ class Policy < OpenAI::Internal::Type::BaseModel # @!method initialize(input: nil, output: nil) # The policy to apply to moderated response input and output. # - # @param input [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy::Input, nil] The moderation policy for the response input. + # @param input [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy::Input, nil] + # The moderation policy for the response input. # - # @param output [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy::Output, nil] The moderation policy for the response output. + # @param output [OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy::Output, nil] + # The moderation policy for the response output. # @see OpenAI::Models::Beta::ResponseCreateParams::Moderation::Policy#input class Input < OpenAI::Internal::Type::BaseModel @@ -957,14 +1147,18 @@ class MultiAgent < OpenAI::Internal::Type::BaseModel optional :max_concurrent_subagents, Integer # @!method initialize(enabled:, max_concurrent_subagents: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams::MultiAgent} for more details. - # # Configuration for server-hosted multi-agent execution. # - # @param enabled [Boolean] Whether to enable server-hosted multi-agent execution for this response. + # @param enabled [Boolean] + # Whether to enable server-hosted multi-agent execution for this response. # - # @param max_concurrent_subagents [Integer] `max_concurrent_subagents` sets the maximum number of subagents that can be acti + # @param max_concurrent_subagents [Integer] + # `max_concurrent_subagents` sets the maximum number of subagents that can be + # active simultaneously across the entire agent tree. It includes all + # descendants—children, grandchildren, and deeper subagents—but excludes the root + # agent. The API does not impose a fixed upper bound on this setting. The default + # is `3`, which is recommended for most workloads. Multi-agent runs also have no + # fixed limit on tree depth or the total number of subagents created during a run. end class PromptCacheOptions < OpenAI::Internal::Type::BaseModel @@ -995,10 +1189,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel optional :ttl, enum: -> { OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl } # @!method initialize(comparison_response_id: nil, mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions} for more - # details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -1006,14 +1196,25 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param comparison_response_id [String, nil] The ID of a response to compare when diagnosing prompt cache reuse. Supplying th + # @param comparison_response_id [String, nil] + # The ID of a response to compare when diagnosing prompt cache reuse. Supplying + # this field requests prompt cache diagnostics when the feature is enabled. # - # @param mode [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -1055,7 +1256,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1094,7 +1295,7 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Effort, nil] @@ -1136,21 +1337,44 @@ class Reasoning < OpenAI::Internal::Type::BaseModel optional :summary, enum: -> { OpenAI::Beta::ResponseCreateParams::Reasoning::Summary }, nil?: true # @!method initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams::Reasoning} for more details. - # # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # - # @param context [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns. + # @param context [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Context, nil] + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. # - # @param effort [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Effort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # When returned on a response, this is the effective reasoning context mode used + # for the response. # - # @param generate_summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead. + # @param effort [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Effort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param mode [String, Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Mode] Controls the reasoning execution mode for the request. + # @param generate_summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::GenerateSummary, nil] + # **Deprecated:** use `summary` instead. # - # @param summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. + # + # @param mode [String, Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Mode] + # Controls the reasoning execution mode for the request. + # + # When returned on a response, this is the effective execution mode. + # + # @param summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Summary, nil] + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. + # + # `concise` is supported for `computer-use-preview` models and all reasoning + # models after `gpt-5`. # Controls which reasoning items are rendered back to the model on later turns. If # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` @@ -1175,7 +1399,7 @@ module Context # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @see OpenAI::Models::Beta::ResponseCreateParams::Reasoning#effort @@ -1270,13 +1494,15 @@ module Summary # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -1315,12 +1541,15 @@ class StreamOptions < OpenAI::Internal::Type::BaseModel optional :include_obfuscation, OpenAI::Internal::Type::Boolean # @!method initialize(include_obfuscation: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams::StreamOptions} for more details. - # # Options for streaming responses. Only set this when you set `stream: true`. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. end # How the model should select which tool (or tools) to use when generating a @@ -1343,7 +1572,7 @@ module ToolChoice variant -> { OpenAI::Beta::BetaToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Beta::BetaToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -1371,7 +1600,8 @@ class BetaSpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseMod required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/beta/response_retrieve_params.rb b/lib/openai/models/beta/response_retrieve_params.rb index 0c4fe4e41..30672694b 100644 --- a/lib/openai/models/beta/response_retrieve_params.rb +++ b/lib/openai/models/beta/response_retrieve_params.rb @@ -45,16 +45,22 @@ class ResponseRetrieveParams < OpenAI::Internal::Type::BaseModel optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseRetrieveParams::Beta] } # @!method initialize(response_id:, include: nil, include_obfuscation: nil, starting_after: nil, betas: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseRetrieveParams} for more details. - # # @param response_id [String] # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. # - # @param starting_after [Integer] The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # The sequence number of the event after which to start streaming. # # @param betas [Array] # diff --git a/lib/openai/models/beta/responses/beta_response_item_list.rb b/lib/openai/models/beta/responses/beta_response_item_list.rb index 7e40a4383..1497c12cc 100644 --- a/lib/openai/models/beta/responses/beta_response_item_list.rb +++ b/lib/openai/models/beta/responses/beta_response_item_list.rb @@ -38,15 +38,20 @@ class BetaResponseItemList < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) # A list of Response items. # - # @param data [Array] A list of items used to generate this response. + # @param data [Array] + # A list of items used to generate this response. # - # @param first_id [String] The ID of the first item in the list. + # @param first_id [String] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String] The ID of the last item in the list. + # @param last_id [String] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. end end end diff --git a/lib/openai/models/beta/responses/input_item_list_params.rb b/lib/openai/models/beta/responses/input_item_list_params.rb index 5302f63fb..fb9ce5553 100644 --- a/lib/openai/models/beta/responses/input_item_list_params.rb +++ b/lib/openai/models/beta/responses/input_item_list_params.rb @@ -52,18 +52,24 @@ class InputItemListParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(response_id:, after: nil, include: nil, limit: nil, order: nil, betas: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputItemListParams} for more details. - # # @param response_id [String] # - # @param after [String] An item ID to list items after, used in pagination. + # @param after [String] + # An item ID to list items after, used in pagination. + # + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between + # @param order [Symbol, OpenAI::Models::Beta::Responses::InputItemListParams::Order] + # The order to return the input items in. Default is `desc`. # - # @param order [Symbol, OpenAI::Models::Beta::Responses::InputItemListParams::Order] The order to return the input items in. Default is `desc`. + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # # @param betas [Array] # diff --git a/lib/openai/models/beta/responses/input_token_count_params.rb b/lib/openai/models/beta/responses/input_token_count_params.rb index b27ce2ddc..392bb6a1a 100644 --- a/lib/openai/models/beta/responses/input_token_count_params.rb +++ b/lib/openai/models/beta/responses/input_token_count_params.rb @@ -41,8 +41,8 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, nil] optional :model, String, nil?: true @@ -64,7 +64,7 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -72,7 +72,7 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning, nil] optional :reasoning, -> { OpenAI::Beta::Responses::InputTokenCountParams::Reasoning }, nil?: true @@ -81,8 +81,8 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Beta::Responses::InputTokenCountParams::Text, nil] optional :text, -> { OpenAI::Beta::Responses::InputTokenCountParams::Text }, nil?: true @@ -125,32 +125,66 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(conversation: nil, input: nil, instructions: nil, model: nil, parallel_tool_calls: nil, personality: nil, previous_response_id: nil, reasoning: nil, text: nil, tool_choice: nil, tools: nil, truncation: nil, betas: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputTokenCountParams} for more details. + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. + # @param model [String, nil] + # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a + # wide range of models with different capabilities, performance characteristics, + # and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param model [String, nil] Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a w + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. + # @param personality [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Personality] + # A model-owned style preset to apply to this request. Omit this parameter to use + # the model's default style. Supported values may expand over time. Values must be + # at most 64 characters. # - # @param personality [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Personality] A model-owned style preset to apply to this request. Omit this parameter to use + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu + # @param reasoning [OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning, nil] + # **gpt-5 and o-series models only** Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # - # @param reasoning [OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning, nil] **gpt-5 and o-series models only** Configuration options for [reasoning models]( + # @param text [OpenAI::Models::Beta::Responses::InputTokenCountParams::Text, nil] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param text [OpenAI::Models::Beta::Responses::InputTokenCountParams::Text, nil] Configuration options for a text response from the model. Can be plain + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::Responses::InputTokenCountParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell, nil] Controls which tool the model should use, if any. + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::Responses::InputTokenCountParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell, nil] + # Controls which tool the model should use, if any. # - # @param tools [Array, nil] An array of tools the model may call while generating a response. You can specif + # @param tools [Array, nil] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param truncation [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Truncation] The truncation strategy to use for the model response. - `auto`: If the input to + # @param truncation [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Truncation] + # The truncation strategy to use for the model response. - `auto`: If the input to + # this Response exceeds the model's context window size, the model will truncate + # the response to fit the context window by dropping items from the beginning of + # the conversation. - `disabled` (default): If the input size will exceed the + # context window size for a model, the request will fail with a 400 error. # # @param betas [Array] # @@ -240,7 +274,7 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Effort, nil] @@ -290,22 +324,44 @@ class Reasoning < OpenAI::Internal::Type::BaseModel ) # @!method initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning} for more - # details. - # # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param context [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Context, nil] + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # + # When returned on a response, this is the effective reasoning context mode used + # for the response. + # + # @param effort [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Effort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param generate_summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::GenerateSummary, nil] + # **Deprecated:** use `summary` instead. # - # @param context [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns. + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param effort [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Effort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param mode [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Mode] + # Controls the reasoning execution mode for the request. # - # @param generate_summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead. + # When returned on a response, this is the effective execution mode. # - # @param mode [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Mode] Controls the reasoning execution mode for the request. + # @param summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Summary, nil] + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be + # `concise` is supported for `computer-use-preview` models and all reasoning + # models after `gpt-5`. # Controls which reasoning items are rendered back to the model on later turns. If # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` @@ -330,7 +386,7 @@ module Context # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @see OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning#effort @@ -426,7 +482,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -453,18 +509,32 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil, verbosity: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputTokenCountParams::Text} for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::Beta::BetaResponseFormatTextConfig::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig, OpenAI::Models::Beta::BetaResponseFormatTextConfig::JSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::Beta::BetaResponseFormatTextConfig::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig, OpenAI::Models::Beta::BetaResponseFormatTextConfig::JSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. # - # @param verbosity [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in + # @param verbosity [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose @@ -502,7 +572,7 @@ module ToolChoice variant -> { OpenAI::Beta::BetaToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Beta::BetaToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -534,7 +604,8 @@ class BetaSpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseMod required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/beta/run_step_stream_event.rb b/lib/openai/models/beta/run_step_stream_event.rb index 16c87a3de..da8dc2e03 100644 --- a/lib/openai/models/beta/run_step_stream_event.rb +++ b/lib/openai/models/beta/run_step_stream_event.rb @@ -4,32 +4,32 @@ module OpenAI module Models module Beta # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. module RunStepStreamEvent extend OpenAI::Internal::Type::Union discriminator :event - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.run.step.created", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepCreated } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` state. variant :"thread.run.step.in_progress", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepInProgress } - # Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + # Occurs when parts of a [run step](https://developers.openai.com/api/docs/assistants/migration) are being streamed. variant :"thread.run.step.delta", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepDelta } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.run.step.completed", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepCompleted } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) fails. variant :"thread.run.step.failed", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepFailed } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is cancelled. variant :"thread.run.step.cancelled", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepCancelled } - # Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + # Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) expires. variant :"thread.run.step.expired", -> { OpenAI::Beta::RunStepStreamEvent::ThreadRunStepExpired } class ThreadRunStepCreated < OpenAI::Internal::Type::BaseModel @@ -45,15 +45,12 @@ class ThreadRunStepCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.created" # @!method initialize(data:, event: :"thread.run.step.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepCreated} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.created"] end @@ -71,15 +68,12 @@ class ThreadRunStepInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.in_progress" # @!method initialize(data:, event: :"thread.run.step.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepInProgress} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # moves to an `in_progress` state. + # [run step](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.in_progress"] end @@ -98,14 +92,13 @@ class ThreadRunStepDelta < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.delta" # @!method initialize(data:, event: :"thread.run.step.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepDelta} for more details. - # # Occurs when parts of a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # are being streamed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) are + # being streamed. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaEvent] Represents a run step delta i.e. any changed fields on a run step during streami + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaEvent] + # Represents a run step delta i.e. any changed fields on a run step during + # streaming. # # @param event [Symbol, :"thread.run.step.delta"] end @@ -123,15 +116,12 @@ class ThreadRunStepCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.completed" # @!method initialize(data:, event: :"thread.run.step.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepCompleted} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is completed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # completed. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.completed"] end @@ -149,15 +139,11 @@ class ThreadRunStepFailed < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.failed" # @!method initialize(data:, event: :"thread.run.step.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepFailed} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # fails. + # [run step](https://developers.openai.com/api/docs/assistants/migration) fails. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.failed"] end @@ -175,15 +161,12 @@ class ThreadRunStepCancelled < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.cancelled" # @!method initialize(data:, event: :"thread.run.step.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepCancelled} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is cancelled. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # cancelled. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.cancelled"] end @@ -201,15 +184,11 @@ class ThreadRunStepExpired < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.step.expired" # @!method initialize(data:, event: :"thread.run.step.expired") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStepStreamEvent::ThreadRunStepExpired} for more - # details. - # # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # expires. + # [run step](https://developers.openai.com/api/docs/assistants/migration) expires. # - # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] Represents a step in execution of a run. + # @param data [OpenAI::Models::Beta::Threads::Runs::RunStep] + # Represents a step in execution of a run. # # @param event [Symbol, :"thread.run.step.expired"] end diff --git a/lib/openai/models/beta/run_stream_event.rb b/lib/openai/models/beta/run_stream_event.rb index 2bfe1450b..fc059966d 100644 --- a/lib/openai/models/beta/run_stream_event.rb +++ b/lib/openai/models/beta/run_stream_event.rb @@ -4,46 +4,46 @@ module OpenAI module Models module Beta # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. module RunStreamEvent extend OpenAI::Internal::Type::Union discriminator :event - # Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is created. variant :"thread.run.created", -> { OpenAI::Beta::RunStreamEvent::ThreadRunCreated } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `queued` status. variant :"thread.run.queued", -> { OpenAI::Beta::RunStreamEvent::ThreadRunQueued } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an `in_progress` status. variant :"thread.run.in_progress", -> { OpenAI::Beta::RunStreamEvent::ThreadRunInProgress } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `requires_action` status. variant :"thread.run.requires_action", -> { OpenAI::Beta::RunStreamEvent::ThreadRunRequiresAction } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is completed. variant :"thread.run.completed", -> { OpenAI::Beta::RunStreamEvent::ThreadRunCompleted } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with status `incomplete`. variant :"thread.run.incomplete", -> { OpenAI::Beta::RunStreamEvent::ThreadRunIncomplete } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) fails. variant :"thread.run.failed", -> { OpenAI::Beta::RunStreamEvent::ThreadRunFailed } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a `cancelling` status. variant :"thread.run.cancelling", -> { OpenAI::Beta::RunStreamEvent::ThreadRunCancelling } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is cancelled. variant :"thread.run.cancelled", -> { OpenAI::Beta::RunStreamEvent::ThreadRunCancelled } - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) expires. variant :"thread.run.expired", -> { OpenAI::Beta::RunStreamEvent::ThreadRunExpired } class ThreadRunCreated < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -54,13 +54,12 @@ class ThreadRunCreated < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.created" # @!method initialize(data:, event: :"thread.run.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunCreated} for more details. - # # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.created"] end @@ -68,7 +67,7 @@ class ThreadRunCreated < OpenAI::Internal::Type::BaseModel class ThreadRunQueued < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -79,13 +78,12 @@ class ThreadRunQueued < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.queued" # @!method initialize(data:, event: :"thread.run.queued") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunQueued} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `queued` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.queued"] end @@ -93,7 +91,7 @@ class ThreadRunQueued < OpenAI::Internal::Type::BaseModel class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -104,13 +102,12 @@ class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.in_progress" # @!method initialize(data:, event: :"thread.run.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunInProgress} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to an `in_progress` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.in_progress"] end @@ -118,7 +115,7 @@ class ThreadRunInProgress < OpenAI::Internal::Type::BaseModel class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -129,14 +126,12 @@ class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.requires_action" # @!method initialize(data:, event: :"thread.run.requires_action") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunRequiresAction} for more - # details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `requires_action` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.requires_action"] end @@ -144,7 +139,7 @@ class ThreadRunRequiresAction < OpenAI::Internal::Type::BaseModel class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -155,13 +150,12 @@ class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.completed" # @!method initialize(data:, event: :"thread.run.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunCompleted} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is completed. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.completed"] end @@ -169,7 +163,7 @@ class ThreadRunCompleted < OpenAI::Internal::Type::BaseModel class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -180,13 +174,12 @@ class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.incomplete" # @!method initialize(data:, event: :"thread.run.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunIncomplete} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # ends with status `incomplete`. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.incomplete"] end @@ -194,7 +187,7 @@ class ThreadRunIncomplete < OpenAI::Internal::Type::BaseModel class ThreadRunFailed < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -205,13 +198,12 @@ class ThreadRunFailed < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.failed" # @!method initialize(data:, event: :"thread.run.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunFailed} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # fails. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.failed"] end @@ -219,7 +211,7 @@ class ThreadRunFailed < OpenAI::Internal::Type::BaseModel class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -230,13 +222,12 @@ class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.cancelling" # @!method initialize(data:, event: :"thread.run.cancelling") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunCancelling} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `cancelling` status. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.cancelling"] end @@ -244,7 +235,7 @@ class ThreadRunCancelling < OpenAI::Internal::Type::BaseModel class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -255,13 +246,12 @@ class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.cancelled" # @!method initialize(data:, event: :"thread.run.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunCancelled} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is cancelled. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.cancelled"] end @@ -269,7 +259,7 @@ class ThreadRunCancelled < OpenAI::Internal::Type::BaseModel class ThreadRunExpired < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Threads::Run] required :data, -> { OpenAI::Beta::Threads::Run } @@ -280,13 +270,12 @@ class ThreadRunExpired < OpenAI::Internal::Type::BaseModel required :event, const: :"thread.run.expired" # @!method initialize(data:, event: :"thread.run.expired") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::RunStreamEvent::ThreadRunExpired} for more details. - # - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # expires. # - # @param data [OpenAI::Models::Beta::Threads::Run] Represents an execution run on a [thread](https://platform.openai.com/docs/api-r + # @param data [OpenAI::Models::Beta::Threads::Run] + # Represents an execution run on a + # [thread](https://developers.openai.com/api/docs/assistants/migration). # # @param event [Symbol, :"thread.run.expired"] end diff --git a/lib/openai/models/beta/thread.rb b/lib/openai/models/beta/thread.rb index 21ee9dd0b..4b4ca68a5 100644 --- a/lib/openai/models/beta/thread.rb +++ b/lib/openai/models/beta/thread.rb @@ -44,21 +44,31 @@ class Thread < OpenAI::Internal::Type::BaseModel required :tool_resources, -> { OpenAI::Beta::Thread::ToolResources }, nil?: true # @!method initialize(id:, created_at:, metadata:, tool_resources:, object: :thread) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Thread} for more details. - # # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). + # + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the thread was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the thread was created. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param tool_resources [OpenAI::Models::Beta::Thread::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre + # @param tool_resources [OpenAI::Models::Beta::Thread::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. # - # @param object [Symbol, :thread] The object type, which is always `thread`. + # @param object [Symbol, :thread] + # The object type, which is always `thread`. # @see OpenAI::Models::Beta::Thread#tool_resources class ToolResources < OpenAI::Internal::Type::BaseModel @@ -84,25 +94,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::Thread::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Thread::ToolResources::CodeInterpreter} for more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::Thread::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. # @@ -110,10 +120,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(vector_store_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Thread::ToolResources::FileSearch} for more details. - # - # @param vector_store_ids [Array] The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/ + # @param vector_store_ids [Array] + # The + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this thread. There can be a maximum of 1 vector store attached to + # the thread. end end end diff --git a/lib/openai/models/beta/thread_create_and_run_params.rb b/lib/openai/models/beta/thread_create_and_run_params.rb index e57facc5f..cd19480ec 100644 --- a/lib/openai/models/beta/thread_create_and_run_params.rb +++ b/lib/openai/models/beta/thread_create_and_run_params.rb @@ -12,8 +12,8 @@ class ThreadCreateAndRunParams < OpenAI::Internal::Type::BaseModel # @!attribute assistant_id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. # # @return [String] required :assistant_id, String @@ -57,17 +57,18 @@ class ThreadCreateAndRunParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!attribute model - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. # # @return [String, Symbol, OpenAI::Models::ChatModel, nil] optional :model, union: -> { OpenAI::Beta::ThreadCreateAndRunParams::Model }, nil?: true # @!attribute parallel_tool_calls # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. # # @return [Boolean, nil] @@ -75,14 +76,14 @@ class ThreadCreateAndRunParams < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -169,51 +170,123 @@ class ThreadCreateAndRunParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(assistant_id:, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, response_format: nil, temperature: nil, thread: nil, tool_choice: nil, tool_resources: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams} for more details. - # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista - # - # @param instructions [String, nil] Override the default system message of the assistant. This is useful for modifyi - # - # @param max_completion_tokens [Integer, nil] The maximum number of completion tokens that may be used over the course of the - # - # @param max_prompt_tokens [Integer, nil] The maximum number of prompt tokens that may be used over the course of the run. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] Options to create a new thread. If no thread is provided when running a - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Controls which (if any) tool is called by the model. - # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param tools [Array, nil] Override the tools the assistant can use for this run. This is useful for modify - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the - # - # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] Controls for how a thread will be truncated prior to the run. Use this to contro + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param instructions [String, nil] + # Override the default system message of the assistant. This is useful for + # modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # The maximum number of completion tokens that may be used over the course of the + # run. The run will make a best effort to use only the number of completion tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # completion tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # The maximum number of prompt tokens that may be used over the course of the run. + # The run will make a best effort to use only the number of prompt tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # prompt tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] + # Options to create a new thread. If no thread is provided when running a request, + # an empty thread will be created. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tools and instead generates a message. `auto` is the default value + # and means the model can pick between generating a message or calling one or more + # tools. `required` means the model must call one or more tools before responding + # to the user. Specifying a particular tool like `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array, nil] + # Override the tools the assistant can use for this run. This is useful for + # modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] + # Controls for how a thread will be truncated prior to the run. Use this to + # control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. module Model extend OpenAI::Internal::Type::Union variant String - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + # The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. variant enum: -> { OpenAI::ChatModel } # @!method self.variants @@ -222,8 +295,9 @@ module Model class Thread < OpenAI::Internal::Type::BaseModel # @!attribute messages - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. # # @return [Array, nil] optional( @@ -258,18 +332,27 @@ class Thread < OpenAI::Internal::Type::BaseModel ) # @!method initialize(messages: nil, metadata: nil, tool_resources: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread} for more details. - # # Options to create a new thread. If no thread is provided when running a request, # an empty thread will be created. # - # @param messages [Array] A list of [messages](https://platform.openai.com/docs/api-reference/messages) to + # @param messages [Array] + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre - + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. class Message < OpenAI::Internal::Type::BaseModel # @!attribute content # The text contents of the message. @@ -312,17 +395,27 @@ class Message < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(content:, role:, attachments: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message} for more - # details. + # @param content [String, Array] + # The text contents of the message. + # + # @param role [Symbol, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Role] + # The role of the entity that is creating the message. Allowed values include: # - # @param content [String, Array] The text contents of the message. + # - `user`: Indicates the message is sent by an actual user and should be used in + # most cases to represent user-generated messages. + # - `assistant`: Indicates the message is generated by the assistant. Use this + # value to insert messages from the assistant into the conversation. # - # @param role [Symbol, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Role] The role of the entity that is creating the message. Allowed values include: + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they should be added to. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they should be added to. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The text contents of the message. # @@ -333,7 +426,7 @@ module Content # The text contents of the message. variant String - # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). variant( -> { OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Content::MessageContentPartParamArray @@ -388,10 +481,11 @@ class Attachment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id: nil, tools: nil) - # @param file_id [String] The ID of the file to attach to the message. + # @param file_id [String] + # The ID of the file to attach to the message. # - # @param tools [Array] The tools to add this file to. - + # @param tools [Array] + # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union @@ -412,7 +506,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(type: :file_search) - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` end # @!method self.variants @@ -448,26 +543,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter} - # for more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. # @@ -476,7 +570,7 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_stores # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. # @@ -491,14 +585,17 @@ class FileSearch < OpenAI::Internal::Type::BaseModel ) # @!method initialize(vector_store_ids: nil, vector_stores: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch} - # for more details. - # - # @param vector_store_ids [Array] The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/ + # @param vector_store_ids [Array] + # The + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this thread. There can be a maximum of 1 vector store attached to + # the thread. # - # @param vector_stores [Array] A helper to create a [vector store](https://platform.openai.com/docs/api-referen - + # @param vector_stores [Array] + # A helper to create a + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # with file_ids and attach it to this thread. There can be a maximum of 1 vector + # store attached to the thread. class VectorStore < OpenAI::Internal::Type::BaseModel # @!attribute chunking_strategy # The chunking strategy used to chunk the file(s). If not set, will use the `auto` @@ -513,10 +610,10 @@ class VectorStore < OpenAI::Internal::Type::BaseModel ) # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] @@ -533,15 +630,23 @@ class VectorStore < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(chunking_strategy: nil, file_ids: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore} - # for more details. + # @param chunking_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. # - # @param chunking_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to ad + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The chunking strategy used to chunk the file(s). If not set, will use the `auto` # strategy. @@ -578,7 +683,8 @@ class Auto < OpenAI::Internal::Type::BaseModel # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of # `800` and `chunk_overlap_tokens` of `400`. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. end class Static < OpenAI::Internal::Type::BaseModel @@ -601,7 +707,8 @@ class Static < OpenAI::Internal::Type::BaseModel # @!method initialize(static:, type: :static) # @param static [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static] # - # @param type [Symbol, :static] Always `static`. + # @param type [Symbol, :static] + # Always `static`. # @see OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static#static class Static < OpenAI::Internal::Type::BaseModel @@ -621,13 +728,14 @@ class Static < OpenAI::Internal::Type::BaseModel required :max_chunk_size_tokens, Integer # @!method initialize(chunk_overlap_tokens:, max_chunk_size_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static} - # for more details. + # @param chunk_overlap_tokens [Integer] + # The number of tokens that overlap between chunks. The default value is `400`. # - # @param chunk_overlap_tokens [Integer] The number of tokens that overlap between chunks. The default value is `400`. + # Note that the overlap must not exceed half of `max_chunk_size_tokens`. # - # @param max_chunk_size_tokens [Integer] The maximum number of tokens in each chunk. The default value is `800`. The mini + # @param max_chunk_size_tokens [Integer] + # The maximum number of tokens in each chunk. The default value is `800`. The + # minimum value is `100` and the maximum value is `4096`. end end @@ -662,26 +770,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter} - # for more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. # @@ -689,11 +796,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(vector_store_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch} for - # more details. - # - # @param vector_store_ids [Array] The ID of the [vector store](https://platform.openai.com/docs/api-reference/vect + # @param vector_store_ids [Array] + # The ID of the + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this assistant. There can be a maximum of 1 vector store attached to + # the assistant. end end @@ -715,16 +822,18 @@ class TruncationStrategy < OpenAI::Internal::Type::BaseModel optional :last_messages, Integer, nil?: true # @!method initialize(type:, last_messages: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy} for more - # details. - # # Controls for how a thread will be truncated prior to the run. Use this to # control the initial context window of the run. # - # @param type [Symbol, OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to + # @param type [Symbol, OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::Type] + # The truncation strategy to use for the thread. The default is `auto`. If set to + # `last_messages`, the thread will be truncated to the n most recent messages in + # the thread. When set to `auto`, messages in the middle of the thread will be + # dropped to fit the context length of the model, `max_prompt_tokens`. # - # @param last_messages [Integer, nil] The number of most recent messages from the thread when constructing the context + # @param last_messages [Integer, nil] + # The number of most recent messages from the thread when constructing the context + # for the run. # The truncation strategy to use for the thread. The default is `auto`. If set to # `last_messages`, the thread will be truncated to the n most recent messages in diff --git a/lib/openai/models/beta/thread_create_params.rb b/lib/openai/models/beta/thread_create_params.rb index 32687cb10..d7064db5d 100644 --- a/lib/openai/models/beta/thread_create_params.rb +++ b/lib/openai/models/beta/thread_create_params.rb @@ -9,8 +9,9 @@ class ThreadCreateParams < OpenAI::Internal::Type::BaseModel include OpenAI::Internal::Type::RequestParameters # @!attribute messages - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. # # @return [Array, nil] optional :messages, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateParams::Message] } @@ -36,14 +37,24 @@ class ThreadCreateParams < OpenAI::Internal::Type::BaseModel optional :tool_resources, -> { OpenAI::Beta::ThreadCreateParams::ToolResources }, nil?: true # @!method initialize(messages: nil, metadata: nil, tool_resources: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams} for more details. + # @param messages [Array] + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. # - # @param messages [Array] A list of [messages](https://platform.openai.com/docs/api-reference/messages) to + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateParams::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateParams::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -89,16 +100,27 @@ class Message < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(content:, role:, attachments: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams::Message} for more details. + # @param content [String, Array] + # The text contents of the message. # - # @param content [String, Array] The text contents of the message. + # @param role [Symbol, OpenAI::Models::Beta::ThreadCreateParams::Message::Role] + # The role of the entity that is creating the message. Allowed values include: # - # @param role [Symbol, OpenAI::Models::Beta::ThreadCreateParams::Message::Role] The role of the entity that is creating the message. Allowed values include: + # - `user`: Indicates the message is sent by an actual user and should be used in + # most cases to represent user-generated messages. + # - `assistant`: Indicates the message is generated by the assistant. Use this + # value to insert messages from the assistant into the conversation. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they should be added to. + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they should be added to. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The text contents of the message. # @@ -109,7 +131,7 @@ module Content # The text contents of the message. variant String - # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). variant -> { OpenAI::Models::Beta::ThreadCreateParams::Message::Content::MessageContentPartParamArray } # @!method self.variants @@ -158,10 +180,11 @@ class Attachment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id: nil, tools: nil) - # @param file_id [String] The ID of the file to attach to the message. + # @param file_id [String] + # The ID of the file to attach to the message. # - # @param tools [Array] The tools to add this file to. - + # @param tools [Array] + # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union @@ -179,7 +202,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(type: :file_search) - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` end # @!method self.variants @@ -211,26 +235,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::ThreadCreateParams::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams::ToolResources::CodeInterpreter} for - # more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::ThreadCreateParams::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. # @@ -239,7 +262,7 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_stores # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. # @@ -254,14 +277,17 @@ class FileSearch < OpenAI::Internal::Type::BaseModel ) # @!method initialize(vector_store_ids: nil, vector_stores: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch} for more - # details. + # @param vector_store_ids [Array] + # The + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this thread. There can be a maximum of 1 vector store attached to + # the thread. # - # @param vector_store_ids [Array] The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/ - # - # @param vector_stores [Array] A helper to create a [vector store](https://platform.openai.com/docs/api-referen - + # @param vector_stores [Array] + # A helper to create a + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # with file_ids and attach it to this thread. There can be a maximum of 1 vector + # store attached to the thread. class VectorStore < OpenAI::Internal::Type::BaseModel # @!attribute chunking_strategy # The chunking strategy used to chunk the file(s). If not set, will use the `auto` @@ -276,10 +302,10 @@ class VectorStore < OpenAI::Internal::Type::BaseModel ) # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] @@ -296,15 +322,23 @@ class VectorStore < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(chunking_strategy: nil, file_ids: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore} - # for more details. + # @param chunking_strategy [OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. # - # @param chunking_strategy [OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to ad + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The chunking strategy used to chunk the file(s). If not set, will use the `auto` # strategy. @@ -341,7 +375,8 @@ class Auto < OpenAI::Internal::Type::BaseModel # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of # `800` and `chunk_overlap_tokens` of `400`. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. end class Static < OpenAI::Internal::Type::BaseModel @@ -364,7 +399,8 @@ class Static < OpenAI::Internal::Type::BaseModel # @!method initialize(static:, type: :static) # @param static [OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static] # - # @param type [Symbol, :static] Always `static`. + # @param type [Symbol, :static] + # Always `static`. # @see OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static#static class Static < OpenAI::Internal::Type::BaseModel @@ -384,13 +420,14 @@ class Static < OpenAI::Internal::Type::BaseModel required :max_chunk_size_tokens, Integer # @!method initialize(chunk_overlap_tokens:, max_chunk_size_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static} - # for more details. + # @param chunk_overlap_tokens [Integer] + # The number of tokens that overlap between chunks. The default value is `400`. # - # @param chunk_overlap_tokens [Integer] The number of tokens that overlap between chunks. The default value is `400`. + # Note that the overlap must not exceed half of `max_chunk_size_tokens`. # - # @param max_chunk_size_tokens [Integer] The maximum number of tokens in each chunk. The default value is `800`. The mini + # @param max_chunk_size_tokens [Integer] + # The maximum number of tokens in each chunk. The default value is `800`. The + # minimum value is `100` and the maximum value is `4096`. end end diff --git a/lib/openai/models/beta/thread_stream_event.rb b/lib/openai/models/beta/thread_stream_event.rb index 2af595d41..b2b123169 100644 --- a/lib/openai/models/beta/thread_stream_event.rb +++ b/lib/openai/models/beta/thread_stream_event.rb @@ -6,7 +6,7 @@ module Beta class ThreadStreamEvent < OpenAI::Internal::Type::BaseModel # @!attribute data # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). # # @return [OpenAI::Models::Beta::Thread] required :data, -> { OpenAI::Beta::Thread } @@ -23,16 +23,16 @@ class ThreadStreamEvent < OpenAI::Internal::Type::BaseModel optional :enabled, OpenAI::Internal::Type::Boolean # @!method initialize(data:, enabled: nil, event: :"thread.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadStreamEvent} for more details. - # # Occurs when a new - # [thread](https://platform.openai.com/docs/api-reference/threads/object) is + # [thread](https://developers.openai.com/api/docs/assistants/migration) is # created. # - # @param data [OpenAI::Models::Beta::Thread] Represents a thread that contains [messages](https://platform.openai.com/docs/ap + # @param data [OpenAI::Models::Beta::Thread] + # Represents a thread that contains + # [messages](https://developers.openai.com/api/docs/assistants/migration). # - # @param enabled [Boolean] Whether to enable input audio transcription. + # @param enabled [Boolean] + # Whether to enable input audio transcription. # # @param event [Symbol, :"thread.created"] end diff --git a/lib/openai/models/beta/thread_update_params.rb b/lib/openai/models/beta/thread_update_params.rb index e713d8f28..eb1520f8d 100644 --- a/lib/openai/models/beta/thread_update_params.rb +++ b/lib/openai/models/beta/thread_update_params.rb @@ -34,14 +34,21 @@ class ThreadUpdateParams < OpenAI::Internal::Type::BaseModel optional :tool_resources, -> { OpenAI::Beta::ThreadUpdateParams::ToolResources }, nil?: true # @!method initialize(thread_id:, metadata: nil, tool_resources: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadUpdateParams} for more details. - # # @param thread_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param tool_resources [OpenAI::Models::Beta::ThreadUpdateParams::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre + # @param tool_resources [OpenAI::Models::Beta::ThreadUpdateParams::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -68,26 +75,25 @@ class ToolResources < OpenAI::Internal::Type::BaseModel # @see OpenAI::Models::Beta::ThreadUpdateParams::ToolResources#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel # @!attribute file_ids - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(file_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadUpdateParams::ToolResources::CodeInterpreter} for - # more details. - # - # @param file_ids [Array] A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made + # @param file_ids [Array] + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. end # @see OpenAI::Models::Beta::ThreadUpdateParams::ToolResources#file_search class FileSearch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_ids # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. # @@ -95,11 +101,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(vector_store_ids: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadUpdateParams::ToolResources::FileSearch} for more - # details. - # - # @param vector_store_ids [Array] The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/ + # @param vector_store_ids [Array] + # The + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # attached to this thread. There can be a maximum of 1 vector store attached to + # the thread. end end end diff --git a/lib/openai/models/beta/threads/file_citation_annotation.rb b/lib/openai/models/beta/threads/file_citation_annotation.rb index 1d0a2a740..6fd81063b 100644 --- a/lib/openai/models/beta/threads/file_citation_annotation.rb +++ b/lib/openai/models/beta/threads/file_citation_annotation.rb @@ -43,9 +43,11 @@ class FileCitationAnnotation < OpenAI::Internal::Type::BaseModel # # @param start_index [Integer] # - # @param text [String] The text in the message content that needs to be replaced. + # @param text [String] + # The text in the message content that needs to be replaced. # - # @param type [Symbol, :file_citation] Always `file_citation`. + # @param type [Symbol, :file_citation] + # Always `file_citation`. # @see OpenAI::Models::Beta::Threads::FileCitationAnnotation#file_citation class FileCitation < OpenAI::Internal::Type::BaseModel @@ -56,7 +58,8 @@ class FileCitation < OpenAI::Internal::Type::BaseModel required :file_id, String # @!method initialize(file_id:) - # @param file_id [String] The ID of the specific File the citation is from. + # @param file_id [String] + # The ID of the specific File the citation is from. end end end diff --git a/lib/openai/models/beta/threads/file_citation_delta_annotation.rb b/lib/openai/models/beta/threads/file_citation_delta_annotation.rb index db18b6e4d..fd7445aba 100644 --- a/lib/openai/models/beta/threads/file_citation_delta_annotation.rb +++ b/lib/openai/models/beta/threads/file_citation_delta_annotation.rb @@ -43,7 +43,8 @@ class FileCitationDeltaAnnotation < OpenAI::Internal::Type::BaseModel # File associated with the assistant or the message. Generated when the assistant # uses the "file_search" tool to search files. # - # @param index [Integer] The index of the annotation in the text content part. + # @param index [Integer] + # The index of the annotation in the text content part. # # @param end_index [Integer] # @@ -51,9 +52,11 @@ class FileCitationDeltaAnnotation < OpenAI::Internal::Type::BaseModel # # @param start_index [Integer] # - # @param text [String] The text in the message content that needs to be replaced. + # @param text [String] + # The text in the message content that needs to be replaced. # - # @param type [Symbol, :file_citation] Always `file_citation`. + # @param type [Symbol, :file_citation] + # Always `file_citation`. # @see OpenAI::Models::Beta::Threads::FileCitationDeltaAnnotation#file_citation class FileCitation < OpenAI::Internal::Type::BaseModel @@ -70,9 +73,11 @@ class FileCitation < OpenAI::Internal::Type::BaseModel optional :quote, String # @!method initialize(file_id: nil, quote: nil) - # @param file_id [String] The ID of the specific File the citation is from. + # @param file_id [String] + # The ID of the specific File the citation is from. # - # @param quote [String] The specific quote in the file. + # @param quote [String] + # The specific quote in the file. end end end diff --git a/lib/openai/models/beta/threads/file_path_annotation.rb b/lib/openai/models/beta/threads/file_path_annotation.rb index 6c4e70c17..60993bcff 100644 --- a/lib/openai/models/beta/threads/file_path_annotation.rb +++ b/lib/openai/models/beta/threads/file_path_annotation.rb @@ -42,9 +42,11 @@ class FilePathAnnotation < OpenAI::Internal::Type::BaseModel # # @param start_index [Integer] # - # @param text [String] The text in the message content that needs to be replaced. + # @param text [String] + # The text in the message content that needs to be replaced. # - # @param type [Symbol, :file_path] Always `file_path`. + # @param type [Symbol, :file_path] + # Always `file_path`. # @see OpenAI::Models::Beta::Threads::FilePathAnnotation#file_path class FilePath < OpenAI::Internal::Type::BaseModel @@ -55,7 +57,8 @@ class FilePath < OpenAI::Internal::Type::BaseModel required :file_id, String # @!method initialize(file_id:) - # @param file_id [String] The ID of the file that was generated. + # @param file_id [String] + # The ID of the file that was generated. end end end diff --git a/lib/openai/models/beta/threads/file_path_delta_annotation.rb b/lib/openai/models/beta/threads/file_path_delta_annotation.rb index 041f2a4a1..482a7f3d9 100644 --- a/lib/openai/models/beta/threads/file_path_delta_annotation.rb +++ b/lib/openai/models/beta/threads/file_path_delta_annotation.rb @@ -42,7 +42,8 @@ class FilePathDeltaAnnotation < OpenAI::Internal::Type::BaseModel # A URL for the file that's generated when the assistant used the # `code_interpreter` tool to generate a file. # - # @param index [Integer] The index of the annotation in the text content part. + # @param index [Integer] + # The index of the annotation in the text content part. # # @param end_index [Integer] # @@ -50,9 +51,11 @@ class FilePathDeltaAnnotation < OpenAI::Internal::Type::BaseModel # # @param start_index [Integer] # - # @param text [String] The text in the message content that needs to be replaced. + # @param text [String] + # The text in the message content that needs to be replaced. # - # @param type [Symbol, :file_path] Always `file_path`. + # @param type [Symbol, :file_path] + # Always `file_path`. # @see OpenAI::Models::Beta::Threads::FilePathDeltaAnnotation#file_path class FilePath < OpenAI::Internal::Type::BaseModel @@ -63,7 +66,8 @@ class FilePath < OpenAI::Internal::Type::BaseModel optional :file_id, String # @!method initialize(file_id: nil) - # @param file_id [String] The ID of the file that was generated. + # @param file_id [String] + # The ID of the file that was generated. end end end diff --git a/lib/openai/models/beta/threads/image_file.rb b/lib/openai/models/beta/threads/image_file.rb index 53cf02edf..cc1256daf 100644 --- a/lib/openai/models/beta/threads/image_file.rb +++ b/lib/openai/models/beta/threads/image_file.rb @@ -6,9 +6,9 @@ module Beta module Threads class ImageFile < OpenAI::Internal::Type::BaseModel # @!attribute file_id - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. # # @return [String] required :file_id, String @@ -21,12 +21,14 @@ class ImageFile < OpenAI::Internal::Type::BaseModel optional :detail, enum: -> { OpenAI::Beta::Threads::ImageFile::Detail } # @!method initialize(file_id:, detail: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::ImageFile} for more details. + # @param file_id [String] + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. # - # @param file_id [String] The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # - # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageFile::Detail] Specifies the detail level of the image if specified by the user. `low` uses few + # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageFile::Detail] + # Specifies the detail level of the image if specified by the user. `low` uses + # fewer tokens, you can opt in to high resolution using `high`. # Specifies the detail level of the image if specified by the user. `low` uses # fewer tokens, you can opt in to high resolution using `high`. diff --git a/lib/openai/models/beta/threads/image_file_content_block.rb b/lib/openai/models/beta/threads/image_file_content_block.rb index 2ae8fe563..071e7826f 100644 --- a/lib/openai/models/beta/threads/image_file_content_block.rb +++ b/lib/openai/models/beta/threads/image_file_content_block.rb @@ -17,12 +17,14 @@ class ImageFileContentBlock < OpenAI::Internal::Type::BaseModel required :type, const: :image_file # @!method initialize(image_file:, type: :image_file) - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. # # @param image_file [OpenAI::Models::Beta::Threads::ImageFile] # - # @param type [Symbol, :image_file] Always `image_file`. + # @param type [Symbol, :image_file] + # Always `image_file`. end end end diff --git a/lib/openai/models/beta/threads/image_file_delta.rb b/lib/openai/models/beta/threads/image_file_delta.rb index b1d4c62e7..340bd5892 100644 --- a/lib/openai/models/beta/threads/image_file_delta.rb +++ b/lib/openai/models/beta/threads/image_file_delta.rb @@ -13,20 +13,22 @@ class ImageFileDelta < OpenAI::Internal::Type::BaseModel optional :detail, enum: -> { OpenAI::Beta::Threads::ImageFileDelta::Detail } # @!attribute file_id - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. # # @return [String, nil] optional :file_id, String # @!method initialize(detail: nil, file_id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::ImageFileDelta} for more details. + # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageFileDelta::Detail] + # Specifies the detail level of the image if specified by the user. `low` uses + # fewer tokens, you can opt in to high resolution using `high`. # - # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageFileDelta::Detail] Specifies the detail level of the image if specified by the user. `low` uses few - # - # @param file_id [String] The [File](https://platform.openai.com/docs/api-reference/files) ID of the image + # @param file_id [String] + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. # Specifies the detail level of the image if specified by the user. `low` uses # fewer tokens, you can opt in to high resolution using `high`. diff --git a/lib/openai/models/beta/threads/image_file_delta_block.rb b/lib/openai/models/beta/threads/image_file_delta_block.rb index 8657f912f..56ea7f8b6 100644 --- a/lib/openai/models/beta/threads/image_file_delta_block.rb +++ b/lib/openai/models/beta/threads/image_file_delta_block.rb @@ -23,14 +23,17 @@ class ImageFileDeltaBlock < OpenAI::Internal::Type::BaseModel optional :image_file, -> { OpenAI::Beta::Threads::ImageFileDelta } # @!method initialize(index:, image_file: nil, type: :image_file) - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. # - # @param index [Integer] The index of the content part in the message. + # @param index [Integer] + # The index of the content part in the message. # # @param image_file [OpenAI::Models::Beta::Threads::ImageFileDelta] # - # @param type [Symbol, :image_file] Always `image_file`. + # @param type [Symbol, :image_file] + # Always `image_file`. end end end diff --git a/lib/openai/models/beta/threads/image_url.rb b/lib/openai/models/beta/threads/image_url.rb index a78260ebd..3186862f7 100644 --- a/lib/openai/models/beta/threads/image_url.rb +++ b/lib/openai/models/beta/threads/image_url.rb @@ -20,12 +20,13 @@ class ImageURL < OpenAI::Internal::Type::BaseModel optional :detail, enum: -> { OpenAI::Beta::Threads::ImageURL::Detail } # @!method initialize(url:, detail: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::ImageURL} for more details. + # @param url [String] + # The external URL of the image, must be a supported image types: jpeg, jpg, png, + # gif, webp. # - # @param url [String] The external URL of the image, must be a supported image types: jpeg, jpg, png, - # - # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageURL::Detail] Specifies the detail level of the image. `low` uses fewer tokens, you can opt in + # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageURL::Detail] + # Specifies the detail level of the image. `low` uses fewer tokens, you can opt in + # to high resolution using `high`. Default value is `auto` # Specifies the detail level of the image. `low` uses fewer tokens, you can opt in # to high resolution using `high`. Default value is `auto` diff --git a/lib/openai/models/beta/threads/image_url_content_block.rb b/lib/openai/models/beta/threads/image_url_content_block.rb index d2f1a28d7..846505cc8 100644 --- a/lib/openai/models/beta/threads/image_url_content_block.rb +++ b/lib/openai/models/beta/threads/image_url_content_block.rb @@ -21,7 +21,8 @@ class ImageURLContentBlock < OpenAI::Internal::Type::BaseModel # # @param image_url [OpenAI::Models::Beta::Threads::ImageURL] # - # @param type [Symbol, :image_url] The type of the content part. + # @param type [Symbol, :image_url] + # The type of the content part. end end end diff --git a/lib/openai/models/beta/threads/image_url_delta.rb b/lib/openai/models/beta/threads/image_url_delta.rb index 43fba03fa..c8df4e62a 100644 --- a/lib/openai/models/beta/threads/image_url_delta.rb +++ b/lib/openai/models/beta/threads/image_url_delta.rb @@ -20,12 +20,13 @@ class ImageURLDelta < OpenAI::Internal::Type::BaseModel optional :url, String # @!method initialize(detail: nil, url: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::ImageURLDelta} for more details. + # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageURLDelta::Detail] + # Specifies the detail level of the image. `low` uses fewer tokens, you can opt in + # to high resolution using `high`. # - # @param detail [Symbol, OpenAI::Models::Beta::Threads::ImageURLDelta::Detail] Specifies the detail level of the image. `low` uses fewer tokens, you can opt in - # - # @param url [String] The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp + # @param url [String] + # The URL of the image, must be a supported image types: jpeg, jpg, png, gif, + # webp. # Specifies the detail level of the image. `low` uses fewer tokens, you can opt in # to high resolution using `high`. diff --git a/lib/openai/models/beta/threads/image_url_delta_block.rb b/lib/openai/models/beta/threads/image_url_delta_block.rb index 72079ef12..23d53b445 100644 --- a/lib/openai/models/beta/threads/image_url_delta_block.rb +++ b/lib/openai/models/beta/threads/image_url_delta_block.rb @@ -25,11 +25,13 @@ class ImageURLDeltaBlock < OpenAI::Internal::Type::BaseModel # @!method initialize(index:, image_url: nil, type: :image_url) # References an image URL in the content of a message. # - # @param index [Integer] The index of the content part in the message. + # @param index [Integer] + # The index of the content part in the message. # # @param image_url [OpenAI::Models::Beta::Threads::ImageURLDelta] # - # @param type [Symbol, :image_url] Always `image_url`. + # @param type [Symbol, :image_url] + # Always `image_url`. end end end diff --git a/lib/openai/models/beta/threads/message.rb b/lib/openai/models/beta/threads/message.rb index ad7ae1d9c..70cc5d0a4 100644 --- a/lib/openai/models/beta/threads/message.rb +++ b/lib/openai/models/beta/threads/message.rb @@ -14,7 +14,7 @@ class Message < OpenAI::Internal::Type::BaseModel # @!attribute assistant_id # If applicable, the ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) that + # [assistant](https://developers.openai.com/api/docs/assistants/migration) that # authored this message. # # @return [String, nil] @@ -84,7 +84,7 @@ class Message < OpenAI::Internal::Type::BaseModel required :role, enum: -> { OpenAI::Beta::Threads::Message::Role } # @!attribute run_id - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) # associated with the creation of this message. Value is `null` when messages are # created manually using the create message or create thread endpoints. # @@ -99,47 +99,68 @@ class Message < OpenAI::Internal::Type::BaseModel required :status, enum: -> { OpenAI::Beta::Threads::Message::Status } # @!attribute thread_id - # The [thread](https://platform.openai.com/docs/api-reference/threads) ID that - # this message belongs to. + # The [thread](https://developers.openai.com/api/docs/assistants/migration) ID + # that this message belongs to. # # @return [String] required :thread_id, String # @!method initialize(id:, assistant_id:, attachments:, completed_at:, content:, created_at:, incomplete_at:, incomplete_details:, metadata:, role:, run_id:, status:, thread_id:, object: :"thread.message") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Message} for more details. - # # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param assistant_id [String, nil] If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-re + # @param assistant_id [String, nil] + # If applicable, the ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) that + # authored this message. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they were added to. + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they were added to. # - # @param completed_at [Integer, nil] The Unix timestamp (in seconds) for when the message was completed. + # @param completed_at [Integer, nil] + # The Unix timestamp (in seconds) for when the message was completed. # - # @param content [Array] The content of the message in array of text and/or images. + # @param content [Array] + # The content of the message in array of text and/or images. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the message was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the message was created. # - # @param incomplete_at [Integer, nil] The Unix timestamp (in seconds) for when the message was marked as incomplete. + # @param incomplete_at [Integer, nil] + # The Unix timestamp (in seconds) for when the message was marked as incomplete. # - # @param incomplete_details [OpenAI::Models::Beta::Threads::Message::IncompleteDetails, nil] On an incomplete message, details about why the message is incomplete. + # @param incomplete_details [OpenAI::Models::Beta::Threads::Message::IncompleteDetails, nil] + # On an incomplete message, details about why the message is incomplete. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param role [Symbol, OpenAI::Models::Beta::Threads::Message::Role] The entity that produced the message. One of `user` or `assistant`. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param run_id [String, nil] The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associa + # @param role [Symbol, OpenAI::Models::Beta::Threads::Message::Role] + # The entity that produced the message. One of `user` or `assistant`. # - # @param status [Symbol, OpenAI::Models::Beta::Threads::Message::Status] The status of the message, which can be either `in_progress`, `incomplete`, or ` + # @param run_id [String, nil] + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + # associated with the creation of this message. Value is `null` when messages are + # created manually using the create message or create thread endpoints. # - # @param thread_id [String] The [thread](https://platform.openai.com/docs/api-reference/threads) ID that thi + # @param status [Symbol, OpenAI::Models::Beta::Threads::Message::Status] + # The status of the message, which can be either `in_progress`, `incomplete`, or + # `completed`. # - # @param object [Symbol, :"thread.message"] The object type, which is always `thread.message`. - + # @param thread_id [String] + # The [thread](https://developers.openai.com/api/docs/assistants/migration) ID + # that this message belongs to. + # + # @param object [Symbol, :"thread.message"] + # The object type, which is always `thread.message`. class Attachment < OpenAI::Internal::Type::BaseModel # @!attribute file_id # The ID of the file to attach to the message. @@ -157,10 +178,11 @@ class Attachment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id: nil, tools: nil) - # @param file_id [String] The ID of the file to attach to the message. + # @param file_id [String] + # The ID of the file to attach to the message. # - # @param tools [Array] The tools to add this file to. - + # @param tools [Array] + # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union @@ -176,7 +198,8 @@ class AssistantToolsFileSearchTypeOnly < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(type: :file_search) - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` end # @!method self.variants @@ -195,7 +218,8 @@ class IncompleteDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(reason:) # On an incomplete message, details about why the message is incomplete. # - # @param reason [Symbol, OpenAI::Models::Beta::Threads::Message::IncompleteDetails::Reason] The reason the message is incomplete. + # @param reason [Symbol, OpenAI::Models::Beta::Threads::Message::IncompleteDetails::Reason] + # The reason the message is incomplete. # The reason the message is incomplete. # diff --git a/lib/openai/models/beta/threads/message_content.rb b/lib/openai/models/beta/threads/message_content.rb index f0771098b..fea00912b 100644 --- a/lib/openai/models/beta/threads/message_content.rb +++ b/lib/openai/models/beta/threads/message_content.rb @@ -4,14 +4,15 @@ module OpenAI module Models module Beta module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContent extend OpenAI::Internal::Type::Union discriminator :type - # References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + # References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. variant :image_file, -> { OpenAI::Beta::Threads::ImageFileContentBlock } # References an image URL in the content of a message. diff --git a/lib/openai/models/beta/threads/message_content_delta.rb b/lib/openai/models/beta/threads/message_content_delta.rb index 908eb4d7a..715a1ebd9 100644 --- a/lib/openai/models/beta/threads/message_content_delta.rb +++ b/lib/openai/models/beta/threads/message_content_delta.rb @@ -4,14 +4,15 @@ module OpenAI module Models module Beta module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContentDelta extend OpenAI::Internal::Type::Union discriminator :type - # References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + # References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. variant :image_file, -> { OpenAI::Beta::Threads::ImageFileDeltaBlock } # The text content that is part of a message. diff --git a/lib/openai/models/beta/threads/message_content_part_param.rb b/lib/openai/models/beta/threads/message_content_part_param.rb index 254bd67f4..55904f3e9 100644 --- a/lib/openai/models/beta/threads/message_content_part_param.rb +++ b/lib/openai/models/beta/threads/message_content_part_param.rb @@ -4,14 +4,15 @@ module OpenAI module Models module Beta module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContentPartParam extend OpenAI::Internal::Type::Union discriminator :type - # References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + # References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message. variant :image_file, -> { OpenAI::Beta::Threads::ImageFileContentBlock } # References an image URL in the content of a message. diff --git a/lib/openai/models/beta/threads/message_create_params.rb b/lib/openai/models/beta/threads/message_create_params.rb index 4f52f52c7..eee996415 100644 --- a/lib/openai/models/beta/threads/message_create_params.rb +++ b/lib/openai/models/beta/threads/message_create_params.rb @@ -55,18 +55,29 @@ class MessageCreateParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(thread_id:, content:, role:, attachments: nil, metadata: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageCreateParams} for more details. - # # @param thread_id [String] # - # @param content [String, Array] The text contents of the message. + # @param content [String, Array] + # The text contents of the message. + # + # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageCreateParams::Role] + # The role of the entity that is creating the message. Allowed values include: # - # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageCreateParams::Role] The role of the entity that is creating the message. Allowed values include: + # - `user`: Indicates the message is sent by an actual user and should be used in + # most cases to represent user-generated messages. + # - `assistant`: Indicates the message is generated by the assistant. Use this + # value to insert messages from the assistant into the conversation. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they should be added to. + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they should be added to. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -77,7 +88,7 @@ module Content # The text contents of the message. variant String - # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). variant -> { OpenAI::Models::Beta::Threads::MessageCreateParams::Content::MessageContentPartParamArray } # @!method self.variants @@ -124,10 +135,11 @@ class Attachment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id: nil, tools: nil) - # @param file_id [String] The ID of the file to attach to the message. + # @param file_id [String] + # The ID of the file to attach to the message. # - # @param tools [Array] The tools to add this file to. - + # @param tools [Array] + # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union @@ -145,7 +157,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(type: :file_search) - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` end # @!method self.variants diff --git a/lib/openai/models/beta/threads/message_delta.rb b/lib/openai/models/beta/threads/message_delta.rb index f22a2fa5b..252f36042 100644 --- a/lib/openai/models/beta/threads/message_delta.rb +++ b/lib/openai/models/beta/threads/message_delta.rb @@ -23,9 +23,11 @@ class MessageDelta < OpenAI::Internal::Type::BaseModel # @!method initialize(content: nil, role: nil) # The delta containing the fields that have changed on the Message. # - # @param content [Array] The content of the message in array of text and/or images. + # @param content [Array] + # The content of the message in array of text and/or images. # - # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageDelta::Role] The entity that produced the message. One of `user` or `assistant`. + # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageDelta::Role] + # The entity that produced the message. One of `user` or `assistant`. # The entity that produced the message. One of `user` or `assistant`. # diff --git a/lib/openai/models/beta/threads/message_delta_event.rb b/lib/openai/models/beta/threads/message_delta_event.rb index 14190d67f..2d85cca2e 100644 --- a/lib/openai/models/beta/threads/message_delta_event.rb +++ b/lib/openai/models/beta/threads/message_delta_event.rb @@ -27,11 +27,14 @@ class MessageDeltaEvent < OpenAI::Internal::Type::BaseModel # Represents a message delta i.e. any changed fields on a message during # streaming. # - # @param id [String] The identifier of the message, which can be referenced in API endpoints. + # @param id [String] + # The identifier of the message, which can be referenced in API endpoints. # - # @param delta [OpenAI::Models::Beta::Threads::MessageDelta] The delta containing the fields that have changed on the Message. + # @param delta [OpenAI::Models::Beta::Threads::MessageDelta] + # The delta containing the fields that have changed on the Message. # - # @param object [Symbol, :"thread.message.delta"] The object type, which is always `thread.message.delta`. + # @param object [Symbol, :"thread.message.delta"] + # The object type, which is always `thread.message.delta`. end end end diff --git a/lib/openai/models/beta/threads/message_list_params.rb b/lib/openai/models/beta/threads/message_list_params.rb index 544f16c50..72bf4b9ad 100644 --- a/lib/openai/models/beta/threads/message_list_params.rb +++ b/lib/openai/models/beta/threads/message_list_params.rb @@ -53,20 +53,30 @@ class MessageListParams < OpenAI::Internal::Type::BaseModel optional :run_id, String # @!method initialize(thread_id:, after: nil, before: nil, limit: nil, order: nil, run_id: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageListParams} for more details. - # # @param thread_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Beta::Threads::MessageListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::Threads::MessageListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # - # @param run_id [String] Filter messages by the run ID that generated them. + # @param run_id [String] + # Filter messages by the run ID that generated them. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/threads/message_update_params.rb b/lib/openai/models/beta/threads/message_update_params.rb index 79894bd44..276998ca0 100644 --- a/lib/openai/models/beta/threads/message_update_params.rb +++ b/lib/openai/models/beta/threads/message_update_params.rb @@ -31,14 +31,17 @@ class MessageUpdateParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(thread_id:, message_id:, metadata: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageUpdateParams} for more details. - # # @param thread_id [String] # # @param message_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/beta/threads/refusal_content_block.rb b/lib/openai/models/beta/threads/refusal_content_block.rb index 91eba5212..a1ee71935 100644 --- a/lib/openai/models/beta/threads/refusal_content_block.rb +++ b/lib/openai/models/beta/threads/refusal_content_block.rb @@ -21,7 +21,8 @@ class RefusalContentBlock < OpenAI::Internal::Type::BaseModel # # @param refusal [String] # - # @param type [Symbol, :refusal] Always `refusal`. + # @param type [Symbol, :refusal] + # Always `refusal`. end end end diff --git a/lib/openai/models/beta/threads/refusal_delta_block.rb b/lib/openai/models/beta/threads/refusal_delta_block.rb index cdb3d1ea1..05a99d181 100644 --- a/lib/openai/models/beta/threads/refusal_delta_block.rb +++ b/lib/openai/models/beta/threads/refusal_delta_block.rb @@ -25,11 +25,13 @@ class RefusalDeltaBlock < OpenAI::Internal::Type::BaseModel # @!method initialize(index:, refusal: nil, type: :refusal) # The refusal content that is part of a message. # - # @param index [Integer] The index of the refusal part in the message. + # @param index [Integer] + # The index of the refusal part in the message. # # @param refusal [String] # - # @param type [Symbol, :refusal] Always `refusal`. + # @param type [Symbol, :refusal] + # Always `refusal`. end end end diff --git a/lib/openai/models/beta/threads/required_action_function_tool_call.rb b/lib/openai/models/beta/threads/required_action_function_tool_call.rb index 7f1eee07f..822c3b45a 100644 --- a/lib/openai/models/beta/threads/required_action_function_tool_call.rb +++ b/lib/openai/models/beta/threads/required_action_function_tool_call.rb @@ -8,7 +8,7 @@ class RequiredActionFunctionToolCall < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the tool call. This ID must be referenced when you submit the tool # outputs in using the - # [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + # [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) # endpoint. # # @return [String] @@ -28,17 +28,20 @@ class RequiredActionFunctionToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :function # @!method initialize(id:, function:, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall} for more - # details. - # # Tool call objects # - # @param id [String] The ID of the tool call. This ID must be referenced when you submit the tool out + # @param id [String] + # The ID of the tool call. This ID must be referenced when you submit the tool + # outputs in using the + # [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) + # endpoint. # - # @param function [OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall::Function] The function definition. + # @param function [OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall::Function] + # The function definition. # - # @param type [Symbol, :function] The type of tool call the output is required for. For now, this is always `funct + # @param type [Symbol, :function] + # The type of tool call the output is required for. For now, this is always + # `function`. # @see OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall#function class Function < OpenAI::Internal::Type::BaseModel @@ -57,9 +60,11 @@ class Function < OpenAI::Internal::Type::BaseModel # @!method initialize(arguments:, name:) # The function definition. # - # @param arguments [String] The arguments that the model expects you to pass to the function. + # @param arguments [String] + # The arguments that the model expects you to pass to the function. # - # @param name [String] The name of the function. + # @param name [String] + # The name of the function. end end end diff --git a/lib/openai/models/beta/threads/run.rb b/lib/openai/models/beta/threads/run.rb index 03fee5cbf..bab95c8c0 100644 --- a/lib/openai/models/beta/threads/run.rb +++ b/lib/openai/models/beta/threads/run.rb @@ -16,8 +16,8 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute assistant_id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # execution of this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for execution of this run. # # @return [String] required :assistant_id, String @@ -61,8 +61,8 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute instructions # The instructions that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. # # @return [String] required :instructions, String @@ -100,8 +100,8 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute model # The model that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. # # @return [String] required :model, String @@ -114,7 +114,7 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute parallel_tool_calls # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. # # @return [Boolean] @@ -129,14 +129,14 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -167,8 +167,9 @@ class Run < OpenAI::Internal::Type::BaseModel required :status, enum: -> { OpenAI::Beta::Threads::RunStatus } # @!attribute thread_id - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was executed on as a part of this run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # executed on as a part of this run. # # @return [String] required :thread_id, String @@ -187,8 +188,8 @@ class Run < OpenAI::Internal::Type::BaseModel # @!attribute tools # The list of tools that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. # # @return [Array] required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AssistantTool] } @@ -220,65 +221,139 @@ class Run < OpenAI::Internal::Type::BaseModel optional :top_p, Float, nil?: true # @!method initialize(id:, assistant_id:, cancelled_at:, completed_at:, created_at:, expires_at:, failed_at:, incomplete_details:, instructions:, last_error:, max_completion_tokens:, max_prompt_tokens:, metadata:, model:, parallel_tool_calls:, required_action:, response_format:, started_at:, status:, thread_id:, tool_choice:, tools:, truncation_strategy:, usage:, temperature: nil, top_p: nil, object: :"thread.run") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Run} for more details. - # # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). - # - # @param id [String] The identifier, which can be referenced in API endpoints. - # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista - # - # @param cancelled_at [Integer, nil] The Unix timestamp (in seconds) for when the run was cancelled. - # - # @param completed_at [Integer, nil] The Unix timestamp (in seconds) for when the run was completed. - # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the run was created. - # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) for when the run will expire. - # - # @param failed_at [Integer, nil] The Unix timestamp (in seconds) for when the run failed. - # - # @param incomplete_details [OpenAI::Models::Beta::Threads::Run::IncompleteDetails, nil] Details on why the run is incomplete. Will be `null` if the run is not incomplet - # - # @param instructions [String] The instructions that the [assistant](https://platform.openai.com/docs/api-refer - # - # @param last_error [OpenAI::Models::Beta::Threads::Run::LastError, nil] The last error associated with this run. Will be `null` if there are no errors. - # - # @param max_completion_tokens [Integer, nil] The maximum number of completion tokens specified to have been used over the cou - # - # @param max_prompt_tokens [Integer, nil] The maximum number of prompt tokens specified to have been used over the course - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # [thread](https://developers.openai.com/api/docs/assistants/migration). # - # @param model [String] The model that the [assistant](https://platform.openai.com/docs/api-reference/as - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param required_action [OpenAI::Models::Beta::Threads::Run::RequiredAction, nil] Details on the action required to continue the run. Will be `null` if no action - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param started_at [Integer, nil] The Unix timestamp (in seconds) for when the run was started. - # - # @param status [Symbol, OpenAI::Models::Beta::Threads::RunStatus] The status of the run, which can be either `queued`, `in_progress`, `requires_ac - # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Controls which (if any) tool is called by the model. - # - # @param tools [Array] The list of tools that the [assistant](https://platform.openai.com/docs/api-refe - # - # @param truncation_strategy [OpenAI::Models::Beta::Threads::Run::TruncationStrategy, nil] Controls for how a thread will be truncated prior to the run. Use this to contro - # - # @param usage [OpenAI::Models::Beta::Threads::Run::Usage, nil] Usage statistics related to the run. This value will be `null` if the run is not - # - # @param temperature [Float, nil] The sampling temperature used for this run. If not set, defaults to 1. - # - # @param top_p [Float, nil] The nucleus sampling value used for this run. If not set, defaults to 1. - # - # @param object [Symbol, :"thread.run"] The object type, which is always `thread.run`. + # @param id [String] + # The identifier, which can be referenced in API endpoints. + # + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for execution of this run. + # + # @param cancelled_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run was cancelled. + # + # @param completed_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run was completed. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the run was created. + # + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run will expire. + # + # @param failed_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run failed. + # + # @param incomplete_details [OpenAI::Models::Beta::Threads::Run::IncompleteDetails, nil] + # Details on why the run is incomplete. Will be `null` if the run is not + # incomplete. + # + # @param instructions [String] + # The instructions that the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. + # + # @param last_error [OpenAI::Models::Beta::Threads::Run::LastError, nil] + # The last error associated with this run. Will be `null` if there are no errors. + # + # @param max_completion_tokens [Integer, nil] + # The maximum number of completion tokens specified to have been used over the + # course of the run. + # + # @param max_prompt_tokens [Integer, nil] + # The maximum number of prompt tokens specified to have been used over the course + # of the run. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String] + # The model that the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param required_action [OpenAI::Models::Beta::Threads::Run::RequiredAction, nil] + # Details on the action required to continue the run. Will be `null` if no action + # is required. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param started_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run was started. + # + # @param status [Symbol, OpenAI::Models::Beta::Threads::RunStatus] + # The status of the run, which can be either `queued`, `in_progress`, + # `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, + # `incomplete`, or `expired`. + # + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # executed on as a part of this run. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tools and instead generates a message. `auto` is the default value + # and means the model can pick between generating a message or calling one or more + # tools. `required` means the model must call one or more tools before responding + # to the user. Specifying a particular tool like `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tools [Array] + # The list of tools that the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. + # + # @param truncation_strategy [OpenAI::Models::Beta::Threads::Run::TruncationStrategy, nil] + # Controls for how a thread will be truncated prior to the run. Use this to + # control the initial context window of the run. + # + # @param usage [OpenAI::Models::Beta::Threads::Run::Usage, nil] + # Usage statistics related to the run. This value will be `null` if the run is not + # in a terminal state (i.e. `in_progress`, `queued`, etc.). + # + # @param temperature [Float, nil] + # The sampling temperature used for this run. If not set, defaults to 1. + # + # @param top_p [Float, nil] + # The nucleus sampling value used for this run. If not set, defaults to 1. + # + # @param object [Symbol, :"thread.run"] + # The object type, which is always `thread.run`. # @see OpenAI::Models::Beta::Threads::Run#incomplete_details class IncompleteDetails < OpenAI::Internal::Type::BaseModel @@ -290,13 +365,12 @@ class IncompleteDetails < OpenAI::Internal::Type::BaseModel optional :reason, enum: -> { OpenAI::Beta::Threads::Run::IncompleteDetails::Reason } # @!method initialize(reason: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Run::IncompleteDetails} for more details. - # # Details on why the run is incomplete. Will be `null` if the run is not # incomplete. # - # @param reason [Symbol, OpenAI::Models::Beta::Threads::Run::IncompleteDetails::Reason] The reason why the run is incomplete. This will point to which specific token li + # @param reason [Symbol, OpenAI::Models::Beta::Threads::Run::IncompleteDetails::Reason] + # The reason why the run is incomplete. This will point to which specific token + # limit was reached over the course of the run. # The reason why the run is incomplete. This will point to which specific token # limit was reached over the course of the run. @@ -330,9 +404,11 @@ class LastError < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:) # The last error associated with this run. Will be `null` if there are no errors. # - # @param code [Symbol, OpenAI::Models::Beta::Threads::Run::LastError::Code] One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. + # @param code [Symbol, OpenAI::Models::Beta::Threads::Run::LastError::Code] + # One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. # @@ -367,9 +443,11 @@ class RequiredAction < OpenAI::Internal::Type::BaseModel # Details on the action required to continue the run. Will be `null` if no action # is required. # - # @param submit_tool_outputs [OpenAI::Models::Beta::Threads::Run::RequiredAction::SubmitToolOutputs] Details on the tool outputs needed for this run to continue. + # @param submit_tool_outputs [OpenAI::Models::Beta::Threads::Run::RequiredAction::SubmitToolOutputs] + # Details on the tool outputs needed for this run to continue. # - # @param type [Symbol, :submit_tool_outputs] For now, this is always `submit_tool_outputs`. + # @param type [Symbol, :submit_tool_outputs] + # For now, this is always `submit_tool_outputs`. # @see OpenAI::Models::Beta::Threads::Run::RequiredAction#submit_tool_outputs class SubmitToolOutputs < OpenAI::Internal::Type::BaseModel @@ -385,7 +463,8 @@ class SubmitToolOutputs < OpenAI::Internal::Type::BaseModel # @!method initialize(tool_calls:) # Details on the tool outputs needed for this run to continue. # - # @param tool_calls [Array] A list of the relevant tool calls. + # @param tool_calls [Array] + # A list of the relevant tool calls. end end @@ -408,15 +487,18 @@ class TruncationStrategy < OpenAI::Internal::Type::BaseModel optional :last_messages, Integer, nil?: true # @!method initialize(type:, last_messages: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Run::TruncationStrategy} for more details. - # # Controls for how a thread will be truncated prior to the run. Use this to # control the initial context window of the run. # - # @param type [Symbol, OpenAI::Models::Beta::Threads::Run::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to + # @param type [Symbol, OpenAI::Models::Beta::Threads::Run::TruncationStrategy::Type] + # The truncation strategy to use for the thread. The default is `auto`. If set to + # `last_messages`, the thread will be truncated to the n most recent messages in + # the thread. When set to `auto`, messages in the middle of the thread will be + # dropped to fit the context length of the model, `max_prompt_tokens`. # - # @param last_messages [Integer, nil] The number of most recent messages from the thread when constructing the context + # @param last_messages [Integer, nil] + # The number of most recent messages from the thread when constructing the context + # for the run. # The truncation strategy to use for the thread. The default is `auto`. If set to # `last_messages`, the thread will be truncated to the n most recent messages in @@ -459,11 +541,14 @@ class Usage < OpenAI::Internal::Type::BaseModel # Usage statistics related to the run. This value will be `null` if the run is not # in a terminal state (i.e. `in_progress`, `queued`, etc.). # - # @param completion_tokens [Integer] Number of completion tokens used over the course of the run. + # @param completion_tokens [Integer] + # Number of completion tokens used over the course of the run. # - # @param prompt_tokens [Integer] Number of prompt tokens used over the course of the run. + # @param prompt_tokens [Integer] + # Number of prompt tokens used over the course of the run. # - # @param total_tokens [Integer] Total number of tokens used (prompt + completion). + # @param total_tokens [Integer] + # Total number of tokens used (prompt + completion). end end end diff --git a/lib/openai/models/beta/threads/run_create_params.rb b/lib/openai/models/beta/threads/run_create_params.rb index 1c53a419b..1fcb5c7b3 100644 --- a/lib/openai/models/beta/threads/run_create_params.rb +++ b/lib/openai/models/beta/threads/run_create_params.rb @@ -18,8 +18,8 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute assistant_id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. # # @return [String] required :assistant_id, String @@ -30,7 +30,7 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # # @return [Array, nil] @@ -61,8 +61,8 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute instructions # Overrides the - # [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - # of the assistant. This is useful for modifying the behavior on a per-run basis. + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. # # @return [String, nil] optional :instructions, String, nil?: true @@ -99,17 +99,18 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!attribute model - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. # # @return [String, Symbol, OpenAI::Models::ChatModel, nil] optional :model, union: -> { OpenAI::Beta::Threads::RunCreateParams::Model }, nil?: true # @!attribute parallel_tool_calls # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. # # @return [Boolean, nil] @@ -120,7 +121,7 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -128,14 +129,14 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute response_format # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -206,44 +207,127 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(thread_id:, assistant_id:, include: nil, additional_instructions: nil, additional_messages: nil, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_choice: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunCreateParams} for more details. - # # @param thread_id [String] # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista - # - # @param include [Array] A list of additional fields to include in the response. Currently the only suppo - # - # @param additional_instructions [String, nil] Appends additional instructions at the end of the instructions for the run. This - # - # @param additional_messages [Array, nil] Adds additional messages to the thread before creating the run. - # - # @param instructions [String, nil] Overrides the [instructions](https://platform.openai.com/docs/api-reference/assi - # - # @param max_completion_tokens [Integer, nil] The maximum number of completion tokens that may be used over the course of the - # - # @param max_prompt_tokens [Integer, nil] The maximum number of prompt tokens that may be used over the course of the run. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Controls which (if any) tool is called by the model. - # - # @param tools [Array, nil] Override the tools the assistant can use for this run. This is useful for modify - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the - # - # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] Controls for how a thread will be truncated prior to the run. Use this to contro + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param include [Array] + # A list of additional fields to include in the response. Currently the only + # supported value is `step_details.tool_calls[*].file_search.results[*].content` + # to fetch the file search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. + # + # @param additional_instructions [String, nil] + # Appends additional instructions at the end of the instructions for the run. This + # is useful for modifying the behavior on a per-run basis without overriding other + # instructions. + # + # @param additional_messages [Array, nil] + # Adds additional messages to the thread before creating the run. + # + # @param instructions [String, nil] + # Overrides the + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # The maximum number of completion tokens that may be used over the course of the + # run. The run will make a best effort to use only the number of completion tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # completion tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # The maximum number of prompt tokens that may be used over the course of the run. + # The run will make a best effort to use only the number of prompt tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # prompt tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tools and instead generates a message. `auto` is the default value + # and means the model can pick between generating a message or calling one or more + # tools. `required` means the model must call one or more tools before responding + # to the user. Specifying a particular tool like `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tools [Array, nil] + # Override the tools the assistant can use for this run. This is useful for + # modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] + # Controls for how a thread will be truncated prior to the run. Use this to + # control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -289,17 +373,27 @@ class AdditionalMessage < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(content:, role:, attachments: nil, metadata: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage} for more - # details. + # @param content [String, Array] + # The text contents of the message. + # + # @param role [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Role] + # The role of the entity that is creating the message. Allowed values include: # - # @param content [String, Array] The text contents of the message. + # - `user`: Indicates the message is sent by an actual user and should be used in + # most cases to represent user-generated messages. + # - `assistant`: Indicates the message is generated by the assistant. Use this + # value to insert messages from the assistant into the conversation. # - # @param role [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Role] The role of the entity that is creating the message. Allowed values include: + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they should be added to. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they should be added to. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # The text contents of the message. # @@ -310,7 +404,7 @@ module Content # The text contents of the message. variant String - # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models). + # An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models). variant( -> { OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Content::MessageContentPartParamArray @@ -365,10 +459,11 @@ class Attachment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id: nil, tools: nil) - # @param file_id [String] The ID of the file to attach to the message. + # @param file_id [String] + # The ID of the file to attach to the message. # - # @param tools [Array] The tools to add this file to. - + # @param tools [Array] + # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union @@ -389,7 +484,8 @@ class FileSearch < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(type: :file_search) - # @param type [Symbol, :file_search] The type of tool being defined: `file_search` + # @param type [Symbol, :file_search] + # The type of tool being defined: `file_search` end # @!method self.variants @@ -398,16 +494,17 @@ class FileSearch < OpenAI::Internal::Type::BaseModel end end - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. module Model extend OpenAI::Internal::Type::Union variant String - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + # The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. variant enum: -> { OpenAI::ChatModel } # @!method self.variants @@ -432,16 +529,18 @@ class TruncationStrategy < OpenAI::Internal::Type::BaseModel optional :last_messages, Integer, nil?: true # @!method initialize(type:, last_messages: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy} for more - # details. - # # Controls for how a thread will be truncated prior to the run. Use this to # control the initial context window of the run. # - # @param type [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to + # @param type [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type] + # The truncation strategy to use for the thread. The default is `auto`. If set to + # `last_messages`, the thread will be truncated to the n most recent messages in + # the thread. When set to `auto`, messages in the middle of the thread will be + # dropped to fit the context length of the model, `max_prompt_tokens`. # - # @param last_messages [Integer, nil] The number of most recent messages from the thread when constructing the context + # @param last_messages [Integer, nil] + # The number of most recent messages from the thread when constructing the context + # for the run. # The truncation strategy to use for the thread. The default is `auto`. If set to # `last_messages`, the thread will be truncated to the n most recent messages in diff --git a/lib/openai/models/beta/threads/run_list_params.rb b/lib/openai/models/beta/threads/run_list_params.rb index a4962f29b..41eafede3 100644 --- a/lib/openai/models/beta/threads/run_list_params.rb +++ b/lib/openai/models/beta/threads/run_list_params.rb @@ -47,18 +47,27 @@ class RunListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Beta::Threads::RunListParams::Order } # @!method initialize(thread_id:, after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunListParams} for more details. - # # @param thread_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb b/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb index d90a0ca3c..e8abc2365 100644 --- a/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +++ b/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb @@ -35,7 +35,8 @@ class RunSubmitToolOutputsParams < OpenAI::Internal::Type::BaseModel # # @param run_id [String] # - # @param tool_outputs [Array] A list of tools for which the outputs are being submitted. + # @param tool_outputs [Array] + # A list of tools for which the outputs are being submitted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -54,13 +55,12 @@ class ToolOutput < OpenAI::Internal::Type::BaseModel optional :tool_call_id, String # @!method initialize(output: nil, tool_call_id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunSubmitToolOutputsParams::ToolOutput} for more - # details. + # @param output [String] + # The output of the tool call to be submitted to continue the run. # - # @param output [String] The output of the tool call to be submitted to continue the run. - # - # @param tool_call_id [String] The ID of the tool call in the `required_action` object within the run object th + # @param tool_call_id [String] + # The ID of the tool call in the `required_action` object within the run object + # the output is being submitted for. end end end diff --git a/lib/openai/models/beta/threads/run_update_params.rb b/lib/openai/models/beta/threads/run_update_params.rb index 6ccfe0746..55de7d2ee 100644 --- a/lib/openai/models/beta/threads/run_update_params.rb +++ b/lib/openai/models/beta/threads/run_update_params.rb @@ -31,14 +31,17 @@ class RunUpdateParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(thread_id:, run_id:, metadata: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunUpdateParams} for more details. - # # @param thread_id [String] # # @param run_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb b/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb index 2abe8916f..733bb71ca 100644 --- a/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb +++ b/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb @@ -27,11 +27,14 @@ class CodeInterpreterLogs < OpenAI::Internal::Type::BaseModel # @!method initialize(index:, logs: nil, type: :logs) # Text output from the Code Interpreter tool call as part of a run step. # - # @param index [Integer] The index of the output in the outputs array. + # @param index [Integer] + # The index of the output in the outputs array. # - # @param logs [String] The text output from the Code Interpreter tool call. + # @param logs [String] + # The text output from the Code Interpreter tool call. # - # @param type [Symbol, :logs] Always `logs`. + # @param type [Symbol, :logs] + # Always `logs`. end end end diff --git a/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb b/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb index b00adb80c..bc0d97353 100644 --- a/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb +++ b/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb @@ -24,27 +24,27 @@ class CodeInterpreterOutputImage < OpenAI::Internal::Type::BaseModel optional :image, -> { OpenAI::Beta::Threads::Runs::CodeInterpreterOutputImage::Image } # @!method initialize(index:, image: nil, type: :image) - # @param index [Integer] The index of the output in the outputs array. + # @param index [Integer] + # The index of the output in the outputs array. # # @param image [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterOutputImage::Image] # - # @param type [Symbol, :image] Always `image`. + # @param type [Symbol, :image] + # Always `image`. # @see OpenAI::Models::Beta::Threads::Runs::CodeInterpreterOutputImage#image class Image < OpenAI::Internal::Type::BaseModel # @!attribute file_id - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. # # @return [String, nil] optional :file_id, String # @!method initialize(file_id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterOutputImage::Image} for - # more details. - # - # @param file_id [String] The [file](https://platform.openai.com/docs/api-reference/files) ID of the image + # @param file_id [String] + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. end end end diff --git a/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb b/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb index 51800e004..ea1d08f53 100644 --- a/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +++ b/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb @@ -26,16 +26,17 @@ class CodeInterpreterToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :code_interpreter # @!method initialize(id:, code_interpreter:, type: :code_interpreter) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall} for more details. - # # Details of the Code Interpreter tool call the run step was involved in. # - # @param id [String] The ID of the tool call. + # @param id [String] + # The ID of the tool call. # - # @param code_interpreter [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter] The Code Interpreter tool call definition. + # @param code_interpreter [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter] + # The Code Interpreter tool call definition. # - # @param type [Symbol, :code_interpreter] The type of tool call. This is always going to be `code_interpreter` for this ty + # @param type [Symbol, :code_interpreter] + # The type of tool call. This is always going to be `code_interpreter` for this + # type of tool call. # @see OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel @@ -61,15 +62,15 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(input:, outputs:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter} - # for more details. - # # The Code Interpreter tool call definition. # - # @param input [String] The input to the Code Interpreter tool call. + # @param input [String] + # The input to the Code Interpreter tool call. # - # @param outputs [Array] The outputs from the Code Interpreter tool call. Code Interpreter can output one + # @param outputs [Array] + # The outputs from the Code Interpreter tool call. Code Interpreter can output one + # or more items, including text (`logs`) or images (`image`). Each of these are + # represented by a different object type. # Text output from the Code Interpreter tool call as part of a run step. module Output @@ -104,9 +105,11 @@ class Logs < OpenAI::Internal::Type::BaseModel # @!method initialize(logs:, type: :logs) # Text output from the Code Interpreter tool call as part of a run step. # - # @param logs [String] The text output from the Code Interpreter tool call. + # @param logs [String] + # The text output from the Code Interpreter tool call. # - # @param type [Symbol, :logs] Always `logs`. + # @param type [Symbol, :logs] + # Always `logs`. end class Image < OpenAI::Internal::Type::BaseModel @@ -127,23 +130,22 @@ class Image < OpenAI::Internal::Type::BaseModel # @!method initialize(image:, type: :image) # @param image [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image::Image] # - # @param type [Symbol, :image] Always `image`. + # @param type [Symbol, :image] + # Always `image`. # @see OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image#image class Image < OpenAI::Internal::Type::BaseModel # @!attribute file_id - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. # # @return [String] required :file_id, String # @!method initialize(file_id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image::Image} - # for more details. - # - # @param file_id [String] The [file](https://platform.openai.com/docs/api-reference/files) ID of the image + # @param file_id [String] + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. end end diff --git a/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb b/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb index 28410fdb7..7d7a71884 100644 --- a/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +++ b/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb @@ -35,19 +35,20 @@ class CodeInterpreterToolCallDelta < OpenAI::Internal::Type::BaseModel ) # @!method initialize(index:, id: nil, code_interpreter: nil, type: :code_interpreter) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCallDelta} for more - # details. - # # Details of the Code Interpreter tool call the run step was involved in. # - # @param index [Integer] The index of the tool call in the tool calls array. + # @param index [Integer] + # The index of the tool call in the tool calls array. # - # @param id [String] The ID of the tool call. + # @param id [String] + # The ID of the tool call. # - # @param code_interpreter [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCallDelta::CodeInterpreter] The Code Interpreter tool call definition. + # @param code_interpreter [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCallDelta::CodeInterpreter] + # The Code Interpreter tool call definition. # - # @param type [Symbol, :code_interpreter] The type of tool call. This is always going to be `code_interpreter` for this ty + # @param type [Symbol, :code_interpreter] + # The type of tool call. This is always going to be `code_interpreter` for this + # type of tool call. # @see OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCallDelta#code_interpreter class CodeInterpreter < OpenAI::Internal::Type::BaseModel @@ -73,15 +74,15 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(input: nil, outputs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCallDelta::CodeInterpreter} - # for more details. - # # The Code Interpreter tool call definition. # - # @param input [String] The input to the Code Interpreter tool call. + # @param input [String] + # The input to the Code Interpreter tool call. # - # @param outputs [Array] The outputs from the Code Interpreter tool call. Code Interpreter can output one + # @param outputs [Array] + # The outputs from the Code Interpreter tool call. Code Interpreter can output one + # or more items, including text (`logs`) or images (`image`). Each of these are + # represented by a different object type. # Text output from the Code Interpreter tool call as part of a run step. module Output diff --git a/lib/openai/models/beta/threads/runs/file_search_tool_call.rb b/lib/openai/models/beta/threads/runs/file_search_tool_call.rb index 235620982..1ace0032d 100644 --- a/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +++ b/lib/openai/models/beta/threads/runs/file_search_tool_call.rb @@ -26,14 +26,15 @@ class FileSearchToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :file_search # @!method initialize(id:, file_search:, type: :file_search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall} for more details. + # @param id [String] + # The ID of the tool call object. # - # @param id [String] The ID of the tool call object. + # @param file_search [OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch] + # For now, this is always going to be an empty object. # - # @param file_search [OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch] For now, this is always going to be an empty object. - # - # @param type [Symbol, :file_search] The type of tool call. This is always going to be `file_search` for this type of + # @param type [Symbol, :file_search] + # The type of tool call. This is always going to be `file_search` for this type of + # tool call. # @see OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall#file_search class FileSearch < OpenAI::Internal::Type::BaseModel @@ -60,9 +61,11 @@ class FileSearch < OpenAI::Internal::Type::BaseModel # @!method initialize(ranking_options: nil, results: nil) # For now, this is always going to be an empty object. # - # @param ranking_options [OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions] The ranking options for the file search. + # @param ranking_options [OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions] + # The ranking options for the file search. # - # @param results [Array] The results of the file search. + # @param results [Array] + # The results of the file search. # @see OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch#ranking_options class RankingOptions < OpenAI::Internal::Type::BaseModel @@ -84,15 +87,15 @@ class RankingOptions < OpenAI::Internal::Type::BaseModel required :score_threshold, Float # @!method initialize(ranker:, score_threshold:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions} - # for more details. - # # The ranking options for the file search. # - # @param ranker [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions::Ranker] The ranker to use for the file search. If not specified will use the `auto` rank + # @param ranker [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions::Ranker] + # The ranker to use for the file search. If not specified will use the `auto` + # ranker. # - # @param score_threshold [Float] The score threshold for the file search. All values must be a floating point num + # @param score_threshold [Float] + # The score threshold for the file search. All values must be a floating point + # number between 0 and 1. # The ranker to use for the file search. If not specified will use the `auto` # ranker. @@ -144,20 +147,21 @@ class Result < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file_id:, file_name:, score:, content: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result} - # for more details. - # # A result instance of the file search. # - # @param file_id [String] The ID of the file that result was found in. + # @param file_id [String] + # The ID of the file that result was found in. # - # @param file_name [String] The name of the file that result was found in. + # @param file_name [String] + # The name of the file that result was found in. # - # @param score [Float] The score of the result. All values must be a floating point number between 0 an + # @param score [Float] + # The score of the result. All values must be a floating point number between 0 + # and 1. # - # @param content [Array] The content of the result that was found. The content is only included if reques - + # @param content [Array] + # The content of the result that was found. The content is only included if + # requested via the include query parameter. class Content < OpenAI::Internal::Type::BaseModel # @!attribute text # The text content of the file. @@ -175,9 +179,11 @@ class Content < OpenAI::Internal::Type::BaseModel ) # @!method initialize(text: nil, type: nil) - # @param text [String] The text content of the file. + # @param text [String] + # The text content of the file. # - # @param type [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type] The type of the content. + # @param type [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type] + # The type of the content. # The type of the content. # diff --git a/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb b/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb index 13c9f547d..8305706a6 100644 --- a/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb +++ b/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb @@ -32,16 +32,18 @@ class FileSearchToolCallDelta < OpenAI::Internal::Type::BaseModel optional :id, String # @!method initialize(file_search:, index:, id: nil, type: :file_search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FileSearchToolCallDelta} for more details. + # @param file_search [Object] + # For now, this is always going to be an empty object. # - # @param file_search [Object] For now, this is always going to be an empty object. + # @param index [Integer] + # The index of the tool call in the tool calls array. # - # @param index [Integer] The index of the tool call in the tool calls array. + # @param id [String] + # The ID of the tool call object. # - # @param id [String] The ID of the tool call object. - # - # @param type [Symbol, :file_search] The type of tool call. This is always going to be `file_search` for this type of + # @param type [Symbol, :file_search] + # The type of tool call. This is always going to be `file_search` for this type of + # tool call. end end end diff --git a/lib/openai/models/beta/threads/runs/function_tool_call.rb b/lib/openai/models/beta/threads/runs/function_tool_call.rb index de633613c..a0f67d6f0 100644 --- a/lib/openai/models/beta/threads/runs/function_tool_call.rb +++ b/lib/openai/models/beta/threads/runs/function_tool_call.rb @@ -26,14 +26,15 @@ class FunctionToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :function # @!method initialize(id:, function:, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FunctionToolCall} for more details. + # @param id [String] + # The ID of the tool call object. # - # @param id [String] The ID of the tool call object. + # @param function [OpenAI::Models::Beta::Threads::Runs::FunctionToolCall::Function] + # The definition of the function that was called. # - # @param function [OpenAI::Models::Beta::Threads::Runs::FunctionToolCall::Function] The definition of the function that was called. - # - # @param type [Symbol, :function] The type of tool call. This is always going to be `function` for this type of to + # @param type [Symbol, :function] + # The type of tool call. This is always going to be `function` for this type of + # tool call. # @see OpenAI::Models::Beta::Threads::Runs::FunctionToolCall#function class Function < OpenAI::Internal::Type::BaseModel @@ -51,24 +52,23 @@ class Function < OpenAI::Internal::Type::BaseModel # @!attribute output # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. # # @return [String, nil] required :output, String, nil?: true # @!method initialize(arguments:, name:, output:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FunctionToolCall::Function} for more - # details. - # # The definition of the function that was called. # - # @param arguments [String] The arguments passed to the function. + # @param arguments [String] + # The arguments passed to the function. # - # @param name [String] The name of the function. + # @param name [String] + # The name of the function. # - # @param output [String, nil] The output of the function. This will be `null` if the outputs have not been [su + # @param output [String, nil] + # The output of the function. This will be `null` if the outputs have not been + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. end end end diff --git a/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb b/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb index ad8391bb3..551628200 100644 --- a/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb +++ b/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb @@ -32,16 +32,18 @@ class FunctionToolCallDelta < OpenAI::Internal::Type::BaseModel optional :function, -> { OpenAI::Beta::Threads::Runs::FunctionToolCallDelta::Function } # @!method initialize(index:, id: nil, function: nil, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta} for more details. + # @param index [Integer] + # The index of the tool call in the tool calls array. # - # @param index [Integer] The index of the tool call in the tool calls array. + # @param id [String] + # The ID of the tool call object. # - # @param id [String] The ID of the tool call object. + # @param function [OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta::Function] + # The definition of the function that was called. # - # @param function [OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta::Function] The definition of the function that was called. - # - # @param type [Symbol, :function] The type of tool call. This is always going to be `function` for this type of to + # @param type [Symbol, :function] + # The type of tool call. This is always going to be `function` for this type of + # tool call. # @see OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta#function class Function < OpenAI::Internal::Type::BaseModel @@ -59,24 +61,23 @@ class Function < OpenAI::Internal::Type::BaseModel # @!attribute output # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. # # @return [String, nil] optional :output, String, nil?: true # @!method initialize(arguments: nil, name: nil, output: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::FunctionToolCallDelta::Function} for more - # details. - # # The definition of the function that was called. # - # @param arguments [String] The arguments passed to the function. + # @param arguments [String] + # The arguments passed to the function. # - # @param name [String] The name of the function. + # @param name [String] + # The name of the function. # - # @param output [String, nil] The output of the function. This will be `null` if the outputs have not been [su + # @param output [String, nil] + # The output of the function. This will be `null` if the outputs have not been + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. end end end diff --git a/lib/openai/models/beta/threads/runs/message_creation_step_details.rb b/lib/openai/models/beta/threads/runs/message_creation_step_details.rb index 63684981a..a2fea088e 100644 --- a/lib/openai/models/beta/threads/runs/message_creation_step_details.rb +++ b/lib/openai/models/beta/threads/runs/message_creation_step_details.rb @@ -25,7 +25,8 @@ class MessageCreationStepDetails < OpenAI::Internal::Type::BaseModel # # @param message_creation [OpenAI::Models::Beta::Threads::Runs::MessageCreationStepDetails::MessageCreation] # - # @param type [Symbol, :message_creation] Always `message_creation`. + # @param type [Symbol, :message_creation] + # Always `message_creation`. # @see OpenAI::Models::Beta::Threads::Runs::MessageCreationStepDetails#message_creation class MessageCreation < OpenAI::Internal::Type::BaseModel @@ -36,7 +37,8 @@ class MessageCreation < OpenAI::Internal::Type::BaseModel required :message_id, String # @!method initialize(message_id:) - # @param message_id [String] The ID of the message that was created by this run step. + # @param message_id [String] + # The ID of the message that was created by this run step. end end end diff --git a/lib/openai/models/beta/threads/runs/run_step.rb b/lib/openai/models/beta/threads/runs/run_step.rb index fde3abeb2..873c812e9 100644 --- a/lib/openai/models/beta/threads/runs/run_step.rb +++ b/lib/openai/models/beta/threads/runs/run_step.rb @@ -15,7 +15,7 @@ class RunStep < OpenAI::Internal::Type::BaseModel # @!attribute assistant_id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) + # [assistant](https://developers.openai.com/api/docs/assistants/migration) # associated with the run step. # # @return [String] @@ -77,8 +77,8 @@ class RunStep < OpenAI::Internal::Type::BaseModel required :object, const: :"thread.run.step" # @!attribute run_id - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that - # this run step is a part of. + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + # that this run step is a part of. # # @return [String] required :run_id, String @@ -97,8 +97,9 @@ class RunStep < OpenAI::Internal::Type::BaseModel required :step_details, union: -> { OpenAI::Beta::Threads::Runs::RunStep::StepDetails } # @!attribute thread_id - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. # # @return [String] required :thread_id, String @@ -117,42 +118,69 @@ class RunStep < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::Beta::Threads::Runs::RunStep::Usage }, nil?: true # @!method initialize(id:, assistant_id:, cancelled_at:, completed_at:, created_at:, expired_at:, failed_at:, last_error:, metadata:, run_id:, status:, step_details:, thread_id:, type:, usage:, object: :"thread.run.step") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::RunStep} for more details. - # # Represents a step in execution of a run. # - # @param id [String] The identifier of the run step, which can be referenced in API endpoints. + # @param id [String] + # The identifier of the run step, which can be referenced in API endpoints. + # + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) + # associated with the run step. # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista + # @param cancelled_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run step was cancelled. # - # @param cancelled_at [Integer, nil] The Unix timestamp (in seconds) for when the run step was cancelled. + # @param completed_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run step completed. # - # @param completed_at [Integer, nil] The Unix timestamp (in seconds) for when the run step completed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the run step was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the run step was created. + # @param expired_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run step expired. A step is + # considered expired if the parent run is expired. # - # @param expired_at [Integer, nil] The Unix timestamp (in seconds) for when the run step expired. A step is conside + # @param failed_at [Integer, nil] + # The Unix timestamp (in seconds) for when the run step failed. # - # @param failed_at [Integer, nil] The Unix timestamp (in seconds) for when the run step failed. + # @param last_error [OpenAI::Models::Beta::Threads::Runs::RunStep::LastError, nil] + # The last error associated with this run step. Will be `null` if there are no + # errors. # - # @param last_error [OpenAI::Models::Beta::Threads::Runs::RunStep::LastError, nil] The last error associated with this run step. Will be `null` if there are no err + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param run_id [String] The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that th + # @param run_id [String] + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + # that this run step is a part of. # - # @param status [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Status] The status of the run step, which can be either `in_progress`, `cancelled`, `fai + # @param status [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Status] + # The status of the run step, which can be either `in_progress`, `cancelled`, + # `failed`, `completed`, or `expired`. # - # @param step_details [OpenAI::Models::Beta::Threads::Runs::MessageCreationStepDetails, OpenAI::Models::Beta::Threads::Runs::ToolCallsStepDetails] The details of the run step. + # @param step_details [OpenAI::Models::Beta::Threads::Runs::MessageCreationStepDetails, OpenAI::Models::Beta::Threads::Runs::ToolCallsStepDetails] + # The details of the run step. # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. # - # @param type [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Type] The type of run step, which can be either `message_creation` or `tool_calls`. + # @param type [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Type] + # The type of run step, which can be either `message_creation` or `tool_calls`. # - # @param usage [OpenAI::Models::Beta::Threads::Runs::RunStep::Usage, nil] Usage statistics related to the run step. This value will be `null` while the ru + # @param usage [OpenAI::Models::Beta::Threads::Runs::RunStep::Usage, nil] + # Usage statistics related to the run step. This value will be `null` while the + # run step's status is `in_progress`. # - # @param object [Symbol, :"thread.run.step"] The object type, which is always `thread.run.step`. + # @param object [Symbol, :"thread.run.step"] + # The object type, which is always `thread.run.step`. # @see OpenAI::Models::Beta::Threads::Runs::RunStep#last_error class LastError < OpenAI::Internal::Type::BaseModel @@ -172,9 +200,11 @@ class LastError < OpenAI::Internal::Type::BaseModel # The last error associated with this run step. Will be `null` if there are no # errors. # - # @param code [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::LastError::Code] One of `server_error` or `rate_limit_exceeded`. + # @param code [Symbol, OpenAI::Models::Beta::Threads::Runs::RunStep::LastError::Code] + # One of `server_error` or `rate_limit_exceeded`. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # One of `server_error` or `rate_limit_exceeded`. # @@ -262,11 +292,14 @@ class Usage < OpenAI::Internal::Type::BaseModel # Usage statistics related to the run step. This value will be `null` while the # run step's status is `in_progress`. # - # @param completion_tokens [Integer] Number of completion tokens used over the course of the run step. + # @param completion_tokens [Integer] + # Number of completion tokens used over the course of the run step. # - # @param prompt_tokens [Integer] Number of prompt tokens used over the course of the run step. + # @param prompt_tokens [Integer] + # Number of prompt tokens used over the course of the run step. # - # @param total_tokens [Integer] Total number of tokens used (prompt + completion). + # @param total_tokens [Integer] + # Total number of tokens used (prompt + completion). end end end diff --git a/lib/openai/models/beta/threads/runs/run_step_delta.rb b/lib/openai/models/beta/threads/runs/run_step_delta.rb index 3dd76094f..9744d8706 100644 --- a/lib/openai/models/beta/threads/runs/run_step_delta.rb +++ b/lib/openai/models/beta/threads/runs/run_step_delta.rb @@ -15,7 +15,8 @@ class RunStepDelta < OpenAI::Internal::Type::BaseModel # @!method initialize(step_details: nil) # The delta containing the fields that have changed on the run step. # - # @param step_details [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaMessageDelta, OpenAI::Models::Beta::Threads::Runs::ToolCallDeltaObject] The details of the run step. + # @param step_details [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaMessageDelta, OpenAI::Models::Beta::Threads::Runs::ToolCallDeltaObject] + # The details of the run step. # The details of the run step. # diff --git a/lib/openai/models/beta/threads/runs/run_step_delta_event.rb b/lib/openai/models/beta/threads/runs/run_step_delta_event.rb index abca9d4ba..0a4bbb1ce 100644 --- a/lib/openai/models/beta/threads/runs/run_step_delta_event.rb +++ b/lib/openai/models/beta/threads/runs/run_step_delta_event.rb @@ -28,11 +28,14 @@ class RunStepDeltaEvent < OpenAI::Internal::Type::BaseModel # Represents a run step delta i.e. any changed fields on a run step during # streaming. # - # @param id [String] The identifier of the run step, which can be referenced in API endpoints. + # @param id [String] + # The identifier of the run step, which can be referenced in API endpoints. # - # @param delta [OpenAI::Models::Beta::Threads::Runs::RunStepDelta] The delta containing the fields that have changed on the run step. + # @param delta [OpenAI::Models::Beta::Threads::Runs::RunStepDelta] + # The delta containing the fields that have changed on the run step. # - # @param object [Symbol, :"thread.run.step.delta"] The object type, which is always `thread.run.step.delta`. + # @param object [Symbol, :"thread.run.step.delta"] + # The object type, which is always `thread.run.step.delta`. end end diff --git a/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb b/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb index 856e1c65f..66e69b947 100644 --- a/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +++ b/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb @@ -22,7 +22,8 @@ class RunStepDeltaMessageDelta < OpenAI::Internal::Type::BaseModel # # @param message_creation [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaMessageDelta::MessageCreation] # - # @param type [Symbol, :message_creation] Always `message_creation`. + # @param type [Symbol, :message_creation] + # Always `message_creation`. # @see OpenAI::Models::Beta::Threads::Runs::RunStepDeltaMessageDelta#message_creation class MessageCreation < OpenAI::Internal::Type::BaseModel @@ -33,7 +34,8 @@ class MessageCreation < OpenAI::Internal::Type::BaseModel optional :message_id, String # @!method initialize(message_id: nil) - # @param message_id [String] The ID of the message that was created by this run step. + # @param message_id [String] + # The ID of the message that was created by this run step. end end end diff --git a/lib/openai/models/beta/threads/runs/step_list_params.rb b/lib/openai/models/beta/threads/runs/step_list_params.rb index 8016b1d25..f669986b1 100644 --- a/lib/openai/models/beta/threads/runs/step_list_params.rb +++ b/lib/openai/models/beta/threads/runs/step_list_params.rb @@ -44,7 +44,7 @@ class StepListParams < OpenAI::Internal::Type::BaseModel # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # # @return [Array, nil] @@ -68,22 +68,38 @@ class StepListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Beta::Threads::Runs::StepListParams::Order } # @!method initialize(thread_id:, run_id:, after: nil, before: nil, include: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::StepListParams} for more details. - # # @param thread_id [String] # # @param run_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place - # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place - # - # @param include [Array] A list of additional fields to include in the response. Currently the only suppo - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 - # - # @param order [Symbol, OpenAI::Models::Beta::Threads::Runs::StepListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. + # + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. + # + # @param include [Array] + # A list of additional fields to include in the response. Currently the only + # supported value is `step_details.tool_calls[*].file_search.results[*].content` + # to fetch the file search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. + # + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. + # + # @param order [Symbol, OpenAI::Models::Beta::Threads::Runs::StepListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/beta/threads/runs/step_retrieve_params.rb b/lib/openai/models/beta/threads/runs/step_retrieve_params.rb index b836ecf18..eb0cc0780 100644 --- a/lib/openai/models/beta/threads/runs/step_retrieve_params.rb +++ b/lib/openai/models/beta/threads/runs/step_retrieve_params.rb @@ -31,7 +31,7 @@ class StepRetrieveParams < OpenAI::Internal::Type::BaseModel # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. # # @return [Array, nil] @@ -41,16 +41,20 @@ class StepRetrieveParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(thread_id:, run_id:, step_id:, include: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::StepRetrieveParams} for more details. - # # @param thread_id [String] # # @param run_id [String] # # @param step_id [String] # - # @param include [Array] A list of additional fields to include in the response. Currently the only suppo + # @param include [Array] + # A list of additional fields to include in the response. Currently the only + # supported value is `step_details.tool_calls[*].file_search.results[*].content` + # to fetch the file search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb b/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb index f92e09e78..f9760cd70 100644 --- a/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb +++ b/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb @@ -24,14 +24,15 @@ class ToolCallDeltaObject < OpenAI::Internal::Type::BaseModel ) # @!method initialize(tool_calls: nil, type: :tool_calls) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::ToolCallDeltaObject} for more details. - # # Details of the tool call. # - # @param tool_calls [Array] An array of tool calls the run step was involved in. These can be associated wit + # @param tool_calls [Array] + # An array of tool calls the run step was involved in. These can be associated + # with one of three types of tools: `code_interpreter`, `file_search`, or + # `function`. # - # @param type [Symbol, :tool_calls] Always `tool_calls`. + # @param type [Symbol, :tool_calls] + # Always `tool_calls`. end end end diff --git a/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb b/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb index d83defacc..1e1cd79cf 100644 --- a/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +++ b/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb @@ -21,14 +21,15 @@ class ToolCallsStepDetails < OpenAI::Internal::Type::BaseModel required :type, const: :tool_calls # @!method initialize(tool_calls:, type: :tool_calls) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::ToolCallsStepDetails} for more details. - # # Details of the tool call. # - # @param tool_calls [Array] An array of tool calls the run step was involved in. These can be associated wit + # @param tool_calls [Array] + # An array of tool calls the run step was involved in. These can be associated + # with one of three types of tools: `code_interpreter`, `file_search`, or + # `function`. # - # @param type [Symbol, :tool_calls] Always `tool_calls`. + # @param type [Symbol, :tool_calls] + # Always `tool_calls`. end end end diff --git a/lib/openai/models/beta/threads/text.rb b/lib/openai/models/beta/threads/text.rb index 3e914e186..3838d5c16 100644 --- a/lib/openai/models/beta/threads/text.rb +++ b/lib/openai/models/beta/threads/text.rb @@ -19,7 +19,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!method initialize(annotations:, value:) # @param annotations [Array] # - # @param value [String] The data that makes up the text. + # @param value [String] + # The data that makes up the text. end end end diff --git a/lib/openai/models/beta/threads/text_content_block.rb b/lib/openai/models/beta/threads/text_content_block.rb index c1c391fa9..85765fe68 100644 --- a/lib/openai/models/beta/threads/text_content_block.rb +++ b/lib/openai/models/beta/threads/text_content_block.rb @@ -21,7 +21,8 @@ class TextContentBlock < OpenAI::Internal::Type::BaseModel # # @param text [OpenAI::Models::Beta::Threads::Text] # - # @param type [Symbol, :text] Always `text`. + # @param type [Symbol, :text] + # Always `text`. end end end diff --git a/lib/openai/models/beta/threads/text_content_block_param.rb b/lib/openai/models/beta/threads/text_content_block_param.rb index 89ff64353..f07042360 100644 --- a/lib/openai/models/beta/threads/text_content_block_param.rb +++ b/lib/openai/models/beta/threads/text_content_block_param.rb @@ -20,9 +20,11 @@ class TextContentBlockParam < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :text) # The text content that is part of a message. # - # @param text [String] Text content to be sent to the model + # @param text [String] + # Text content to be sent to the model # - # @param type [Symbol, :text] Always `text`. + # @param type [Symbol, :text] + # Always `text`. end end end diff --git a/lib/openai/models/beta/threads/text_delta.rb b/lib/openai/models/beta/threads/text_delta.rb index 58b11c9f8..746194365 100644 --- a/lib/openai/models/beta/threads/text_delta.rb +++ b/lib/openai/models/beta/threads/text_delta.rb @@ -22,7 +22,8 @@ class TextDelta < OpenAI::Internal::Type::BaseModel # @!method initialize(annotations: nil, value: nil) # @param annotations [Array] # - # @param value [String] The data that makes up the text. + # @param value [String] + # The data that makes up the text. end end end diff --git a/lib/openai/models/beta/threads/text_delta_block.rb b/lib/openai/models/beta/threads/text_delta_block.rb index f55a50f76..a08f5d514 100644 --- a/lib/openai/models/beta/threads/text_delta_block.rb +++ b/lib/openai/models/beta/threads/text_delta_block.rb @@ -25,11 +25,13 @@ class TextDeltaBlock < OpenAI::Internal::Type::BaseModel # @!method initialize(index:, text: nil, type: :text) # The text content that is part of a message. # - # @param index [Integer] The index of the content part in the message. + # @param index [Integer] + # The index of the content part in the message. # # @param text [OpenAI::Models::Beta::Threads::TextDelta] # - # @param type [Symbol, :text] Always `text`. + # @param type [Symbol, :text] + # Always `text`. end end end diff --git a/lib/openai/models/chat/chat_completion.rb b/lib/openai/models/chat/chat_completion.rb index 31eb51c6a..59c6e7584 100644 --- a/lib/openai/models/chat/chat_completion.rb +++ b/lib/openai/models/chat/chat_completion.rb @@ -64,13 +64,15 @@ class ChatCompletion < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -99,32 +101,69 @@ class ChatCompletion < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::CompletionUsage } # @!method initialize(id:, choices:, created:, model:, metadata: nil, moderation: nil, service_tier: nil, system_fingerprint: nil, usage: nil, object: :"chat.completion") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletion} for more details. - # # Represents a chat completion response returned by model, based on the provided # input. # - # @param id [String] A unique identifier for the chat completion. + # @param id [String] + # A unique identifier for the chat completion. # - # @param choices [Array] A list of chat completion choices. Can be more than one if `n` is greater than 1 + # @param choices [Array] + # A list of chat completion choices. Can be more than one if `n` is greater + # than 1. # - # @param created [Integer] The Unix timestamp (in seconds) of when the chat completion was created. + # @param created [Integer] + # The Unix timestamp (in seconds) of when the chat completion was created. # - # @param model [String] The model used for the chat completion. + # @param model [String] + # The model used for the chat completion. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param moderation [OpenAI::Models::Chat::ChatCompletion::Moderation, nil] Moderation results for the request input and generated output, if moderated + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param service_tier [Symbol, OpenAI::Models::Chat::ChatCompletion::ServiceTier, nil] Specifies the processing type used for serving the request. + # @param moderation [OpenAI::Models::Chat::ChatCompletion::Moderation, nil] + # Moderation results for the request input and generated output, if moderated + # completions were requested. # - # @param system_fingerprint [String] This fingerprint represents the backend configuration that the model runs with. + # @param service_tier [Symbol, OpenAI::Models::Chat::ChatCompletion::ServiceTier, nil] + # Specifies the processing type used for serving the request. # - # @param usage [OpenAI::Models::CompletionUsage] Usage statistics for the completion request. + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - When not set, the default behavior is 'auto'. # - # @param object [Symbol, :"chat.completion"] The object type, which is always `chat.completion`. - + # 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. + # + # @param system_fingerprint [String] + # This fingerprint represents the backend configuration that the model runs with. + # + # Can be used in conjunction with the `seed` request parameter to understand when + # backend changes have been made that might impact determinism. + # + # @param usage [OpenAI::Models::CompletionUsage] + # Usage statistics for the completion request. + # + # @param object [Symbol, :"chat.completion"] + # The object type, which is always `chat.completion`. class Choice < OpenAI::Internal::Type::BaseModel # @!attribute finish_reason # The reason the model stopped generating tokens. This will be `stop` if the model @@ -157,16 +196,23 @@ class Choice < OpenAI::Internal::Type::BaseModel required :message, -> { OpenAI::Chat::ChatCompletionMessage } # @!method initialize(finish_reason:, index:, logprobs:, message:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletion::Choice} for more details. - # - # @param finish_reason [Symbol, OpenAI::Models::Chat::ChatCompletion::Choice::FinishReason] The reason the model stopped generating tokens. This will be `stop` if the model + # @param finish_reason [Symbol, OpenAI::Models::Chat::ChatCompletion::Choice::FinishReason] + # The reason the model stopped generating tokens. This will be `stop` if the model + # hit a natural stop point or a provided stop sequence, `length` if the maximum + # number of tokens specified in the request was reached, `content_filter` if + # content was omitted due to a flag from our content filters, `tool_calls` if the + # model called a tool, or `function_call` (deprecated) if the model called a + # function. Read the [Model Spec](https://model-spec.openai.com/2025-12-18.html) + # for more. # - # @param index [Integer] The index of the choice in the list of choices. + # @param index [Integer] + # The index of the choice in the list of choices. # - # @param logprobs [OpenAI::Models::Chat::ChatCompletion::Choice::Logprobs, nil] Log probability information for the choice. + # @param logprobs [OpenAI::Models::Chat::ChatCompletion::Choice::Logprobs, nil] + # Log probability information for the choice. # - # @param message [OpenAI::Models::Chat::ChatCompletionMessage] A chat completion message generated by the model. + # @param message [OpenAI::Models::Chat::ChatCompletionMessage] + # A chat completion message generated by the model. # The reason the model stopped generating tokens. This will be `stop` if the model # hit a natural stop point or a provided stop sequence, `length` if the maximum @@ -215,9 +261,11 @@ class Logprobs < OpenAI::Internal::Type::BaseModel # @!method initialize(content:, refusal:) # Log probability information for the choice. # - # @param content [Array, nil] A list of message content tokens with log probability information. + # @param content [Array, nil] + # A list of message content tokens with log probability information. # - # @param refusal [Array, nil] A list of message refusal tokens with log probability information. + # @param refusal [Array, nil] + # A list of message refusal tokens with log probability information. end end @@ -239,9 +287,11 @@ class Moderation < OpenAI::Internal::Type::BaseModel # Moderation results for the request input and generated output, if moderated # completions were requested. # - # @param input [OpenAI::Models::Chat::ChatCompletion::Moderation::Input::ModerationResults, OpenAI::Models::Chat::ChatCompletion::Moderation::Input::Error] Moderation for the request input. + # @param input [OpenAI::Models::Chat::ChatCompletion::Moderation::Input::ModerationResults, OpenAI::Models::Chat::ChatCompletion::Moderation::Input::Error] + # Moderation for the request input. # - # @param output [OpenAI::Models::Chat::ChatCompletion::Moderation::Output::ModerationResults, OpenAI::Models::Chat::ChatCompletion::Moderation::Output::Error] Moderation for the generated output. + # @param output [OpenAI::Models::Chat::ChatCompletion::Moderation::Output::ModerationResults, OpenAI::Models::Chat::ChatCompletion::Moderation::Output::Error] + # Moderation for the generated output. # Moderation for the request input. # @@ -286,12 +336,14 @@ class ModerationResults < OpenAI::Internal::Type::BaseModel # @!method initialize(model:, results:, type: :moderation_results) # Successful moderation results for the request input or generated output. # - # @param model [String] The moderation model used to generate the results. + # @param model [String] + # The moderation model used to generate the results. # - # @param results [Array] A list of moderation results. + # @param results [Array] + # A list of moderation results. # - # @param type [Symbol, :moderation_results] The object type, which is always `moderation_results`. - + # @param type [Symbol, :moderation_results] + # The object type, which is always `moderation_results`. class Result < OpenAI::Internal::Type::BaseModel # @!attribute categories # A dictionary of moderation categories to booleans, True if the input is flagged @@ -341,24 +393,27 @@ class Result < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletion::Moderation::Input::ModerationResults::Result} - # for more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -393,11 +448,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which is always `error`. + # @param type [Symbol, :error] + # The object type, which is always `error`. end # @!method self.variants @@ -447,12 +505,14 @@ class ModerationResults < OpenAI::Internal::Type::BaseModel # @!method initialize(model:, results:, type: :moderation_results) # Successful moderation results for the request input or generated output. # - # @param model [String] The moderation model used to generate the results. + # @param model [String] + # The moderation model used to generate the results. # - # @param results [Array] A list of moderation results. + # @param results [Array] + # A list of moderation results. # - # @param type [Symbol, :moderation_results] The object type, which is always `moderation_results`. - + # @param type [Symbol, :moderation_results] + # The object type, which is always `moderation_results`. class Result < OpenAI::Internal::Type::BaseModel # @!attribute categories # A dictionary of moderation categories to booleans, True if the input is flagged @@ -502,24 +562,27 @@ class Result < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletion::Moderation::Output::ModerationResults::Result} - # for more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -554,11 +617,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which is always `error`. + # @param type [Symbol, :error] + # The object type, which is always `error`. end # @!method self.variants @@ -573,13 +639,15 @@ class Error < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the diff --git a/lib/openai/models/chat/chat_completion_allowed_tool_choice.rb b/lib/openai/models/chat/chat_completion_allowed_tool_choice.rb index bc81ddfb4..b97f80cb4 100644 --- a/lib/openai/models/chat/chat_completion_allowed_tool_choice.rb +++ b/lib/openai/models/chat/chat_completion_allowed_tool_choice.rb @@ -17,14 +17,13 @@ class ChatCompletionAllowedToolChoice < OpenAI::Internal::Type::BaseModel required :type, const: :allowed_tools # @!method initialize(allowed_tools:, type: :allowed_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAllowedToolChoice} for more details. - # # Constrains the tools available to the model to a pre-defined set. # - # @param allowed_tools [OpenAI::Models::Chat::ChatCompletionAllowedTools] Constrains the tools available to the model to a pre-defined set. + # @param allowed_tools [OpenAI::Models::Chat::ChatCompletionAllowedTools] + # Constrains the tools available to the model to a pre-defined set. # - # @param type [Symbol, :allowed_tools] Allowed tool configuration type. Always `allowed_tools`. + # @param type [Symbol, :allowed_tools] + # Allowed tool configuration type. Always `allowed_tools`. end end diff --git a/lib/openai/models/chat/chat_completion_allowed_tools.rb b/lib/openai/models/chat/chat_completion_allowed_tools.rb index 801c8785a..54b60585b 100644 --- a/lib/openai/models/chat/chat_completion_allowed_tools.rb +++ b/lib/openai/models/chat/chat_completion_allowed_tools.rb @@ -34,14 +34,27 @@ class ChatCompletionAllowedTools < OpenAI::Internal::Type::BaseModel ) # @!method initialize(mode:, tools:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAllowedTools} for more details. - # # Constrains the tools available to the model to a pre-defined set. # - # @param mode [Symbol, OpenAI::Models::Chat::ChatCompletionAllowedTools::Mode] Constrains the tools available to the model to a pre-defined set. + # @param mode [Symbol, OpenAI::Models::Chat::ChatCompletionAllowedTools::Mode] + # Constrains the tools available to the model to a pre-defined set. + # + # `auto` allows the model to pick from among the allowed tools and generate a + # message. + # + # `required` requires the model to call one or more of the allowed tools. + # + # @param tools [ArrayObject}>] + # A list of tool definitions that the model should be allowed to call. + # + # For the Chat Completions API, the list of tool definitions might look like: # - # @param tools [ArrayObject}>] A list of tool definitions that the model should be allowed to call. + # ```json + # [ + # { "type": "function", "function": { "name": "get_weather" } }, + # { "type": "function", "function": { "name": "get_time" } } + # ] + # ``` # Constrains the tools available to the model to a pre-defined set. # diff --git a/lib/openai/models/chat/chat_completion_assistant_message_param.rb b/lib/openai/models/chat/chat_completion_assistant_message_param.rb index a74f75773..d8c96bd5e 100644 --- a/lib/openai/models/chat/chat_completion_assistant_message_param.rb +++ b/lib/openai/models/chat/chat_completion_assistant_message_param.rb @@ -12,7 +12,7 @@ class ChatCompletionAssistantMessageParam < OpenAI::Internal::Type::BaseModel # @!attribute audio # Data about a previous audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # # @return [OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Audio, nil] optional :audio, -> { OpenAI::Chat::ChatCompletionAssistantMessageParam::Audio }, nil?: true @@ -66,24 +66,32 @@ class ChatCompletionAssistantMessageParam < OpenAI::Internal::Type::BaseModel ) # @!method initialize(audio: nil, content: nil, function_call: nil, name: nil, refusal: nil, tool_calls: nil, role: :assistant) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAssistantMessageParam} for more details. - # # Messages sent by the model in response to user messages. # - # @param audio [OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Audio, nil] Data about a previous audio response from the model. + # @param audio [OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Audio, nil] + # Data about a previous audio response from the model. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param content [String, Array, nil] The contents of the assistant message. Required unless `tool_calls` or `function + # @param content [String, Array, nil] + # The contents of the assistant message. Required unless `tool_calls` or + # `function_call` is specified. # - # @param function_call [OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::FunctionCall, nil] Deprecated and replaced by `tool_calls`. The name and arguments of a function th + # @param function_call [OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::FunctionCall, nil] + # Deprecated and replaced by `tool_calls`. The name and arguments of a function + # that should be called, as generated by the model. # - # @param name [String] An optional name for the participant. Provides the model information to differen + # @param name [String] + # An optional name for the participant. Provides the model information to + # differentiate between participants of the same role. # - # @param refusal [String, nil] The refusal message by the assistant. + # @param refusal [String, nil] + # The refusal message by the assistant. # - # @param tool_calls [Array] The tool calls generated by the model, such as function calls. + # @param tool_calls [Array] + # The tool calls generated by the model, such as function calls. # - # @param role [Symbol, :assistant] The role of the messages author, in this case `assistant`. + # @param role [Symbol, :assistant] + # The role of the messages author, in this case `assistant`. # @see OpenAI::Models::Chat::ChatCompletionAssistantMessageParam#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -94,14 +102,11 @@ class Audio < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Audio} for more - # details. - # # Data about a previous audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param id [String] Unique identifier for a previous audio response from the model. + # @param id [String] + # Unique identifier for a previous audio response from the model. end # The contents of the assistant message. Required unless `tool_calls` or @@ -117,14 +122,13 @@ module Content # An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`. variant -> { OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Content::ArrayOfContentPartArray } - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ArrayOfContentPart extend OpenAI::Internal::Type::Union discriminator :type - # Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). variant :text, -> { OpenAI::Chat::ChatCompletionContentPartText } variant :refusal, -> { OpenAI::Chat::ChatCompletionContentPartRefusal } @@ -164,16 +168,17 @@ class FunctionCall < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(arguments:, name:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::FunctionCall} for - # more details. - # # Deprecated and replaced by `tool_calls`. The name and arguments of a function # that should be called, as generated by the model. # - # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma + # @param arguments [String] + # 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. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end end diff --git a/lib/openai/models/chat/chat_completion_audio.rb b/lib/openai/models/chat/chat_completion_audio.rb index fae460ec8..108ab5e99 100644 --- a/lib/openai/models/chat/chat_completion_audio.rb +++ b/lib/openai/models/chat/chat_completion_audio.rb @@ -31,20 +31,23 @@ class ChatCompletionAudio < OpenAI::Internal::Type::BaseModel required :transcript, String # @!method initialize(id:, data:, expires_at:, transcript:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAudio} for more details. - # # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param id [String] Unique identifier for this audio response. + # @param id [String] + # Unique identifier for this audio response. # - # @param data [String] Base64 encoded audio bytes generated by the model, in the format + # @param data [String] + # Base64 encoded audio bytes generated by the model, in the format specified in + # the request. # - # @param expires_at [Integer] The Unix timestamp (in seconds) for when this audio response will + # @param expires_at [Integer] + # The Unix timestamp (in seconds) for when this audio response will no longer be + # accessible on the server for use in multi-turn conversations. # - # @param transcript [String] Transcript of the audio generated by the model. + # @param transcript [String] + # Transcript of the audio generated by the model. end end diff --git a/lib/openai/models/chat/chat_completion_audio_param.rb b/lib/openai/models/chat/chat_completion_audio_param.rb index 7deca32cc..a05fd5ddf 100644 --- a/lib/openai/models/chat/chat_completion_audio_param.rb +++ b/lib/openai/models/chat/chat_completion_audio_param.rb @@ -21,16 +21,19 @@ class ChatCompletionAudioParam < OpenAI::Internal::Type::BaseModel required :voice, union: -> { OpenAI::Chat::ChatCompletionAudioParam::Voice } # @!method initialize(format_:, voice:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionAudioParam} for more details. - # # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param format_ [Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Format] Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, + # @param format_ [Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Format] + # Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, + # or `pcm16`. # - # @param voice [String, Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice::ID, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice] The voice the model uses to respond. Supported built-in voices are + # @param voice [String, Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice::ID, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice] + # The voice the model uses to respond. Supported built-in voices are `alloy`, + # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, + # `marin`, and `cedar`. You may also provide a custom voice object with an `id`, + # for example `{ "id": "voice_1234" }`. # Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, # or `pcm16`. @@ -94,7 +97,8 @@ class ID < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Custom voice reference. # - # @param id [String] The custom voice ID, e.g. `voice_1234`. + # @param id [String] + # The custom voice ID, e.g. `voice_1234`. end # @!method self.variants diff --git a/lib/openai/models/chat/chat_completion_chunk.rb b/lib/openai/models/chat/chat_completion_chunk.rb index 2229d3d0c..a9c4fe6cf 100644 --- a/lib/openai/models/chat/chat_completion_chunk.rb +++ b/lib/openai/models/chat/chat_completion_chunk.rb @@ -60,13 +60,15 @@ class ChatCompletionChunk < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -100,33 +102,74 @@ class ChatCompletionChunk < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::CompletionUsage }, nil?: true # @!method initialize(id:, choices:, created:, model:, moderation: nil, obfuscation: nil, service_tier: nil, system_fingerprint: nil, usage: nil, object: :"chat.completion.chunk") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk} for more details. - # # Represents a streamed chunk of a chat completion response returned by the model, # based on the provided input. - # [Learn more](https://platform.openai.com/docs/guides/streaming-responses). + # [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). # - # @param id [String] A unique identifier for the chat completion. Each chunk has the same ID. + # @param id [String] + # A unique identifier for the chat completion. Each chunk has the same ID. # - # @param choices [Array] A list of chat completion choices. Can contain more than one elements if `n` is + # @param choices [Array] + # A list of chat completion choices. Can contain more than one elements if `n` is + # greater than 1. Can also be empty for the last chunk if you set + # `stream_options: {"include_usage": true}`. # - # @param created [Integer] The Unix timestamp (in seconds) of when the chat completion was created. Each ch + # @param created [Integer] + # The Unix timestamp (in seconds) of when the chat completion was created. Each + # chunk has the same timestamp. # - # @param model [String] The model to generate the completion. + # @param model [String] + # The model to generate the completion. # - # @param moderation [OpenAI::Models::Chat::ChatCompletionChunk::Moderation, nil] Moderation results for the request input and generated output. Present + # @param moderation [OpenAI::Models::Chat::ChatCompletionChunk::Moderation, nil] + # Moderation results for the request input and generated output. Present on the + # moderation chunk when moderated completions are requested. # - # @param obfuscation [String] An obfuscation string added to normalize the size of streamed chunks as a + # @param obfuscation [String] + # An obfuscation string added to normalize the size of streamed chunks as a + # mitigation to certain side-channel attacks. The field is included by default and + # omitted when `stream_options.include_obfuscation` is `false`. # - # @param service_tier [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::ServiceTier, nil] Specifies the processing type used for serving the request. + # @param service_tier [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::ServiceTier, nil] + # Specifies the processing type used for serving the request. # - # @param system_fingerprint [String] This fingerprint represents the backend configuration that the model runs with. + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - When not set, the default behavior is 'auto'. # - # @param usage [OpenAI::Models::CompletionUsage, nil] An optional field that will only be present when you set + # 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. # - # @param object [Symbol, :"chat.completion.chunk"] The object type, which is always `chat.completion.chunk`. - + # @param system_fingerprint [String] + # This fingerprint represents the backend configuration that the model runs with. + # Can be used in conjunction with the `seed` request parameter to understand when + # backend changes have been made that might impact determinism. + # + # @param usage [OpenAI::Models::CompletionUsage, nil] + # An optional field that will only be present when you set + # `stream_options: {"include_usage": true}` in your request. When present, it + # contains a null value **except for the last chunk** which contains the token + # usage statistics for the entire request. + # + # **NOTE:** If the stream is interrupted or cancelled, you may not receive the + # final usage chunk which contains the total token usage for the request. + # + # @param object [Symbol, :"chat.completion.chunk"] + # The object type, which is always `chat.completion.chunk`. class Choice < OpenAI::Internal::Type::BaseModel # @!attribute delta # A chat completion delta generated by streamed model responses. @@ -164,16 +207,22 @@ class Choice < OpenAI::Internal::Type::BaseModel optional :logprobs, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs }, nil?: true # @!method initialize(delta:, finish_reason:, index:, logprobs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Choice} for more details. - # - # @param delta [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta] A chat completion delta generated by streamed model responses. + # @param delta [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta] + # A chat completion delta generated by streamed model responses. # - # @param finish_reason [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::FinishReason, nil] The reason the model stopped generating tokens. This will be `stop` if the model + # @param finish_reason [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::FinishReason, nil] + # The reason the model stopped generating tokens. This will be `stop` if the model + # hit a natural stop point or a provided stop sequence, `length` if the maximum + # number of tokens specified in the request was reached, `content_filter` if + # content was omitted due to a flag from our content filters, `tool_calls` if the + # model called a tool, or `function_call` (deprecated) if the model called a + # function. # - # @param index [Integer] The index of the choice in the list of choices. + # @param index [Integer] + # The index of the choice in the list of choices. # - # @param logprobs [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Logprobs, nil] Log probability information for the choice. + # @param logprobs [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Logprobs, nil] + # Log probability information for the choice. # @see OpenAI::Models::Chat::ChatCompletionChunk::Choice#delta class Delta < OpenAI::Internal::Type::BaseModel @@ -213,18 +262,20 @@ class Delta < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content: nil, function_call: nil, refusal: nil, role: nil, tool_calls: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta} for more details. - # # A chat completion delta generated by streamed model responses. # - # @param content [String, nil] The contents of the chunk message. + # @param content [String, nil] + # The contents of the chunk message. # - # @param function_call [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall] Deprecated and replaced by `tool_calls`. The name and arguments of a function th + # @param function_call [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall] + # Deprecated and replaced by `tool_calls`. The name and arguments of a function + # that should be called, as generated by the model. # - # @param refusal [String, nil] The refusal message generated by the model. + # @param refusal [String, nil] + # The refusal message generated by the model. # - # @param role [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::Role] The role of the author of this message. + # @param role [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::Role] + # The role of the author of this message. # # @param tool_calls [Array] @@ -248,16 +299,17 @@ class FunctionCall < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(arguments: nil, name: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall} for - # more details. - # # Deprecated and replaced by `tool_calls`. The name and arguments of a function # that should be called, as generated by the model. # - # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma + # @param arguments [String] + # 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. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end # The role of the author of this message. @@ -302,11 +354,13 @@ class ToolCall < OpenAI::Internal::Type::BaseModel # @!method initialize(index:, id: nil, function: nil, type: nil) # @param index [Integer] # - # @param id [String] The ID of the tool call. + # @param id [String] + # The ID of the tool call. # # @param function [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function] # - # @param type [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Type] The type of the tool. Currently, only `function` is supported. + # @param type [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Type] + # The type of the tool. Currently, only `function` is supported. # @see OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall#function class Function < OpenAI::Internal::Type::BaseModel @@ -326,13 +380,14 @@ class Function < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(arguments: nil, name: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function} - # for more details. + # @param arguments [String] + # 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. # - # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma - # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end # The type of the tool. Currently, only `function` is supported. @@ -395,9 +450,11 @@ class Logprobs < OpenAI::Internal::Type::BaseModel # @!method initialize(content:, refusal:) # Log probability information for the choice. # - # @param content [Array, nil] A list of message content tokens with log probability information. + # @param content [Array, nil] + # A list of message content tokens with log probability information. # - # @param refusal [Array, nil] A list of message refusal tokens with log probability information. + # @param refusal [Array, nil] + # A list of message refusal tokens with log probability information. end end @@ -419,9 +476,11 @@ class Moderation < OpenAI::Internal::Type::BaseModel # Moderation results for the request input and generated output. Present on the # moderation chunk when moderated completions are requested. # - # @param input [OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Input::ModerationResults, OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Input::Error] Moderation for the request input. + # @param input [OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Input::ModerationResults, OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Input::Error] + # Moderation for the request input. # - # @param output [OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Output::ModerationResults, OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Output::Error] Moderation for the generated output. + # @param output [OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Output::ModerationResults, OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Output::Error] + # Moderation for the generated output. # Moderation for the request input. # @@ -469,12 +528,14 @@ class ModerationResults < OpenAI::Internal::Type::BaseModel # @!method initialize(model:, results:, type: :moderation_results) # Successful moderation results for the request input or generated output. # - # @param model [String] The moderation model used to generate the results. + # @param model [String] + # The moderation model used to generate the results. # - # @param results [Array] A list of moderation results. + # @param results [Array] + # A list of moderation results. # - # @param type [Symbol, :moderation_results] The object type, which is always `moderation_results`. - + # @param type [Symbol, :moderation_results] + # The object type, which is always `moderation_results`. class Result < OpenAI::Internal::Type::BaseModel # @!attribute categories # A dictionary of moderation categories to booleans, True if the input is flagged @@ -524,24 +585,27 @@ class Result < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Input::ModerationResults::Result} - # for more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -576,11 +640,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which is always `error`. + # @param type [Symbol, :error] + # The object type, which is always `error`. end # @!method self.variants @@ -633,12 +700,14 @@ class ModerationResults < OpenAI::Internal::Type::BaseModel # @!method initialize(model:, results:, type: :moderation_results) # Successful moderation results for the request input or generated output. # - # @param model [String] The moderation model used to generate the results. + # @param model [String] + # The moderation model used to generate the results. # - # @param results [Array] A list of moderation results. + # @param results [Array] + # A list of moderation results. # - # @param type [Symbol, :moderation_results] The object type, which is always `moderation_results`. - + # @param type [Symbol, :moderation_results] + # The object type, which is always `moderation_results`. class Result < OpenAI::Internal::Type::BaseModel # @!attribute categories # A dictionary of moderation categories to booleans, True if the input is flagged @@ -688,24 +757,27 @@ class Result < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionChunk::Moderation::Output::ModerationResults::Result} - # for more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -740,11 +812,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which is always `error`. + # @param type [Symbol, :error] + # The object type, which is always `error`. end # @!method self.variants @@ -759,13 +834,15 @@ class Error < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the diff --git a/lib/openai/models/chat/chat_completion_content_part.rb b/lib/openai/models/chat/chat_completion_content_part.rb index 29885031d..24428ba0a 100644 --- a/lib/openai/models/chat/chat_completion_content_part.rb +++ b/lib/openai/models/chat/chat_completion_content_part.rb @@ -3,23 +3,22 @@ module OpenAI module Models module Chat - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ChatCompletionContentPart extend OpenAI::Internal::Type::Union discriminator :type - # Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). variant :text, -> { OpenAI::Chat::ChatCompletionContentPartText } - # Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :image_url, -> { OpenAI::Chat::ChatCompletionContentPartImage } - # Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + # Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). variant :input_audio, -> { OpenAI::Chat::ChatCompletionContentPartInputAudio } - # Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + # Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation. variant :file, -> { OpenAI::Chat::ChatCompletionContentPart::File } class File < OpenAI::Internal::Type::BaseModel @@ -46,17 +45,18 @@ class File < OpenAI::Internal::Type::BaseModel ) # @!method initialize(file:, prompt_cache_breakpoint: nil, type: :file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPart::File} for more details. - # - # Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text - # generation. + # Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) + # for text generation. # # @param file [OpenAI::Models::Chat::ChatCompletionContentPart::File::File] # - # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :file] The type of the content part. Always `file`. + # @param type [Symbol, :file] + # The type of the content part. Always `file`. # @see OpenAI::Models::Chat::ChatCompletionContentPart::File#file class File < OpenAI::Internal::Type::BaseModel @@ -80,14 +80,15 @@ class File < OpenAI::Internal::Type::BaseModel optional :filename, String # @!method initialize(file_data: nil, file_id: nil, filename: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPart::File::File} for more details. - # - # @param file_data [String] The base64 encoded file data, used when passing the file to the model + # @param file_data [String] + # The base64 encoded file data, used when passing the file to the model as a + # string. # - # @param file_id [String] The ID of an uploaded file to use as input. + # @param file_id [String] + # The ID of an uploaded file to use as input. # - # @param filename [String] The name of the file, used when passing the file to the model as a + # @param filename [String] + # The name of the file, used when passing the file to the model as a string. end # @see OpenAI::Models::Chat::ChatCompletionContentPart::File#prompt_cache_breakpoint @@ -103,7 +104,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end diff --git a/lib/openai/models/chat/chat_completion_content_part_image.rb b/lib/openai/models/chat/chat_completion_content_part_image.rb index 315dee2ea..2101ff4b5 100644 --- a/lib/openai/models/chat/chat_completion_content_part_image.rb +++ b/lib/openai/models/chat/chat_completion_content_part_image.rb @@ -27,16 +27,18 @@ class ChatCompletionContentPartImage < OpenAI::Internal::Type::BaseModel ) # @!method initialize(image_url:, prompt_cache_breakpoint: nil, type: :image_url) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPartImage} for more details. - # - # Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # Learn about + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). # # @param image_url [OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL] # - # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :image_url] The type of the content part. + # @param type [Symbol, :image_url] + # The type of the content part. # @see OpenAI::Models::Chat::ChatCompletionContentPartImage#image_url class ImageURL < OpenAI::Internal::Type::BaseModel @@ -48,22 +50,21 @@ class ImageURL < OpenAI::Internal::Type::BaseModel # @!attribute detail # Specifies the detail level of the image. Learn more in the - # [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). # # @return [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL::Detail, nil] optional :detail, enum: -> { OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail } # @!method initialize(url:, detail: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL} for more - # details. - # - # @param url [String] Either a URL of the image or the base64 encoded image data. + # @param url [String] + # Either a URL of the image or the base64 encoded image data. # - # @param detail [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL::Detail] Specifies the detail level of the image. Learn more in the [Vision guide](https: + # @param detail [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL::Detail] + # Specifies the detail level of the image. Learn more in the + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). # Specifies the detail level of the image. Learn more in the - # [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). # # @see OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL#detail module Detail @@ -91,7 +92,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/chat/chat_completion_content_part_input_audio.rb b/lib/openai/models/chat/chat_completion_content_part_input_audio.rb index eb7619704..6fccf6278 100644 --- a/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +++ b/lib/openai/models/chat/chat_completion_content_part_input_audio.rb @@ -27,16 +27,17 @@ class ChatCompletionContentPartInputAudio < OpenAI::Internal::Type::BaseModel ) # @!method initialize(input_audio:, prompt_cache_breakpoint: nil, type: :input_audio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPartInputAudio} for more details. - # - # Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + # Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). # # @param input_audio [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::InputAudio] # - # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_audio] The type of the content part. Always `input_audio`. + # @param type [Symbol, :input_audio] + # The type of the content part. Always `input_audio`. # @see OpenAI::Models::Chat::ChatCompletionContentPartInputAudio#input_audio class InputAudio < OpenAI::Internal::Type::BaseModel @@ -57,13 +58,11 @@ class InputAudio < OpenAI::Internal::Type::BaseModel ) # @!method initialize(data:, format_:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::InputAudio} for more - # details. - # - # @param data [String] Base64 encoded audio data. + # @param data [String] + # Base64 encoded audio data. # - # @param format_ [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::InputAudio::Format] The format of the encoded audio data. Currently supports "wav" and "mp3". + # @param format_ [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::InputAudio::Format] + # The format of the encoded audio data. Currently supports "wav" and "mp3". # The format of the encoded audio data. Currently supports "wav" and "mp3". # @@ -92,7 +91,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/chat/chat_completion_content_part_refusal.rb b/lib/openai/models/chat/chat_completion_content_part_refusal.rb index 5f1e561e2..147b680aa 100644 --- a/lib/openai/models/chat/chat_completion_content_part_refusal.rb +++ b/lib/openai/models/chat/chat_completion_content_part_refusal.rb @@ -17,9 +17,11 @@ class ChatCompletionContentPartRefusal < OpenAI::Internal::Type::BaseModel required :type, const: :refusal # @!method initialize(refusal:, type: :refusal) - # @param refusal [String] The refusal message generated by the model. + # @param refusal [String] + # The refusal message generated by the model. # - # @param type [Symbol, :refusal] The type of the content part. + # @param type [Symbol, :refusal] + # The type of the content part. end end diff --git a/lib/openai/models/chat/chat_completion_content_part_text.rb b/lib/openai/models/chat/chat_completion_content_part_text.rb index 71c2898c6..199c22703 100644 --- a/lib/openai/models/chat/chat_completion_content_part_text.rb +++ b/lib/openai/models/chat/chat_completion_content_part_text.rb @@ -28,17 +28,18 @@ class ChatCompletionContentPartText < OpenAI::Internal::Type::BaseModel ) # @!method initialize(text:, prompt_cache_breakpoint: nil, type: :text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionContentPartText} for more details. + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). # - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # @param text [String] + # The text content. # - # @param text [String] The text content. + # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL - # - # @param type [Symbol, :text] The type of the content part. + # @param type [Symbol, :text] + # The type of the content part. # @see OpenAI::Models::Chat::ChatCompletionContentPartText#prompt_cache_breakpoint class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel @@ -53,7 +54,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/chat/chat_completion_custom_tool.rb b/lib/openai/models/chat/chat_completion_custom_tool.rb index 9ea9f3238..f99049a5a 100644 --- a/lib/openai/models/chat/chat_completion_custom_tool.rb +++ b/lib/openai/models/chat/chat_completion_custom_tool.rb @@ -17,14 +17,13 @@ class ChatCompletionCustomTool < OpenAI::Internal::Type::BaseModel required :type, const: :custom # @!method initialize(custom:, type: :custom) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionCustomTool} for more details. - # # A custom tool that processes input using a specified format. # - # @param custom [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom] Properties of the custom tool. + # @param custom [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom] + # Properties of the custom tool. # - # @param type [Symbol, :custom] The type of the custom tool. Always `custom`. + # @param type [Symbol, :custom] + # The type of the custom tool. Always `custom`. # @see OpenAI::Models::Chat::ChatCompletionCustomTool#custom class Custom < OpenAI::Internal::Type::BaseModel @@ -53,16 +52,16 @@ class Custom < OpenAI::Internal::Type::BaseModel ) # @!method initialize(name:, description: nil, format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionCustomTool::Custom} for more details. - # # Properties of the custom tool. # - # @param name [String] The name of the custom tool, used to identify it in tool calls. + # @param name [String] + # The name of the custom tool, used to identify it in tool calls. # - # @param description [String] Optional description of the custom tool, used to provide more context. + # @param description [String] + # Optional description of the custom tool, used to provide more context. # - # @param format_ [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Text, OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar] The input format for the custom tool. Default is unconstrained text. + # @param format_ [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Text, OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar] + # The input format for the custom tool. Default is unconstrained text. # The input format for the custom tool. Default is unconstrained text. # @@ -88,7 +87,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :text) # Unconstrained free-form text. # - # @param type [Symbol, :text] Unconstrained text format. Always `text`. + # @param type [Symbol, :text] + # Unconstrained text format. Always `text`. end class Grammar < OpenAI::Internal::Type::BaseModel @@ -107,9 +107,11 @@ class Grammar < OpenAI::Internal::Type::BaseModel # @!method initialize(grammar:, type: :grammar) # A grammar defined by the user. # - # @param grammar [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar] Your chosen grammar. + # @param grammar [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar] + # Your chosen grammar. # - # @param type [Symbol, :grammar] Grammar format. Always `grammar`. + # @param type [Symbol, :grammar] + # Grammar format. Always `grammar`. # @see OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar#grammar class Grammar < OpenAI::Internal::Type::BaseModel @@ -131,9 +133,11 @@ class Grammar < OpenAI::Internal::Type::BaseModel # @!method initialize(definition:, syntax:) # Your chosen grammar. # - # @param definition [String] The grammar definition. + # @param definition [String] + # The grammar definition. # - # @param syntax [Symbol, OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar::Syntax] The syntax of the grammar definition. One of `lark` or `regex`. + # @param syntax [Symbol, OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar::Syntax] + # The syntax of the grammar definition. One of `lark` or `regex`. # The syntax of the grammar definition. One of `lark` or `regex`. # diff --git a/lib/openai/models/chat/chat_completion_deleted.rb b/lib/openai/models/chat/chat_completion_deleted.rb index 2cec245f0..56cea84fe 100644 --- a/lib/openai/models/chat/chat_completion_deleted.rb +++ b/lib/openai/models/chat/chat_completion_deleted.rb @@ -24,11 +24,14 @@ class ChatCompletionDeleted < OpenAI::Internal::Type::BaseModel required :object, const: :"chat.completion.deleted" # @!method initialize(id:, deleted:, object: :"chat.completion.deleted") - # @param id [String] The ID of the chat completion that was deleted. + # @param id [String] + # The ID of the chat completion that was deleted. # - # @param deleted [Boolean] Whether the chat completion was deleted. + # @param deleted [Boolean] + # Whether the chat completion was deleted. # - # @param object [Symbol, :"chat.completion.deleted"] The type of object being deleted. + # @param object [Symbol, :"chat.completion.deleted"] + # The type of object being deleted. end end diff --git a/lib/openai/models/chat/chat_completion_developer_message_param.rb b/lib/openai/models/chat/chat_completion_developer_message_param.rb index 9645ed9af..e02223d04 100644 --- a/lib/openai/models/chat/chat_completion_developer_message_param.rb +++ b/lib/openai/models/chat/chat_completion_developer_message_param.rb @@ -24,18 +24,19 @@ class ChatCompletionDeveloperMessageParam < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(content:, name: nil, role: :developer) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionDeveloperMessageParam} for more details. - # # Developer-provided instructions that the model should follow, regardless of # messages sent by the user. With o1 models and newer, `developer` messages # replace the previous `system` messages. # - # @param content [String, Array] The contents of the developer message. + # @param content [String, Array] + # The contents of the developer message. # - # @param name [String] An optional name for the participant. Provides the model information to differen + # @param name [String] + # An optional name for the participant. Provides the model information to + # differentiate between participants of the same role. # - # @param role [Symbol, :developer] The role of the messages author, in this case `developer`. + # @param role [Symbol, :developer] + # The role of the messages author, in this case `developer`. # The contents of the developer message. # diff --git a/lib/openai/models/chat/chat_completion_function_call_option.rb b/lib/openai/models/chat/chat_completion_function_call_option.rb index 89566e416..9d6b09948 100644 --- a/lib/openai/models/chat/chat_completion_function_call_option.rb +++ b/lib/openai/models/chat/chat_completion_function_call_option.rb @@ -14,7 +14,8 @@ class ChatCompletionFunctionCallOption < OpenAI::Internal::Type::BaseModel # Specifying a particular function via `{"name": "my_function"}` forces the model # to call that function. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end diff --git a/lib/openai/models/chat/chat_completion_function_message_param.rb b/lib/openai/models/chat/chat_completion_function_message_param.rb index feb987498..4d9cee596 100644 --- a/lib/openai/models/chat/chat_completion_function_message_param.rb +++ b/lib/openai/models/chat/chat_completion_function_message_param.rb @@ -24,11 +24,14 @@ class ChatCompletionFunctionMessageParam < OpenAI::Internal::Type::BaseModel required :role, const: :function # @!method initialize(content:, name:, role: :function) - # @param content [String, nil] The contents of the function message. + # @param content [String, nil] + # The contents of the function message. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. # - # @param role [Symbol, :function] The role of the messages author, in this case `function`. + # @param role [Symbol, :function] + # The role of the messages author, in this case `function`. end end diff --git a/lib/openai/models/chat/chat_completion_function_tool.rb b/lib/openai/models/chat/chat_completion_function_tool.rb index dbedf8e5b..d778c1be6 100644 --- a/lib/openai/models/chat/chat_completion_function_tool.rb +++ b/lib/openai/models/chat/chat_completion_function_tool.rb @@ -20,7 +20,8 @@ class ChatCompletionFunctionTool < OpenAI::Internal::Type::BaseModel # # @param function [OpenAI::Models::FunctionDefinition] # - # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported. + # @param type [Symbol, :function] + # The type of the tool. Currently, only `function` is supported. end end diff --git a/lib/openai/models/chat/chat_completion_message.rb b/lib/openai/models/chat/chat_completion_message.rb index 001286e58..17489da9a 100644 --- a/lib/openai/models/chat/chat_completion_message.rb +++ b/lib/openai/models/chat/chat_completion_message.rb @@ -32,7 +32,7 @@ class ChatCompletionMessage < OpenAI::Internal::Type::BaseModel # @!attribute annotations # Annotations for the message, when applicable, as when using the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # # @return [Array, nil] optional( @@ -43,7 +43,7 @@ class ChatCompletionMessage < OpenAI::Internal::Type::BaseModel # @!attribute audio # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # # @return [OpenAI::Models::Chat::ChatCompletionAudio, nil] optional :audio, -> { OpenAI::Chat::ChatCompletionAudio }, nil?: true @@ -67,25 +67,32 @@ class ChatCompletionMessage < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, refusal:, annotations: nil, audio: nil, function_call: nil, tool_calls: nil, role: :assistant) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionMessage} for more details. - # # A chat completion message generated by the model. # - # @param content [String, nil] The contents of the message. + # @param content [String, nil] + # The contents of the message. # - # @param refusal [String, nil] The refusal message generated by the model. + # @param refusal [String, nil] + # The refusal message generated by the model. # - # @param annotations [Array] Annotations for the message, when applicable, as when using the + # @param annotations [Array] + # Annotations for the message, when applicable, as when using the + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param audio [OpenAI::Models::Chat::ChatCompletionAudio, nil] If the audio output modality is requested, this object contains data + # @param audio [OpenAI::Models::Chat::ChatCompletionAudio, nil] + # If the audio output modality is requested, this object contains data about the + # audio response from the model. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param function_call [OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall] Deprecated and replaced by `tool_calls`. The name and arguments of a function th + # @param function_call [OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall] + # Deprecated and replaced by `tool_calls`. The name and arguments of a function + # that should be called, as generated by the model. # - # @param tool_calls [Array] The tool calls generated by the model, such as function calls. + # @param tool_calls [Array] + # The tool calls generated by the model, such as function calls. # - # @param role [Symbol, :assistant] The role of the author of this message. - + # @param role [Symbol, :assistant] + # The role of the author of this message. class Annotation < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of the URL citation. Always `url_citation`. @@ -102,9 +109,11 @@ class Annotation < OpenAI::Internal::Type::BaseModel # @!method initialize(url_citation:, type: :url_citation) # A URL citation when using web search. # - # @param url_citation [OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation] A URL citation when using web search. + # @param url_citation [OpenAI::Models::Chat::ChatCompletionMessage::Annotation::URLCitation] + # A URL citation when using web search. # - # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The type of the URL citation. Always `url_citation`. # @see OpenAI::Models::Chat::ChatCompletionMessage::Annotation#url_citation class URLCitation < OpenAI::Internal::Type::BaseModel @@ -135,13 +144,17 @@ class URLCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(end_index:, start_index:, title:, url:) # A URL citation when using web search. # - # @param end_index [Integer] The index of the last character of the URL citation in the message. + # @param end_index [Integer] + # The index of the last character of the URL citation in the message. # - # @param start_index [Integer] The index of the first character of the URL citation in the message. + # @param start_index [Integer] + # The index of the first character of the URL citation in the message. # - # @param title [String] The title of the web resource. + # @param title [String] + # The title of the web resource. # - # @param url [String] The URL of the web resource. + # @param url [String] + # The URL of the web resource. end end @@ -165,15 +178,17 @@ class FunctionCall < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(arguments:, name:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall} for more details. - # # Deprecated and replaced by `tool_calls`. The name and arguments of a function # that should be called, as generated by the model. # - # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma + # @param arguments [String] + # 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. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end end diff --git a/lib/openai/models/chat/chat_completion_message_custom_tool_call.rb b/lib/openai/models/chat/chat_completion_message_custom_tool_call.rb index 2d83c132e..fb67a3632 100644 --- a/lib/openai/models/chat/chat_completion_message_custom_tool_call.rb +++ b/lib/openai/models/chat/chat_completion_message_custom_tool_call.rb @@ -25,11 +25,14 @@ class ChatCompletionMessageCustomToolCall < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, custom:, type: :custom) # A call to a custom tool created by the model. # - # @param id [String] The ID of the tool call. + # @param id [String] + # The ID of the tool call. # - # @param custom [OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall::Custom] The custom tool that the model called. + # @param custom [OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall::Custom] + # The custom tool that the model called. # - # @param type [Symbol, :custom] The type of the tool. Always `custom`. + # @param type [Symbol, :custom] + # The type of the tool. Always `custom`. # @see OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall#custom class Custom < OpenAI::Internal::Type::BaseModel @@ -48,9 +51,11 @@ class Custom < OpenAI::Internal::Type::BaseModel # @!method initialize(input:, name:) # The custom tool that the model called. # - # @param input [String] The input for the custom tool call generated by the model. + # @param input [String] + # The input for the custom tool call generated by the model. # - # @param name [String] The name of the custom tool to call. + # @param name [String] + # The name of the custom tool to call. end end end diff --git a/lib/openai/models/chat/chat_completion_message_function_tool_call.rb b/lib/openai/models/chat/chat_completion_message_function_tool_call.rb index 20912e15d..a3a39631e 100644 --- a/lib/openai/models/chat/chat_completion_message_function_tool_call.rb +++ b/lib/openai/models/chat/chat_completion_message_function_tool_call.rb @@ -25,11 +25,14 @@ class ChatCompletionMessageFunctionToolCall < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, function:, type: :function) # A call to a function tool created by the model. # - # @param id [String] The ID of the tool call. + # @param id [String] + # The ID of the tool call. # - # @param function [OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function] The function that the model called. + # @param function [OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function] + # The function that the model called. # - # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported. + # @param type [Symbol, :function] + # The type of the tool. Currently, only `function` is supported. # @see OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall#function class Function < OpenAI::Internal::Type::BaseModel @@ -57,15 +60,16 @@ class Function < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(arguments:, name:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function} for more - # details. - # # The function that the model called. # - # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma + # @param arguments [String] + # 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. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end end diff --git a/lib/openai/models/chat/chat_completion_named_tool_choice.rb b/lib/openai/models/chat/chat_completion_named_tool_choice.rb index a7cea41d3..7caef8ca6 100644 --- a/lib/openai/models/chat/chat_completion_named_tool_choice.rb +++ b/lib/openai/models/chat/chat_completion_named_tool_choice.rb @@ -21,7 +21,8 @@ class ChatCompletionNamedToolChoice < OpenAI::Internal::Type::BaseModel # # @param function [OpenAI::Models::Chat::ChatCompletionNamedToolChoice::Function] # - # @param type [Symbol, :function] For function calling, the type is always `function`. + # @param type [Symbol, :function] + # For function calling, the type is always `function`. # @see OpenAI::Models::Chat::ChatCompletionNamedToolChoice#function class Function < OpenAI::Internal::Type::BaseModel @@ -32,7 +33,8 @@ class Function < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(name:) - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. end end end diff --git a/lib/openai/models/chat/chat_completion_named_tool_choice_custom.rb b/lib/openai/models/chat/chat_completion_named_tool_choice_custom.rb index cf2d854e6..c191e33af 100644 --- a/lib/openai/models/chat/chat_completion_named_tool_choice_custom.rb +++ b/lib/openai/models/chat/chat_completion_named_tool_choice_custom.rb @@ -21,7 +21,8 @@ class ChatCompletionNamedToolChoiceCustom < OpenAI::Internal::Type::BaseModel # # @param custom [OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom::Custom] # - # @param type [Symbol, :custom] For custom tool calling, the type is always `custom`. + # @param type [Symbol, :custom] + # For custom tool calling, the type is always `custom`. # @see OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom#custom class Custom < OpenAI::Internal::Type::BaseModel @@ -32,7 +33,8 @@ class Custom < OpenAI::Internal::Type::BaseModel required :name, String # @!method initialize(name:) - # @param name [String] The name of the custom tool to call. + # @param name [String] + # The name of the custom tool to call. end end end diff --git a/lib/openai/models/chat/chat_completion_prediction_content.rb b/lib/openai/models/chat/chat_completion_prediction_content.rb index b8ce08d7b..e0aa4eb50 100644 --- a/lib/openai/models/chat/chat_completion_prediction_content.rb +++ b/lib/openai/models/chat/chat_completion_prediction_content.rb @@ -20,15 +20,17 @@ class ChatCompletionPredictionContent < OpenAI::Internal::Type::BaseModel required :type, const: :content # @!method initialize(content:, type: :content) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionPredictionContent} for more details. - # # Static predicted output content, such as the content of a text file that is # being regenerated. # - # @param content [String, Array] The content that should be matched when generating a model response. + # @param content [String, Array] + # The content that should be matched when generating a model response. If + # generated tokens would match this content, the entire model response can be + # returned much more quickly. # - # @param type [Symbol, :content] The type of the predicted content you want to provide. This type is + # @param type [Symbol, :content] + # The type of the predicted content you want to provide. This type is currently + # always `content`. # The content that should be matched when generating a model response. If # generated tokens would match this content, the entire model response can be @@ -42,7 +44,7 @@ module Content # text of a file you are regenerating with minor changes. variant String - # An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs. + # An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text inputs. variant( -> { OpenAI::Models::Chat::ChatCompletionPredictionContent::Content::ChatCompletionContentPartTextArray } ) diff --git a/lib/openai/models/chat/chat_completion_store_message.rb b/lib/openai/models/chat/chat_completion_store_message.rb index 74c5b9261..babbe806c 100644 --- a/lib/openai/models/chat/chat_completion_store_message.rb +++ b/lib/openai/models/chat/chat_completion_store_message.rb @@ -24,38 +24,48 @@ class ChatCompletionStoreMessage < OpenAI::Models::Chat::ChatCompletionMessage ) # @!method initialize(content:, refusal:, id:, annotations: nil, audio: nil, function_call: nil, tool_calls: nil, content_parts: nil, role: :assistant) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionStoreMessage} for more details. - # # A chat completion message generated by the model. # - # @param content [String, nil] The contents of the message. + # @param content [String, nil] + # The contents of the message. # - # @param refusal [String, nil] The refusal message generated by the model. + # @param refusal [String, nil] + # The refusal message generated by the model. # - # @param id [String] The identifier of the chat message. + # @param id [String] + # The identifier of the chat message. # - # @param annotations [Array] Annotations for the message, when applicable, as when using the + # @param annotations [Array] + # Annotations for the message, when applicable, as when using the + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param audio [OpenAI::Models::Chat::ChatCompletionAudio, nil] If the audio output modality is requested, this object contains data + # @param audio [OpenAI::Models::Chat::ChatCompletionAudio, nil] + # If the audio output modality is requested, this object contains data about the + # audio response from the model. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param function_call [OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall] Deprecated and replaced by `tool_calls`. The name and arguments of a function th + # @param function_call [OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall] + # Deprecated and replaced by `tool_calls`. The name and arguments of a function + # that should be called, as generated by the model. # - # @param tool_calls [Array] The tool calls generated by the model, such as function calls. + # @param tool_calls [Array] + # The tool calls generated by the model, such as function calls. # - # @param content_parts [Array, nil] If a content parts array was provided, this is an array of `text` and `image_url + # @param content_parts [Array, nil] + # If a content parts array was provided, this is an array of `text` and + # `image_url` parts. Otherwise, null. # - # @param role [Symbol, :assistant] The role of the author of this message. + # @param role [Symbol, :assistant] + # The role of the author of this message. - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ContentPart extend OpenAI::Internal::Type::Union - # Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). variant -> { OpenAI::Chat::ChatCompletionContentPartText } - # Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant -> { OpenAI::Chat::ChatCompletionContentPartImage } # @!method self.variants diff --git a/lib/openai/models/chat/chat_completion_stream_options.rb b/lib/openai/models/chat/chat_completion_stream_options.rb index 8ce0d03e8..e9739a084 100644 --- a/lib/openai/models/chat/chat_completion_stream_options.rb +++ b/lib/openai/models/chat/chat_completion_stream_options.rb @@ -28,14 +28,24 @@ class ChatCompletionStreamOptions < OpenAI::Internal::Type::BaseModel optional :include_usage, OpenAI::Internal::Type::Boolean # @!method initialize(include_obfuscation: nil, include_usage: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionStreamOptions} for more details. - # # Options for streaming response. Only set this when you set `stream: true`. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. + # + # @param include_usage [Boolean] + # If set, an additional chunk will be streamed before the `data: [DONE]` message. + # The `usage` field on this chunk shows the token usage statistics for the entire + # request, and the `choices` field will always be an empty array. # - # @param include_usage [Boolean] If set, an additional chunk will be streamed before the `data: [DONE]` + # All other chunks will also include a `usage` field, but with a null value. + # **NOTE:** If the stream is interrupted, you may not receive the final usage + # chunk which contains the total token usage for the request. end end diff --git a/lib/openai/models/chat/chat_completion_system_message_param.rb b/lib/openai/models/chat/chat_completion_system_message_param.rb index 87ddd20b9..330185276 100644 --- a/lib/openai/models/chat/chat_completion_system_message_param.rb +++ b/lib/openai/models/chat/chat_completion_system_message_param.rb @@ -24,18 +24,19 @@ class ChatCompletionSystemMessageParam < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(content:, name: nil, role: :system) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionSystemMessageParam} for more details. - # # Developer-provided instructions that the model should follow, regardless of # messages sent by the user. With o1 models and newer, use `developer` messages # for this purpose instead. # - # @param content [String, Array] The contents of the system message. + # @param content [String, Array] + # The contents of the system message. # - # @param name [String] An optional name for the participant. Provides the model information to differen + # @param name [String] + # An optional name for the participant. Provides the model information to + # differentiate between participants of the same role. # - # @param role [Symbol, :system] The role of the messages author, in this case `system`. + # @param role [Symbol, :system] + # The role of the messages author, in this case `system`. # The contents of the system message. # diff --git a/lib/openai/models/chat/chat_completion_token_logprob.rb b/lib/openai/models/chat/chat_completion_token_logprob.rb index 12d318781..717b915cf 100644 --- a/lib/openai/models/chat/chat_completion_token_logprob.rb +++ b/lib/openai/models/chat/chat_completion_token_logprob.rb @@ -38,17 +38,23 @@ class ChatCompletionTokenLogprob < OpenAI::Internal::Type::BaseModel ) # @!method initialize(token:, bytes:, logprob:, top_logprobs:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionTokenLogprob} for more details. + # @param token [String] + # The token. # - # @param token [String] The token. + # @param bytes [Array, nil] + # 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. # - # @param bytes [Array, nil] A list of integers representing the UTF-8 bytes representation of the token. Use + # @param logprob [Float] + # 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. # - # @param logprob [Float] The log probability of this token, if it is within the top 20 most likely tokens - # - # @param top_logprobs [Array] List of the most likely tokens and their log probability, at this token position - + # @param top_logprobs [Array] + # 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`. class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # The token. @@ -74,14 +80,19 @@ class TopLogprob < OpenAI::Internal::Type::BaseModel required :logprob, Float # @!method initialize(token:, bytes:, logprob:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionTokenLogprob::TopLogprob} for more details. - # - # @param token [String] The token. + # @param token [String] + # The token. # - # @param bytes [Array, nil] A list of integers representing the UTF-8 bytes representation of the token. Use + # @param bytes [Array, nil] + # 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. # - # @param logprob [Float] The log probability of this token, if it is within the top 20 most likely tokens + # @param logprob [Float] + # 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. end end end diff --git a/lib/openai/models/chat/chat_completion_tool_message_param.rb b/lib/openai/models/chat/chat_completion_tool_message_param.rb index 6f85e0a92..63ab9955c 100644 --- a/lib/openai/models/chat/chat_completion_tool_message_param.rb +++ b/lib/openai/models/chat/chat_completion_tool_message_param.rb @@ -23,11 +23,14 @@ class ChatCompletionToolMessageParam < OpenAI::Internal::Type::BaseModel required :tool_call_id, String # @!method initialize(content:, tool_call_id:, role: :tool) - # @param content [String, Array] The contents of the tool message. + # @param content [String, Array] + # The contents of the tool message. # - # @param tool_call_id [String] Tool call that this message is responding to. + # @param tool_call_id [String] + # Tool call that this message is responding to. # - # @param role [Symbol, :tool] The role of the messages author, in this case `tool`. + # @param role [Symbol, :tool] + # The role of the messages author, in this case `tool`. # The contents of the tool message. # diff --git a/lib/openai/models/chat/chat_completion_user_message_param.rb b/lib/openai/models/chat/chat_completion_user_message_param.rb index 7b7a8a98f..7d9b83010 100644 --- a/lib/openai/models/chat/chat_completion_user_message_param.rb +++ b/lib/openai/models/chat/chat_completion_user_message_param.rb @@ -24,17 +24,18 @@ class ChatCompletionUserMessageParam < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(content:, name: nil, role: :user) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::ChatCompletionUserMessageParam} for more details. - # # Messages sent by an end user, containing prompts or additional context # information. # - # @param content [String, Array] The contents of the user message. + # @param content [String, Array] + # The contents of the user message. # - # @param name [String] An optional name for the participant. Provides the model information to differen + # @param name [String] + # An optional name for the participant. Provides the model information to + # differentiate between participants of the same role. # - # @param role [Symbol, :user] The role of the messages author, in this case `user`. + # @param role [Symbol, :user] + # The role of the messages author, in this case `user`. # The contents of the user message. # @@ -45,7 +46,7 @@ module Content # The text contents of the message. variant String - # An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs. + # An array of content parts with a defined type. Supported options differ based on the [model](https://developers.openai.com/api/docs/models) being used to generate the response. Can contain text, image, or audio inputs. variant -> { OpenAI::Models::Chat::ChatCompletionUserMessageParam::Content::ChatCompletionContentPartArray } # @!method self.variants diff --git a/lib/openai/models/chat/completion_create_params.rb b/lib/openai/models/chat/completion_create_params.rb index b0a486cb3..bbc5c47ca 100644 --- a/lib/openai/models/chat/completion_create_params.rb +++ b/lib/openai/models/chat/completion_create_params.rb @@ -12,11 +12,11 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute messages # A list of messages comprising the conversation so far. Depending on the - # [model](https://platform.openai.com/docs/models) you use, different message - # types (modalities) are supported, like - # [text](https://platform.openai.com/docs/guides/text-generation), - # [images](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio). + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). # # @return [Array] required( @@ -28,8 +28,8 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, Symbol, OpenAI::Models::ChatModel] required :model, union: -> { OpenAI::Chat::CompletionCreateParams::Model } @@ -37,7 +37,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute audio # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # # @return [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] optional :audio, -> { OpenAI::Chat::ChatCompletionAudioParam }, nil?: true @@ -108,7 +108,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute max_completion_tokens # An upper bound for the number of tokens that can be generated for a completion, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_completion_tokens, Integer, nil?: true @@ -116,13 +116,13 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute max_tokens # @deprecated # - # The maximum number of [tokens](/tokenizer) that can be generated in the chat - # completion. This value can be used to control + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control # [costs](https://openai.com/api/pricing/) for text generated via API. # # This value is now deprecated in favor of `max_completion_tokens`, and is not # compatible with - # [o-series models](https://platform.openai.com/docs/guides/reasoning). + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_tokens, Integer, nil?: true @@ -145,8 +145,8 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # `["text"]` # # The `gpt-4o-audio-preview` model can also be used to - # [generate audio](https://platform.openai.com/docs/guides/audio). To request that - # this model generate both text and audio responses, you can use: + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: # # `["text", "audio"]` # @@ -173,7 +173,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute parallel_tool_calls # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. # # @return [Boolean, nil] @@ -197,7 +197,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -210,7 +210,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions, nil] @@ -224,7 +224,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -249,7 +249,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -261,7 +261,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -276,7 +276,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -301,13 +301,15 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -329,8 +331,9 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute store # Whether or not to store the output of this chat completion request for use in - # our [model distillation](https://platform.openai.com/docs/guides/distillation) - # or [evals](https://platform.openai.com/docs/guides/evals) products. + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. # # Supports text and image inputs. Note: image inputs over 8MB will be dropped. # @@ -368,8 +371,9 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute tools # A list of tools the model may call. You can provide either - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - # or [function tools](https://platform.openai.com/docs/guides/function-calling). + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional( @@ -410,7 +414,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String @@ -427,94 +431,301 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute web_search_options # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # # @return [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions, nil] optional :web_search_options, -> { OpenAI::Chat::CompletionCreateParams::WebSearchOptions } # @!method initialize(messages:, model:, audio: nil, frequency_penalty: nil, function_call: nil, functions: nil, logit_bias: nil, logprobs: nil, max_completion_tokens: nil, max_tokens: nil, metadata: nil, modalities: nil, moderation: nil, n: nil, parallel_tool_calls: nil, prediction: nil, presence_penalty: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning_effort: nil, response_format: nil, safety_identifier: nil, seed: nil, service_tier: nil, stop: nil, store: nil, stream_options: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, user: nil, verbosity: nil, web_search_options: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams} for more details. + # @param messages [Array] + # A list of messages comprising the conversation so far. Depending on the + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). # - # @param messages [Array] A list of messages comprising the conversation so far. Depending on the + # @param model [String, Symbol, OpenAI::Models::ChatModel] + # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param model [String, Symbol, OpenAI::Models::ChatModel] Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI - # - # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] Parameters for audio output. Required when audio output is requested with - # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on - # - # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] Deprecated in favor of `tool_choice`. - # - # @param functions [Array] Deprecated in favor of `tools`. - # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. - # - # @param logprobs [Boolean, nil] Whether to return log probabilities of the output tokens or not. If true, - # - # @param max_completion_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a completion, - # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param modalities [Array, nil] Output types that you would like the model to generate. - # - # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] Configuration for running moderation on the request input and generated output. - # - # @param n [Integer, nil] How many chat completion choices to generate for each input message. Note that y - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] Static predicted output content, such as the content of a text file that is - # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param seed [Integer, nil] This feature is in Beta. - # - # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. - # - # @param store [Boolean, nil] Whether or not to store the output of this chat completion request for - # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] Controls which (if any) tool is called by the model. - # - # @param tools [Array] A list of tools the model may call. You can provide either - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in - # - # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] This tool searches the web for relevant results to use in a response. + # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] + # Parameters for audio output. Required when audio output is requested with + # `modalities: ["audio"]`. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). + # + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. + # + # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] + # Deprecated in favor of `tool_choice`. + # + # Controls which (if any) function is called by the model. + # + # `none` means the model will not call a function and instead generates a message. + # + # `auto` means the model can pick between generating a message or calling a + # function. + # + # Specifying a particular function via `{"name": "my_function"}` forces the model + # to call that function. + # + # `none` is the default when no functions are present. `auto` is the default if + # functions are present. + # + # @param functions [Array] + # Deprecated in favor of `tools`. + # + # A list of functions the model may generate JSON inputs for. + # + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. + # + # Accepts a JSON object that maps tokens (specified by their token ID in the + # tokenizer) to an associated bias value from -100 to 100. Mathematically, the + # bias is added to the logits generated by the model prior to sampling. The exact + # effect will vary per model, but values between -1 and 1 should decrease or + # increase likelihood of selection; values like -100 or 100 should result in a ban + # or exclusive selection of the relevant token. + # + # @param logprobs [Boolean, nil] + # Whether to return log probabilities of the output tokens or not. If true, + # returns the log probabilities of each output token returned in the `content` of + # `message`. + # + # @param max_completion_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a completion, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control + # [costs](https://openai.com/api/pricing/) for text generated via API. + # + # This value is now deprecated in favor of `max_completion_tokens`, and is not + # compatible with + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param modalities [Array, nil] + # Output types that you would like the model to generate. Most models are capable + # of generating text, which is the default: + # + # `["text"]` + # + # The `gpt-4o-audio-preview` model can also be used to + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: + # + # `["text", "audio"]` + # + # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] + # Configuration for running moderation on the request input and generated output. + # + # @param n [Integer, nil] + # How many chat completion choices to generate for each input message. Note that + # you will be charged based on the number of generated tokens across all of the + # choices. Keep `n` as `1` to minimize costs. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] + # Static predicted output content, such as the content of a text file that is + # being regenerated. + # + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param seed [Integer, nil] + # This feature is in Beta. If specified, our system will make a best effort to + # sample deterministically, such that repeated requests with the same `seed` and + # parameters should return the same result. Determinism is not guaranteed, and you + # should refer to the `system_fingerprint` response parameter to monitor changes + # in the backend. + # + # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. + # + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. + # + # @param store [Boolean, nil] + # Whether or not to store the output of this chat completion request for use in + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. + # + # Supports text and image inputs. Note: image inputs over 8MB will be dropped. + # + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tool and instead generates a message. `auto` means the model can + # pick between generating a message or calling one or more tools. `required` means + # the model must call one or more tools. Specifying a particular tool via + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # `none` is the default when no tools are present. `auto` is the default if tools + # are present. + # + # @param tools [Array] + # A list of tools the model may call. You can provide either + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # `logprobs` must be set to `true` if this parameter is used. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. + # + # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] + # This tool searches the web for relevant results to use in a response. Learn more + # about the + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -522,7 +733,7 @@ module Model # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance - # characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) + # characteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models) # to browse and compare available models. variant enum: -> { OpenAI::ChatModel } @@ -590,8 +801,8 @@ class Function < OpenAI::Internal::Type::BaseModel # @!attribute parameters # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -601,14 +812,22 @@ class Function < OpenAI::Internal::Type::BaseModel optional :parameters, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown] # @!method initialize(name:, description: nil, parameters: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::Function} for more details. + # @param name [String] + # The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + # underscores and dashes, with a maximum length of 64. # - # @param name [String] The name of the function to be called. Must be a-z, A-Z, 0-9, or contain undersc + # @param description [String] + # A description of what the function does, used by the model to choose when and + # how to call the function. # - # @param description [String] A description of what the function does, used by the model to choose when and ho + # @param parameters [Hash{Symbol=>Object}] + # The parameters the functions accepts, described as a JSON Schema object. See the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the + # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + # documentation about the format. # - # @param parameters [Hash{Symbol=>Object}] The parameters the functions accepts, described as a JSON Schema object. See the + # Omitting `parameters` defines a function with an empty parameter list. end module Modality @@ -636,14 +855,14 @@ class Moderation < OpenAI::Internal::Type::BaseModel optional :policy, -> { OpenAI::Chat::CompletionCreateParams::Moderation::Policy }, nil?: true # @!method initialize(model:, policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::Moderation} for more details. - # # Configuration for running moderation on the request input and generated output. # - # @param model [String] The moderation model to use for moderated completions, e.g. 'omni-moderation-lat + # @param model [String] + # The moderation model to use for moderated completions, e.g. + # 'omni-moderation-latest'. # - # @param policy [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy, nil] The policy to apply to moderated response input and output. + # @param policy [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy, nil] + # The policy to apply to moderated response input and output. # @see OpenAI::Models::Chat::CompletionCreateParams::Moderation#policy class Policy < OpenAI::Internal::Type::BaseModel @@ -674,9 +893,11 @@ class Policy < OpenAI::Internal::Type::BaseModel # @!method initialize(input: nil, output: nil) # The policy to apply to moderated response input and output. # - # @param input [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy::Input, nil] The moderation policy for the response input. + # @param input [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy::Input, nil] + # The moderation policy for the response input. # - # @param output [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy::Output, nil] The moderation policy for the response output. + # @param output [OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy::Output, nil] + # The moderation policy for the response output. # @see OpenAI::Models::Chat::CompletionCreateParams::Moderation::Policy#input class Input < OpenAI::Internal::Type::BaseModel @@ -749,10 +970,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel optional :ttl, enum: -> { OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::Ttl } # @!method initialize(mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions} for more - # details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -760,12 +977,21 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param mode [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -807,7 +1033,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -834,7 +1060,7 @@ module PromptCacheRetention # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -848,7 +1074,7 @@ module ResponseFormat variant :text, -> { OpenAI::ResponseFormatText } # JSON Schema response format. Used to generate structured JSON responses. - # Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). variant :json_schema, -> { OpenAI::ResponseFormatJSONSchema } # An {OpenAI::BaseModel} can be provided and implicitly converted into {OpenAI::Models::ResponseFormatJSONSchema}. @@ -874,13 +1100,15 @@ module ResponseFormat # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -956,17 +1184,16 @@ class WebSearchOptions < OpenAI::Internal::Type::BaseModel ) # @!method initialize(search_context_size: nil, user_location: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions} for more - # details. - # # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param search_context_size [Symbol, OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize] High level guidance for the amount of context window space to use for the + # @param search_context_size [Symbol, OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize] + # High level guidance for the amount of context window space to use for the + # search. One of `low`, `medium`, or `high`. `medium` is the default. # - # @param user_location [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation, nil] Approximate location parameters for the search. + # @param user_location [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation, nil] + # Approximate location parameters for the search. # High level guidance for the amount of context window space to use for the # search. One of `low`, `medium`, or `high`. `medium` is the default. @@ -1001,15 +1228,13 @@ class UserLocation < OpenAI::Internal::Type::BaseModel required :type, const: :approximate # @!method initialize(approximate:, type: :approximate) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation} - # for more details. - # # Approximate location parameters for the search. # - # @param approximate [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate] Approximate location parameters for the search. + # @param approximate [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate] + # Approximate location parameters for the search. # - # @param type [Symbol, :approximate] The type of location approximation. Always `approximate`. + # @param type [Symbol, :approximate] + # The type of location approximation. Always `approximate`. # @see OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation#approximate class Approximate < OpenAI::Internal::Type::BaseModel @@ -1040,19 +1265,21 @@ class Approximate < OpenAI::Internal::Type::BaseModel optional :timezone, String # @!method initialize(city: nil, country: nil, region: nil, timezone: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate} - # for more details. - # # Approximate location parameters for the search. # - # @param city [String] Free text input for the city of the user, e.g. `San Francisco`. + # @param city [String] + # Free text input for the city of the user, e.g. `San Francisco`. # - # @param country [String] The two-letter + # @param country [String] + # The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of + # the user, e.g. `US`. # - # @param region [String] Free text input for the region of the user, e.g. `California`. + # @param region [String] + # Free text input for the region of the user, e.g. `California`. # - # @param timezone [String] The [IANA timezone](https://timeapi.io/documentation/iana-timezones) + # @param timezone [String] + # The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the + # user, e.g. `America/Los_Angeles`. end end end diff --git a/lib/openai/models/chat/completion_list_params.rb b/lib/openai/models/chat/completion_list_params.rb index 0e18202c9..8ee4e96c3 100644 --- a/lib/openai/models/chat/completion_list_params.rb +++ b/lib/openai/models/chat/completion_list_params.rb @@ -42,18 +42,23 @@ class CompletionListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Chat::CompletionListParams::Order } # @!method initialize(after: nil, limit: nil, metadata: nil, model: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionListParams} for more details. + # @param after [String] + # Identifier for the last chat completion from the previous pagination request. # - # @param after [String] Identifier for the last chat completion from the previous pagination request. + # @param limit [Integer] + # Number of Chat Completions to retrieve. # - # @param limit [Integer] Number of Chat Completions to retrieve. + # @param metadata [Hash{Symbol=>String}, nil] + # A list of metadata keys to filter the Chat Completions by. Example: # - # @param metadata [Hash{Symbol=>String}, nil] A list of metadata keys to filter the Chat Completions by. Example: + # `metadata[key1]=value1&metadata[key2]=value2` # - # @param model [String] The model used to generate the Chat Completions. + # @param model [String] + # The model used to generate the Chat Completions. # - # @param order [Symbol, OpenAI::Models::Chat::CompletionListParams::Order] Sort order for Chat Completions by timestamp. Use `asc` for ascending order or ` + # @param order [Symbol, OpenAI::Models::Chat::CompletionListParams::Order] + # Sort order for Chat Completions by timestamp. Use `asc` for ascending order or + # `desc` for descending order. Defaults to `asc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/chat/completion_update_params.rb b/lib/openai/models/chat/completion_update_params.rb index e1f768adf..8a5b4d3aa 100644 --- a/lib/openai/models/chat/completion_update_params.rb +++ b/lib/openai/models/chat/completion_update_params.rb @@ -25,12 +25,15 @@ class CompletionUpdateParams < OpenAI::Internal::Type::BaseModel required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(completion_id:, metadata:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionUpdateParams} for more details. - # # @param completion_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/chat/completions/message_list_params.rb b/lib/openai/models/chat/completions/message_list_params.rb index e80f7eeab..084669725 100644 --- a/lib/openai/models/chat/completions/message_list_params.rb +++ b/lib/openai/models/chat/completions/message_list_params.rb @@ -34,16 +34,17 @@ class MessageListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Chat::Completions::MessageListParams::Order } # @!method initialize(completion_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::Completions::MessageListParams} for more details. - # # @param completion_id [String] # - # @param after [String] Identifier for the last message from the previous pagination request. + # @param after [String] + # Identifier for the last message from the previous pagination request. # - # @param limit [Integer] Number of messages to retrieve. + # @param limit [Integer] + # Number of messages to retrieve. # - # @param order [Symbol, OpenAI::Models::Chat::Completions::MessageListParams::Order] Sort order for messages by timestamp. Use `asc` for ascending order or `desc` fo + # @param order [Symbol, OpenAI::Models::Chat::Completions::MessageListParams::Order] + # Sort order for messages by timestamp. Use `asc` for ascending order or `desc` + # for descending order. Defaults to `asc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/comparison_filter.rb b/lib/openai/models/comparison_filter.rb index 3dd0edbbc..c50c0ad92 100644 --- a/lib/openai/models/comparison_filter.rb +++ b/lib/openai/models/comparison_filter.rb @@ -33,17 +33,28 @@ class ComparisonFilter < OpenAI::Internal::Type::BaseModel required :value, union: -> { OpenAI::ComparisonFilter::Value } # @!method initialize(key:, type:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ComparisonFilter} for more details. - # # A filter used to compare a specified attribute key to a given value using a # defined comparison operation. # - # @param key [String] The key to compare against the value. + # @param key [String] + # The key to compare against the value. + # + # @param type [Symbol, OpenAI::Models::ComparisonFilter::Type] + # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, + # `nin`. # - # @param type [Symbol, OpenAI::Models::ComparisonFilter::Type] Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, ` + # - `eq`: equals + # - `ne`: not equal + # - `gt`: greater than + # - `gte`: greater than or equal + # - `lt`: less than + # - `lte`: less than or equal + # - `in`: in + # - `nin`: not in # - # @param value [String, Float, Boolean, Array] The value to compare against the attribute key; supports string, number, or bool + # @param value [String, Float, Boolean, Array] + # The value to compare against the attribute key; supports string, number, or + # boolean types. # Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, # `nin`. diff --git a/lib/openai/models/completion.rb b/lib/openai/models/completion.rb index e6a702d03..684e84772 100644 --- a/lib/openai/models/completion.rb +++ b/lib/openai/models/completion.rb @@ -52,25 +52,32 @@ class Completion < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::CompletionUsage } # @!method initialize(id:, choices:, created:, model:, system_fingerprint: nil, usage: nil, object: :text_completion) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Completion} for more details. - # # Represents a completion response from the API. Note: both the streamed and # non-streamed response objects share the same shape (unlike the chat endpoint). # - # @param id [String] A unique identifier for the completion. + # @param id [String] + # A unique identifier for the completion. + # + # @param choices [Array] + # The list of completion choices the model generated for the input prompt. # - # @param choices [Array] The list of completion choices the model generated for the input prompt. + # @param created [Integer] + # The Unix timestamp (in seconds) of when the completion was created. # - # @param created [Integer] The Unix timestamp (in seconds) of when the completion was created. + # @param model [String] + # The model used for completion. # - # @param model [String] The model used for completion. + # @param system_fingerprint [String] + # This fingerprint represents the backend configuration that the model runs with. # - # @param system_fingerprint [String] This fingerprint represents the backend configuration that the model runs with. + # Can be used in conjunction with the `seed` request parameter to understand when + # backend changes have been made that might impact determinism. # - # @param usage [OpenAI::Models::CompletionUsage] Usage statistics for the completion request. + # @param usage [OpenAI::Models::CompletionUsage] + # Usage statistics for the completion request. # - # @param object [Symbol, :text_completion] The object type, which is always "text_completion" + # @param object [Symbol, :text_completion] + # The object type, which is always "text_completion" end end end diff --git a/lib/openai/models/completion_choice.rb b/lib/openai/models/completion_choice.rb index 07f6b428a..758e46fd7 100644 --- a/lib/openai/models/completion_choice.rb +++ b/lib/openai/models/completion_choice.rb @@ -28,10 +28,11 @@ class CompletionChoice < OpenAI::Internal::Type::BaseModel required :text, String # @!method initialize(finish_reason:, index:, logprobs:, text:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompletionChoice} for more details. - # - # @param finish_reason [Symbol, OpenAI::Models::CompletionChoice::FinishReason] The reason the model stopped generating tokens. This will be `stop` if the model + # @param finish_reason [Symbol, OpenAI::Models::CompletionChoice::FinishReason] + # The reason the model stopped generating tokens. This will be `stop` if the model + # hit a natural stop point or a provided stop sequence, `length` if the maximum + # number of tokens specified in the request was reached, or `content_filter` if + # content was omitted due to a flag from our content filters. # # @param index [Integer] # diff --git a/lib/openai/models/completion_create_params.rb b/lib/openai/models/completion_create_params.rb index 4da42de4d..454774a97 100644 --- a/lib/openai/models/completion_create_params.rb +++ b/lib/openai/models/completion_create_params.rb @@ -11,10 +11,10 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # # @return [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] required :model, union: -> { OpenAI::CompletionCreateParams::Model } @@ -55,7 +55,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # existing frequency in the text so far, decreasing the model's likelihood to # repeat the same line verbatim. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) # # @return [Float, nil] optional :frequency_penalty, Float, nil?: true @@ -65,11 +65,12 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # # Accepts a JSON object that maps tokens (specified by their token ID in the GPT # tokenizer) to an associated bias value from -100 to 100. You can use this - # [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - # Mathematically, the bias is added to the logits generated by the model prior to - # sampling. The exact effect will vary per model, but values between -1 and 1 - # should decrease or increase likelihood of selection; values like -100 or 100 - # should result in a ban or exclusive selection of the relevant token. + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token # from being generated. @@ -89,8 +90,8 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel optional :logprobs, Integer, nil?: true # @!attribute max_tokens - # The maximum number of [tokens](/tokenizer) that can be generated in the - # completion. + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # # The token count of your prompt plus `max_tokens` cannot exceed the model's # context length. @@ -115,7 +116,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # whether they appear in the text so far, increasing the model's likelihood to # talk about new topics. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) # # @return [Float, nil] optional :presence_penalty, Float, nil?: true @@ -177,56 +178,142 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(model:, prompt:, best_of: nil, echo: nil, frequency_penalty: nil, logit_bias: nil, logprobs: nil, max_tokens: nil, n: nil, presence_penalty: nil, seed: nil, stop: nil, stream_options: nil, suffix: nil, temperature: nil, top_p: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompletionCreateParams} for more details. + # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # - # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param prompt [String, Array, Array, Array>, nil] + # The prompt(s) to generate completions for, encoded as a string, array of + # strings, array of tokens, or array of token arrays. # - # @param prompt [String, Array, Array, Array>, nil] The prompt(s) to generate completions for, encoded as a string, array of strings + # Note that <|endoftext|> is the document separator that the model sees during + # training, so if a prompt is not specified the model will generate as if from the + # beginning of a new document. # - # @param best_of [Integer, nil] Generates `best_of` completions server-side and returns the "best" (the one with + # @param best_of [Integer, nil] + # Generates `best_of` completions server-side and returns the "best" (the one with + # the highest log probability per token). Results cannot be streamed. # - # @param echo [Boolean, nil] Echo back the prompt in addition to the completion + # When used with `n`, `best_of` controls the number of candidate completions and + # `n` specifies how many to return – `best_of` must be greater than `n`. # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. + # @param echo [Boolean, nil] + # Echo back the prompt in addition to the completion # - # @param logprobs [Integer, nil] Include the log probabilities on the `logprobs` most likely output tokens, as we + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the completi + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) # - # @param n [Integer, nil] How many completions to generate for each prompt. + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on whethe + # Accepts a JSON object that maps tokens (specified by their token ID in the GPT + # tokenizer) to an associated bias value from -100 to 100. You can use this + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # - # @param seed [Integer, nil] If specified, our system will make a best effort to sample deterministically, su + # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token + # from being generated. # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. + # @param logprobs [Integer, nil] + # Include the log probabilities on the `logprobs` most likely output tokens, as + # well the chosen tokens. For example, if `logprobs` is 5, the API will return a + # list of the 5 most likely tokens. The API will always return the `logprob` of + # the sampled token, so there may be up to `logprobs+1` elements in the response. # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. + # The maximum value for `logprobs` is 5. # - # @param suffix [String, nil] The suffix that comes after a completion of inserted text. + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m + # The token count of your prompt plus `max_tokens` cannot exceed the model's + # context length. + # [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + # for counting tokens. # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # @param n [Integer, nil] + # How many completions to generate for each prompt. # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. + # + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. + # + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) + # + # @param seed [Integer, nil] + # If specified, our system will make a best effort to sample deterministically, + # such that repeated requests with the same `seed` and parameters should return + # the same result. + # + # Determinism is not guaranteed, and you should refer to the `system_fingerprint` + # response parameter to monitor changes in the backend. + # + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. + # + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. + # + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. + # + # @param suffix [String, nil] + # The suffix that comes after a completion of inserted text. + # + # This parameter is only supported for `gpt-3.5-turbo-instruct`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # We generally recommend altering this or `top_p` but not both. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union diff --git a/lib/openai/models/completion_usage.rb b/lib/openai/models/completion_usage.rb index 17f9a6148..60476f5e4 100644 --- a/lib/openai/models/completion_usage.rb +++ b/lib/openai/models/completion_usage.rb @@ -36,15 +36,20 @@ class CompletionUsage < OpenAI::Internal::Type::BaseModel # @!method initialize(completion_tokens:, prompt_tokens:, total_tokens:, completion_tokens_details: nil, prompt_tokens_details: nil) # Usage statistics for the completion request. # - # @param completion_tokens [Integer] Number of tokens in the generated completion. + # @param completion_tokens [Integer] + # Number of tokens in the generated completion. # - # @param prompt_tokens [Integer] Number of tokens in the prompt. + # @param prompt_tokens [Integer] + # Number of tokens in the prompt. # - # @param total_tokens [Integer] Total number of tokens used in the request (prompt + completion). + # @param total_tokens [Integer] + # Total number of tokens used in the request (prompt + completion). # - # @param completion_tokens_details [OpenAI::Models::CompletionUsage::CompletionTokensDetails] Breakdown of tokens used in a completion. + # @param completion_tokens_details [OpenAI::Models::CompletionUsage::CompletionTokensDetails] + # Breakdown of tokens used in a completion. # - # @param prompt_tokens_details [OpenAI::Models::CompletionUsage::PromptTokensDetails] Breakdown of tokens used in the prompt. + # @param prompt_tokens_details [OpenAI::Models::CompletionUsage::PromptTokensDetails] + # Breakdown of tokens used in the prompt. # @see OpenAI::Models::CompletionUsage#completion_tokens_details class CompletionTokensDetails < OpenAI::Internal::Type::BaseModel @@ -83,20 +88,26 @@ class CompletionTokensDetails < OpenAI::Internal::Type::BaseModel optional :text_tokens, Integer # @!method initialize(accepted_prediction_tokens: nil, audio_tokens: nil, reasoning_tokens: nil, rejected_prediction_tokens: nil, text_tokens: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompletionUsage::CompletionTokensDetails} for more details. - # # Breakdown of tokens used in a completion. # - # @param accepted_prediction_tokens [Integer] When using Predicted Outputs, the number of tokens in the + # @param accepted_prediction_tokens [Integer] + # When using Predicted Outputs, the number of tokens in the prediction that + # appeared in the completion. # - # @param audio_tokens [Integer] Audio input tokens generated by the model. + # @param audio_tokens [Integer] + # Audio input tokens generated by the model. # - # @param reasoning_tokens [Integer] Tokens generated by the model for reasoning. + # @param reasoning_tokens [Integer] + # Tokens generated by the model for reasoning. # - # @param rejected_prediction_tokens [Integer] When using Predicted Outputs, the number of tokens in the + # @param rejected_prediction_tokens [Integer] + # When using Predicted Outputs, the number of tokens in the prediction that did + # not appear in the completion. However, like reasoning tokens, these tokens are + # still counted in the total completion tokens for purposes of billing, output, + # and context window limits. # - # @param text_tokens [Integer] Text output tokens generated by the model. + # @param text_tokens [Integer] + # Text output tokens generated by the model. end # @see OpenAI::Models::CompletionUsage#prompt_tokens_details @@ -134,15 +145,20 @@ class PromptTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, cache_write_tokens: nil, cached_tokens: nil, image_tokens: nil, text_tokens: nil) # Breakdown of tokens used in the prompt. # - # @param audio_tokens [Integer] Audio input tokens present in the prompt. + # @param audio_tokens [Integer] + # Audio input tokens present in the prompt. # - # @param cache_write_tokens [Integer] The unadjusted number of prompt tokens written to cache. + # @param cache_write_tokens [Integer] + # The unadjusted number of prompt tokens written to cache. # - # @param cached_tokens [Integer] Cached tokens present in the prompt. + # @param cached_tokens [Integer] + # Cached tokens present in the prompt. # - # @param image_tokens [Integer] Image input tokens present in the prompt. + # @param image_tokens [Integer] + # Image input tokens present in the prompt. # - # @param text_tokens [Integer] Text input tokens present in the prompt. + # @param text_tokens [Integer] + # Text input tokens present in the prompt. end end end diff --git a/lib/openai/models/compound_filter.rb b/lib/openai/models/compound_filter.rb index e4e7fdcf0..a1d20c4e2 100644 --- a/lib/openai/models/compound_filter.rb +++ b/lib/openai/models/compound_filter.rb @@ -17,14 +17,14 @@ class CompoundFilter < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::CompoundFilter::Type } # @!method initialize(filters:, type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompoundFilter} for more details. - # # Combine multiple filters using `and` or `or`. # - # @param filters [Array] Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter` + # @param filters [Array] + # Array of filters to combine. Items can be `ComparisonFilter` or + # `CompoundFilter`. # - # @param type [Symbol, OpenAI::Models::CompoundFilter::Type] Type of operation: `and` or `or`. + # @param type [Symbol, OpenAI::Models::CompoundFilter::Type] + # Type of operation: `and` or `or`. # A filter used to compare a specified attribute key to a given value using a # defined comparison operation. diff --git a/lib/openai/models/container_create_params.rb b/lib/openai/models/container_create_params.rb index 5e2938efb..314649dcd 100644 --- a/lib/openai/models/container_create_params.rb +++ b/lib/openai/models/container_create_params.rb @@ -44,17 +44,23 @@ class ContainerCreateParams < OpenAI::Internal::Type::BaseModel optional :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::ContainerCreateParams::Skill] } # @!method initialize(name:, expires_after: nil, file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, request_options: {}) - # @param name [String] Name of the container to create. + # @param name [String] + # Name of the container to create. # - # @param expires_after [OpenAI::Models::ContainerCreateParams::ExpiresAfter] Container expiration time in seconds relative to the 'anchor' time. + # @param expires_after [OpenAI::Models::ContainerCreateParams::ExpiresAfter] + # Container expiration time in seconds relative to the 'anchor' time. # - # @param file_ids [Array] IDs of files to copy to the container. + # @param file_ids [Array] + # IDs of files to copy to the container. # - # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] Optional memory limit for the container. Defaults to "1g". + # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] + # Optional memory limit for the container. Defaults to "1g". # - # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param skills [Array] An optional list of skills referenced by id or inline data. + # @param skills [Array] + # An optional list of skills referenced by id or inline data. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -72,12 +78,11 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :minutes, Integer # @!method initialize(anchor:, minutes:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerCreateParams::ExpiresAfter} for more details. - # # Container expiration time in seconds relative to the 'anchor' time. # - # @param anchor [Symbol, OpenAI::Models::ContainerCreateParams::ExpiresAfter::Anchor] Time anchor for the expiration time. Currently only 'last_active_at' is supporte + # @param anchor [Symbol, OpenAI::Models::ContainerCreateParams::ExpiresAfter::Anchor] + # Time anchor for the expiration time. Currently only 'last_active_at' is + # supported. # # @param minutes [Integer] diff --git a/lib/openai/models/container_create_response.rb b/lib/openai/models/container_create_response.rb index 88b150082..d36ecad64 100644 --- a/lib/openai/models/container_create_response.rb +++ b/lib/openai/models/container_create_response.rb @@ -61,26 +61,34 @@ class ContainerCreateResponse < OpenAI::Internal::Type::BaseModel optional :network_policy, -> { OpenAI::Models::ContainerCreateResponse::NetworkPolicy } # @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerCreateResponse} for more details. + # @param id [String] + # Unique identifier for the container. # - # @param id [String] Unique identifier for the container. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the container was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the container was created. + # @param name [String] + # Name of the container. # - # @param name [String] Name of the container. + # @param object [String] + # The type of this object. # - # @param object [String] The type of this object. + # @param status [String] + # Status of the container (e.g., active, deleted). # - # @param status [String] Status of the container (e.g., active, deleted). + # @param expires_after [OpenAI::Models::ContainerCreateResponse::ExpiresAfter] + # The container will expire after this time period. The anchor is the reference + # point for the expiration. The minutes is the number of minutes after the anchor + # before the container expires. # - # @param expires_after [OpenAI::Models::ContainerCreateResponse::ExpiresAfter] The container will expire after this time period. + # @param last_active_at [Integer] + # Unix timestamp (in seconds) when the container was last active. # - # @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active. + # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateResponse::MemoryLimit] + # The memory limit configured for the container. # - # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateResponse::MemoryLimit] The memory limit configured for the container. - # - # @param network_policy [OpenAI::Models::ContainerCreateResponse::NetworkPolicy] Network access policy for the container. + # @param network_policy [OpenAI::Models::ContainerCreateResponse::NetworkPolicy] + # Network access policy for the container. # @see OpenAI::Models::ContainerCreateResponse#expires_after class ExpiresAfter < OpenAI::Internal::Type::BaseModel @@ -101,9 +109,11 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel # point for the expiration. The minutes is the number of minutes after the anchor # before the container expires. # - # @param anchor [Symbol, OpenAI::Models::ContainerCreateResponse::ExpiresAfter::Anchor] The reference point for the expiration. + # @param anchor [Symbol, OpenAI::Models::ContainerCreateResponse::ExpiresAfter::Anchor] + # The reference point for the expiration. # - # @param minutes [Integer] The number of minutes after the anchor before the container expires. + # @param minutes [Integer] + # The number of minutes after the anchor before the container expires. # The reference point for the expiration. # @@ -150,9 +160,11 @@ class NetworkPolicy < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, allowed_domains: nil) # Network access policy for the container. # - # @param type [Symbol, OpenAI::Models::ContainerCreateResponse::NetworkPolicy::Type] The network policy mode. + # @param type [Symbol, OpenAI::Models::ContainerCreateResponse::NetworkPolicy::Type] + # The network policy mode. # - # @param allowed_domains [Array] Allowed outbound domains when `type` is `allowlist`. + # @param allowed_domains [Array] + # Allowed outbound domains when `type` is `allowlist`. # The network policy mode. # diff --git a/lib/openai/models/container_list_params.rb b/lib/openai/models/container_list_params.rb index 29bdff096..18c54d111 100644 --- a/lib/openai/models/container_list_params.rb +++ b/lib/openai/models/container_list_params.rb @@ -37,16 +37,22 @@ class ContainerListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::ContainerListParams::Order } # @!method initialize(after: nil, limit: nil, name: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param name [String] + # Filter results by container name. # - # @param name [String] Filter results by container name. - # - # @param order [Symbol, OpenAI::Models::ContainerListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::ContainerListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/container_list_response.rb b/lib/openai/models/container_list_response.rb index a4d647247..43309491f 100644 --- a/lib/openai/models/container_list_response.rb +++ b/lib/openai/models/container_list_response.rb @@ -61,26 +61,34 @@ class ContainerListResponse < OpenAI::Internal::Type::BaseModel optional :network_policy, -> { OpenAI::Models::ContainerListResponse::NetworkPolicy } # @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerListResponse} for more details. + # @param id [String] + # Unique identifier for the container. # - # @param id [String] Unique identifier for the container. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the container was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the container was created. + # @param name [String] + # Name of the container. # - # @param name [String] Name of the container. + # @param object [String] + # The type of this object. # - # @param object [String] The type of this object. + # @param status [String] + # Status of the container (e.g., active, deleted). # - # @param status [String] Status of the container (e.g., active, deleted). + # @param expires_after [OpenAI::Models::ContainerListResponse::ExpiresAfter] + # The container will expire after this time period. The anchor is the reference + # point for the expiration. The minutes is the number of minutes after the anchor + # before the container expires. # - # @param expires_after [OpenAI::Models::ContainerListResponse::ExpiresAfter] The container will expire after this time period. + # @param last_active_at [Integer] + # Unix timestamp (in seconds) when the container was last active. # - # @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active. + # @param memory_limit [Symbol, OpenAI::Models::ContainerListResponse::MemoryLimit] + # The memory limit configured for the container. # - # @param memory_limit [Symbol, OpenAI::Models::ContainerListResponse::MemoryLimit] The memory limit configured for the container. - # - # @param network_policy [OpenAI::Models::ContainerListResponse::NetworkPolicy] Network access policy for the container. + # @param network_policy [OpenAI::Models::ContainerListResponse::NetworkPolicy] + # Network access policy for the container. # @see OpenAI::Models::ContainerListResponse#expires_after class ExpiresAfter < OpenAI::Internal::Type::BaseModel @@ -101,9 +109,11 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel # point for the expiration. The minutes is the number of minutes after the anchor # before the container expires. # - # @param anchor [Symbol, OpenAI::Models::ContainerListResponse::ExpiresAfter::Anchor] The reference point for the expiration. + # @param anchor [Symbol, OpenAI::Models::ContainerListResponse::ExpiresAfter::Anchor] + # The reference point for the expiration. # - # @param minutes [Integer] The number of minutes after the anchor before the container expires. + # @param minutes [Integer] + # The number of minutes after the anchor before the container expires. # The reference point for the expiration. # @@ -150,9 +160,11 @@ class NetworkPolicy < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, allowed_domains: nil) # Network access policy for the container. # - # @param type [Symbol, OpenAI::Models::ContainerListResponse::NetworkPolicy::Type] The network policy mode. + # @param type [Symbol, OpenAI::Models::ContainerListResponse::NetworkPolicy::Type] + # The network policy mode. # - # @param allowed_domains [Array] Allowed outbound domains when `type` is `allowlist`. + # @param allowed_domains [Array] + # Allowed outbound domains when `type` is `allowlist`. # The network policy mode. # diff --git a/lib/openai/models/container_retrieve_response.rb b/lib/openai/models/container_retrieve_response.rb index d6025c5a4..673e3ddc5 100644 --- a/lib/openai/models/container_retrieve_response.rb +++ b/lib/openai/models/container_retrieve_response.rb @@ -61,26 +61,34 @@ class ContainerRetrieveResponse < OpenAI::Internal::Type::BaseModel optional :network_policy, -> { OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy } # @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerRetrieveResponse} for more details. + # @param id [String] + # Unique identifier for the container. # - # @param id [String] Unique identifier for the container. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the container was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the container was created. + # @param name [String] + # Name of the container. # - # @param name [String] Name of the container. + # @param object [String] + # The type of this object. # - # @param object [String] The type of this object. + # @param status [String] + # Status of the container (e.g., active, deleted). # - # @param status [String] Status of the container (e.g., active, deleted). + # @param expires_after [OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter] + # The container will expire after this time period. The anchor is the reference + # point for the expiration. The minutes is the number of minutes after the anchor + # before the container expires. # - # @param expires_after [OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter] The container will expire after this time period. + # @param last_active_at [Integer] + # Unix timestamp (in seconds) when the container was last active. # - # @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active. + # @param memory_limit [Symbol, OpenAI::Models::ContainerRetrieveResponse::MemoryLimit] + # The memory limit configured for the container. # - # @param memory_limit [Symbol, OpenAI::Models::ContainerRetrieveResponse::MemoryLimit] The memory limit configured for the container. - # - # @param network_policy [OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy] Network access policy for the container. + # @param network_policy [OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy] + # Network access policy for the container. # @see OpenAI::Models::ContainerRetrieveResponse#expires_after class ExpiresAfter < OpenAI::Internal::Type::BaseModel @@ -101,9 +109,11 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel # point for the expiration. The minutes is the number of minutes after the anchor # before the container expires. # - # @param anchor [Symbol, OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter::Anchor] The reference point for the expiration. + # @param anchor [Symbol, OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter::Anchor] + # The reference point for the expiration. # - # @param minutes [Integer] The number of minutes after the anchor before the container expires. + # @param minutes [Integer] + # The number of minutes after the anchor before the container expires. # The reference point for the expiration. # @@ -150,9 +160,11 @@ class NetworkPolicy < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, allowed_domains: nil) # Network access policy for the container. # - # @param type [Symbol, OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy::Type] The network policy mode. + # @param type [Symbol, OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy::Type] + # The network policy mode. # - # @param allowed_domains [Array] Allowed outbound domains when `type` is `allowlist`. + # @param allowed_domains [Array] + # Allowed outbound domains when `type` is `allowlist`. # The network policy mode. # diff --git a/lib/openai/models/containers/file_create_params.rb b/lib/openai/models/containers/file_create_params.rb index a4cf28d39..e8a7e5685 100644 --- a/lib/openai/models/containers/file_create_params.rb +++ b/lib/openai/models/containers/file_create_params.rb @@ -30,14 +30,17 @@ class FileCreateParams < OpenAI::Internal::Type::BaseModel optional :file_id, String # @!method initialize(container_id:, file: nil, file_id: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Containers::FileCreateParams} for more details. - # # @param container_id [String] # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The File object (not file name) to be uploaded. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param file_id [String] Name of the file to create. + # @param file_id [String] + # Name of the file to create. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/containers/file_create_response.rb b/lib/openai/models/containers/file_create_response.rb index 408ac8c75..4be834e72 100644 --- a/lib/openai/models/containers/file_create_response.rb +++ b/lib/openai/models/containers/file_create_response.rb @@ -48,19 +48,26 @@ class FileCreateResponse < OpenAI::Internal::Type::BaseModel required :source, String # @!method initialize(id:, bytes:, container_id:, created_at:, path:, source:, object: :"container.file") - # @param id [String] Unique identifier for the file. + # @param id [String] + # Unique identifier for the file. # - # @param bytes [Integer] Size of the file in bytes. + # @param bytes [Integer] + # Size of the file in bytes. # - # @param container_id [String] The container this file belongs to. + # @param container_id [String] + # The container this file belongs to. # - # @param created_at [Integer] Unix timestamp (in seconds) when the file was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the file was created. # - # @param path [String] Path of the file in the container. + # @param path [String] + # Path of the file in the container. # - # @param source [String] Source of the file (e.g., `user`, `assistant`). + # @param source [String] + # Source of the file (e.g., `user`, `assistant`). # - # @param object [Symbol, :"container.file"] The type of this object (`container.file`). + # @param object [Symbol, :"container.file"] + # The type of this object (`container.file`). end end end diff --git a/lib/openai/models/containers/file_list_params.rb b/lib/openai/models/containers/file_list_params.rb index 7d81d5256..3efee3cd0 100644 --- a/lib/openai/models/containers/file_list_params.rb +++ b/lib/openai/models/containers/file_list_params.rb @@ -37,16 +37,21 @@ class FileListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Containers::FileListParams::Order } # @!method initialize(container_id:, after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Containers::FileListParams} for more details. - # # @param container_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Containers::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Containers::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/containers/file_list_response.rb b/lib/openai/models/containers/file_list_response.rb index 55433ce54..289f6c915 100644 --- a/lib/openai/models/containers/file_list_response.rb +++ b/lib/openai/models/containers/file_list_response.rb @@ -48,19 +48,26 @@ class FileListResponse < OpenAI::Internal::Type::BaseModel required :source, String # @!method initialize(id:, bytes:, container_id:, created_at:, path:, source:, object: :"container.file") - # @param id [String] Unique identifier for the file. + # @param id [String] + # Unique identifier for the file. # - # @param bytes [Integer] Size of the file in bytes. + # @param bytes [Integer] + # Size of the file in bytes. # - # @param container_id [String] The container this file belongs to. + # @param container_id [String] + # The container this file belongs to. # - # @param created_at [Integer] Unix timestamp (in seconds) when the file was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the file was created. # - # @param path [String] Path of the file in the container. + # @param path [String] + # Path of the file in the container. # - # @param source [String] Source of the file (e.g., `user`, `assistant`). + # @param source [String] + # Source of the file (e.g., `user`, `assistant`). # - # @param object [Symbol, :"container.file"] The type of this object (`container.file`). + # @param object [Symbol, :"container.file"] + # The type of this object (`container.file`). end end end diff --git a/lib/openai/models/containers/file_retrieve_response.rb b/lib/openai/models/containers/file_retrieve_response.rb index 4c905b59c..b2488bdee 100644 --- a/lib/openai/models/containers/file_retrieve_response.rb +++ b/lib/openai/models/containers/file_retrieve_response.rb @@ -48,19 +48,26 @@ class FileRetrieveResponse < OpenAI::Internal::Type::BaseModel required :source, String # @!method initialize(id:, bytes:, container_id:, created_at:, path:, source:, object: :"container.file") - # @param id [String] Unique identifier for the file. + # @param id [String] + # Unique identifier for the file. # - # @param bytes [Integer] Size of the file in bytes. + # @param bytes [Integer] + # Size of the file in bytes. # - # @param container_id [String] The container this file belongs to. + # @param container_id [String] + # The container this file belongs to. # - # @param created_at [Integer] Unix timestamp (in seconds) when the file was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the file was created. # - # @param path [String] Path of the file in the container. + # @param path [String] + # Path of the file in the container. # - # @param source [String] Source of the file (e.g., `user`, `assistant`). + # @param source [String] + # Source of the file (e.g., `user`, `assistant`). # - # @param object [Symbol, :"container.file"] The type of this object (`container.file`). + # @param object [Symbol, :"container.file"] + # The type of this object (`container.file`). end end end diff --git a/lib/openai/models/content_provenance_check.rb b/lib/openai/models/content_provenance_check.rb index 902f11612..6602d907d 100644 --- a/lib/openai/models/content_provenance_check.rb +++ b/lib/openai/models/content_provenance_check.rb @@ -24,14 +24,15 @@ class ContentProvenanceCheck < OpenAI::Internal::Type::BaseModel required :results, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::ContentProvenanceCheck::Result] } # @!method initialize(created_at:, object:, results:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContentProvenanceCheck} for more details. + # @param created_at [Integer] + # The Unix timestamp, in seconds, when the provenance check was created. # - # @param created_at [Integer] The Unix timestamp, in seconds, when the provenance check was created. + # @param object [Symbol, OpenAI::Models::ContentProvenanceCheck::Object] + # The object type. Always `content_provenance_check` for this endpoint. # - # @param object [Symbol, OpenAI::Models::ContentProvenanceCheck::Object] The object type. Always `content_provenance_check` for this endpoint. - # - # @param results [Array] The provenance results that apply to the uploaded file. Image results include C2 + # @param results [Array] + # The provenance results that apply to the uploaded file. Image results include + # C2PA and SynthID; audio results include SynthID. # The object type. Always `content_provenance_check` for this endpoint. # @@ -99,20 +100,30 @@ class C2PA < OpenAI::Internal::Type::BaseModel required :validation_state, enum: -> { OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState } # @!method initialize(generated_at:, issuer:, model:, outcome:, validation_state:, type: :c2pa) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContentProvenanceCheck::Result::C2PA} for more details. - # - # @param generated_at [String, nil] The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset + # @param generated_at [String, nil] + # The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset + # was generated, when available. # - # @param issuer [String, nil] The C2PA manifest issuer, when available. + # @param issuer [String, nil] + # The C2PA manifest issuer, when available. # - # @param model [String, nil] The OpenAI model recorded by the provenance signal, when available. + # @param model [String, nil] + # The OpenAI model recorded by the provenance signal, when available. # - # @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::Outcome] Whether a supported OpenAI C2PA provenance signal was detected. + # @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::Outcome] + # Whether a supported OpenAI C2PA provenance signal was detected. If + # `not_detected`, it means the tool did not find supported signals in the uploaded + # file. The content could still have been generated by OpenAI if the metadata was + # stripped or has evidence of tampering, the watermark was degraded, it comes from + # a legacy generation model, or it was created before provenance signals were + # available. Content could also still be AI-generated by another company's model, + # which the tool currently does not detect. # - # @param validation_state [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::ValidationState] The validation status of the C2PA manifest in the uploaded image. + # @param validation_state [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::ValidationState] + # The validation status of the C2PA manifest in the uploaded image. # - # @param type [Symbol, :c2pa] The provenance signal type. Always `c2pa`. + # @param type [Symbol, :c2pa] + # The provenance signal type. Always `c2pa`. # Whether a supported OpenAI C2PA provenance signal was detected. If # `not_detected`, it means the tool did not find supported signals in the uploaded @@ -182,16 +193,24 @@ class SynthID < OpenAI::Internal::Type::BaseModel required :type, const: :synthid # @!method initialize(generated_at:, model:, outcome:, type: :synthid) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContentProvenanceCheck::Result::SynthID} for more details. - # - # @param generated_at [String, nil] The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset - # - # @param model [String, nil] The OpenAI model recorded by the provenance signal, when available. - # - # @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::SynthID::Outcome] Whether a supported OpenAI SynthID watermark was detected. - # - # @param type [Symbol, :synthid] The provenance signal type. Always `synthid`. + # @param generated_at [String, nil] + # The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset + # was generated, when available. + # + # @param model [String, nil] + # The OpenAI model recorded by the provenance signal, when available. + # + # @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::SynthID::Outcome] + # Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it + # means the tool did not find supported signals in the uploaded file. The content + # could still have been generated by OpenAI if the metadata was stripped or has + # evidence of tampering, the watermark was degraded, it comes from a legacy + # generation model, or it was created before provenance signals were available. + # Content could also still be AI-generated by another company's model, which the + # tool currently does not detect. + # + # @param type [Symbol, :synthid] + # The provenance signal type. Always `synthid`. # Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it # means the tool did not find supported signals in the uploaded file. The content diff --git a/lib/openai/models/content_provenance_check_create_params.rb b/lib/openai/models/content_provenance_check_create_params.rb index 3349fc68a..e938a1af9 100644 --- a/lib/openai/models/content_provenance_check_create_params.rb +++ b/lib/openai/models/content_provenance_check_create_params.rb @@ -18,7 +18,12 @@ class ContentProvenanceCheckCreateParams < OpenAI::Internal::Type::BaseModel required :file, OpenAI::Internal::Type::FileInput # @!method initialize(file:, request_options: {}) - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The image or audio file to check for supported OpenAI provenance signals. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The image or audio file to check for supported OpenAI provenance signals. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/conversations/computer_screenshot_content.rb b/lib/openai/models/conversations/computer_screenshot_content.rb index fd42c0ba1..91b1ccb1c 100644 --- a/lib/openai/models/conversations/computer_screenshot_content.rb +++ b/lib/openai/models/conversations/computer_screenshot_content.rb @@ -42,20 +42,26 @@ class ComputerScreenshotContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail:, file_id:, image_url:, prompt_cache_breakpoint: nil, type: :computer_screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ComputerScreenshotContent} for more details. - # # A screenshot of a computer. # - # @param detail [Symbol, OpenAI::Models::Conversations::ComputerScreenshotContent::Detail] The detail level of the screenshot image to be sent to the model. One of `high`, + # @param detail [Symbol, OpenAI::Models::Conversations::ComputerScreenshotContent::Detail] + # The detail level of the screenshot image to be sent to the model. One of `high`, + # `low`, `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The identifier of an uploaded file that contains the screenshot. + # @param file_id [String, nil] + # The identifier of an uploaded file that contains the screenshot. # - # @param image_url [String, nil] The URL of the screenshot image. + # @param image_url [String, nil] + # The URL of the screenshot image. # - # @param prompt_cache_breakpoint [OpenAI::Models::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is always set + # @param type [Symbol, :computer_screenshot] + # Specifies the event type. For a computer screenshot, this property is always set + # to `computer_screenshot`. # The detail level of the screenshot image to be sent to the model. One of `high`, # `low`, `auto`, or `original`. Defaults to `auto`. @@ -86,7 +92,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/conversations/conversation.rb b/lib/openai/models/conversations/conversation.rb index 8e39df4c0..1ddb869f0 100644 --- a/lib/openai/models/conversations/conversation.rb +++ b/lib/openai/models/conversations/conversation.rb @@ -35,16 +35,22 @@ class Conversation < OpenAI::Internal::Type::BaseModel required :object, const: :conversation # @!method initialize(id:, created_at:, metadata:, object: :conversation) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::Conversation} for more details. - # - # @param id [String] The unique ID of the conversation. - # - # @param created_at [Integer] The time at which the conversation was created, measured in seconds since the Un - # - # @param metadata [Object] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param object [Symbol, :conversation] The object type, which is always `conversation`. + # @param id [String] + # The unique ID of the conversation. + # + # @param created_at [Integer] + # The time at which the conversation was created, measured in seconds since the + # Unix epoch. + # + # @param metadata [Object] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters. + # + # @param object [Symbol, :conversation] + # The object type, which is always `conversation`. end end end diff --git a/lib/openai/models/conversations/conversation_create_params.rb b/lib/openai/models/conversations/conversation_create_params.rb index cc1bfde10..2a2fc41d1 100644 --- a/lib/openai/models/conversations/conversation_create_params.rb +++ b/lib/openai/models/conversations/conversation_create_params.rb @@ -31,12 +31,17 @@ class ConversationCreateParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(items: nil, metadata: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationCreateParams} for more details. + # @param items [Array, nil] + # Initial items to include in the conversation context. You may add up to 20 items + # at a time. # - # @param items [Array, nil] Initial items to include in the conversation context. You may add up to 20 items + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/conversations/conversation_item.rb b/lib/openai/models/conversations/conversation_item.rb index 160d2273e..9d4d4298b 100644 --- a/lib/openai/models/conversations/conversation_item.rb +++ b/lib/openai/models/conversations/conversation_item.rb @@ -5,7 +5,7 @@ module Models module Conversations # A single item within a conversation. The set of possible types are the same as # the `output` type of a - # [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output). + # [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output). # # @see OpenAI::Resources::Conversations::Items#retrieve module ConversationItem @@ -17,24 +17,24 @@ module ConversationItem variant :message, -> { OpenAI::Conversations::Message } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Responses::ResponseFunctionToolCallItem } variant :function_call_output, -> { OpenAI::Responses::ResponseFunctionToolCallOutputItem } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Responses::ResponseFileSearchToolCall } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Responses::ResponseFunctionWebSearch } # An image generation request made by the model. variant :image_generation_call, -> { OpenAI::Conversations::ConversationItem::ImageGenerationCall } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Responses::ResponseComputerToolCall } variant :computer_call_output, -> { OpenAI::Responses::ResponseComputerToolCallOutputItem } @@ -52,14 +52,14 @@ module ConversationItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Responses::ResponseReasoningItem } variant :program, -> { OpenAI::Conversations::ConversationItem::Program } variant :program_output, -> { OpenAI::Conversations::ConversationItem::ProgramOutput } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Responses::ResponseCompactionItem } # A tool call to run code. @@ -148,23 +148,26 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, result:, status:, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall} for more - # details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param quality [Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -264,13 +267,17 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel required :type, const: :additional_tools # @!method initialize(id:, role:, tools:, type: :additional_tools) - # @param id [String] The unique ID of the additional tools item. + # @param id [String] + # The unique ID of the additional tools item. # - # @param role [Symbol, OpenAI::Models::Conversations::ConversationItem::AdditionalTools::Role] The role that provided the additional tools. + # @param role [Symbol, OpenAI::Models::Conversations::ConversationItem::AdditionalTools::Role] + # The role that provided the additional tools. # - # @param tools [Array] The additional tool definitions made available at this item. + # @param tools [Array] + # The additional tool definitions made available at this item. # - # @param type [Symbol, :additional_tools] The type of the item. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The type of the item. Always `additional_tools`. # The role that provided the additional tools. # @@ -324,15 +331,20 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(id:, call_id:, code:, fingerprint:, type: :program) - # @param id [String] The unique ID of the program item. + # @param id [String] + # The unique ID of the program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param type [Symbol, :program] The type of the item. Always `program`. + # @param type [Symbol, :program] + # The type of the item. Always `program`. end class ProgramOutput < OpenAI::Internal::Type::BaseModel @@ -367,15 +379,20 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel required :type, const: :program_output # @!method initialize(id:, call_id:, result:, status:, type: :program_output) - # @param id [String] The unique ID of the program output item. + # @param id [String] + # The unique ID of the program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::ProgramOutput::Status] The terminal status of the program output item. + # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::ProgramOutput::Status] + # The terminal status of the program output item. # - # @param type [Symbol, :program_output] The type of the item. Always `program_output`. + # @param type [Symbol, :program_output] + # The type of the item. Always `program_output`. # The terminal status of the program output item. # @@ -423,21 +440,22 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel required :type, const: :local_shell_call # @!method initialize(id:, action:, call_id:, status:, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::LocalShellCall} for more - # details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Conversations::ConversationItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Conversations::ConversationItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Conversations::ConversationItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -480,17 +498,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -538,19 +562,19 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # @@ -602,22 +626,22 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::McpListTools} for more - # details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -644,19 +668,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::McpListTools::Tool} for more - # details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end end @@ -692,21 +716,22 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel required :type, const: :mcp_approval_request # @!method initialize(id:, arguments:, name:, server_label:, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::McpApprovalRequest} for more - # details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. end class McpApprovalResponse < OpenAI::Internal::Type::BaseModel @@ -741,21 +766,22 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(id:, approval_request_id:, approve:, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::McpApprovalResponse} for more - # details. - # # A response to an MCP approval request. # - # @param id [String] The unique ID of the approval response + # @param id [String] + # The unique ID of the approval response # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. end class McpCall < OpenAI::Internal::Type::BaseModel @@ -817,28 +843,37 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Conversations::ConversationItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, # `calling`, or `failed`. diff --git a/lib/openai/models/conversations/conversation_item_list.rb b/lib/openai/models/conversations/conversation_item_list.rb index c76d519e7..980fee515 100644 --- a/lib/openai/models/conversations/conversation_item_list.rb +++ b/lib/openai/models/conversations/conversation_item_list.rb @@ -38,15 +38,20 @@ class ConversationItemList < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) # A list of Conversation items. # - # @param data [Array] A list of conversation items. + # @param data [Array] + # A list of conversation items. # - # @param first_id [String] The ID of the first item in the list. + # @param first_id [String] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String] The ID of the last item in the list. + # @param last_id [String] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. end end diff --git a/lib/openai/models/conversations/conversation_update_params.rb b/lib/openai/models/conversations/conversation_update_params.rb index a6c7fa90c..e731d03eb 100644 --- a/lib/openai/models/conversations/conversation_update_params.rb +++ b/lib/openai/models/conversations/conversation_update_params.rb @@ -25,12 +25,15 @@ class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(conversation_id:, metadata:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details. - # # @param conversation_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/conversations/item_create_params.rb b/lib/openai/models/conversations/item_create_params.rb index 897de40c6..5e983fc4d 100644 --- a/lib/openai/models/conversations/item_create_params.rb +++ b/lib/openai/models/conversations/item_create_params.rb @@ -21,21 +21,22 @@ class ItemCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute include # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. # # @return [Array, nil] optional :include, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Responses::ResponseIncludable] } # @!method initialize(conversation_id:, items:, include: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemCreateParams} for more details. - # # @param conversation_id [String] # - # @param items [Array] The items to add to the conversation. You may add up to 20 items at a time. + # @param items [Array] + # The items to add to the conversation. You may add up to 20 items at a time. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/conversations/item_list_params.rb b/lib/openai/models/conversations/item_list_params.rb index 8f6688680..eda3a746d 100644 --- a/lib/openai/models/conversations/item_list_params.rb +++ b/lib/openai/models/conversations/item_list_params.rb @@ -59,18 +59,40 @@ class ItemListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Conversations::ItemListParams::Order } # @!method initialize(conversation_id:, after: nil, include: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemListParams} for more details. - # # @param conversation_id [String] # - # @param after [String] An item ID to list items after, used in pagination. + # @param after [String] + # An item ID to list items after, used in pagination. + # + # @param include [Array] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). # - # @param include [Array] Specify additional output data to include in the model response. Currently suppo + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between + # @param order [Symbol, OpenAI::Models::Conversations::ItemListParams::Order] + # The order to return the input items in. Default is `desc`. # - # @param order [Symbol, OpenAI::Models::Conversations::ItemListParams::Order] The order to return the input items in. Default is `desc`. + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/conversations/item_retrieve_params.rb b/lib/openai/models/conversations/item_retrieve_params.rb index 4b3e996f8..01b67ff62 100644 --- a/lib/openai/models/conversations/item_retrieve_params.rb +++ b/lib/openai/models/conversations/item_retrieve_params.rb @@ -20,21 +20,21 @@ class ItemRetrieveParams < OpenAI::Internal::Type::BaseModel # @!attribute include # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. # # @return [Array, nil] optional :include, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Responses::ResponseIncludable] } # @!method initialize(conversation_id:, item_id:, include: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemRetrieveParams} for more details. - # # @param conversation_id [String] # # @param item_id [String] # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/conversations/message.rb b/lib/openai/models/conversations/message.rb index 985680b97..e0d247c3a 100644 --- a/lib/openai/models/conversations/message.rb +++ b/lib/openai/models/conversations/message.rb @@ -46,22 +46,30 @@ class Message < OpenAI::Internal::Type::BaseModel optional :phase, enum: -> { OpenAI::Conversations::Message::Phase }, nil?: true # @!method initialize(id:, content:, role:, status:, phase: nil, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::Message} for more details. - # # A message to or from the model. # - # @param id [String] The unique ID of the message. + # @param id [String] + # The unique ID of the message. # - # @param content [Array] The content of the message + # @param content [Array] + # The content of the message # - # @param role [Symbol, OpenAI::Models::Conversations::Message::Role] The role of the message. One of `unknown`, `user`, `assistant`, `system`, `criti + # @param role [Symbol, OpenAI::Models::Conversations::Message::Role] + # The role of the message. One of `unknown`, `user`, `assistant`, `system`, + # `critic`, `discriminator`, `developer`, or `tool`. # - # @param status [Symbol, OpenAI::Models::Conversations::Message::Status] The status of item. One of `in_progress`, `completed`, or `incomplete`. Populate + # @param status [Symbol, OpenAI::Models::Conversations::Message::Status] + # The status of item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param phase [Symbol, OpenAI::Models::Conversations::Message::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # @param phase [Symbol, OpenAI::Models::Conversations::Message::Phase, nil] + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. # - # @param type [Symbol, :message] The type of the message. Always set to `message`. + # @param type [Symbol, :message] + # The type of the message. Always set to `message`. # A content part that makes up an input or output item. module Content @@ -87,7 +95,7 @@ module Content # A refusal from the model. variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Responses::ResponseInputImage } # A screenshot of a computer. @@ -112,9 +120,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants diff --git a/lib/openai/models/conversations/summary_text_content.rb b/lib/openai/models/conversations/summary_text_content.rb index ce8377942..b0fc7b90d 100644 --- a/lib/openai/models/conversations/summary_text_content.rb +++ b/lib/openai/models/conversations/summary_text_content.rb @@ -19,9 +19,11 @@ class SummaryTextContent < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # A summary text from the model. # - # @param text [String] A summary of the reasoning output from the model so far. + # @param text [String] + # A summary of the reasoning output from the model so far. # - # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the object. Always `summary_text`. end end end diff --git a/lib/openai/models/create_embedding_response.rb b/lib/openai/models/create_embedding_response.rb index a7bcbff1d..c37f032c1 100644 --- a/lib/openai/models/create_embedding_response.rb +++ b/lib/openai/models/create_embedding_response.rb @@ -29,13 +29,17 @@ class CreateEmbeddingResponse < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::CreateEmbeddingResponse::Usage } # @!method initialize(data:, model:, usage:, object: :list) - # @param data [Array] The list of embeddings generated by the model. + # @param data [Array] + # The list of embeddings generated by the model. # - # @param model [String] The name of the model used to generate the embedding. + # @param model [String] + # The name of the model used to generate the embedding. # - # @param usage [OpenAI::Models::CreateEmbeddingResponse::Usage] The usage information for the request. + # @param usage [OpenAI::Models::CreateEmbeddingResponse::Usage] + # The usage information for the request. # - # @param object [Symbol, :list] The object type, which is always "list". + # @param object [Symbol, :list] + # The object type, which is always "list". # @see OpenAI::Models::CreateEmbeddingResponse#usage class Usage < OpenAI::Internal::Type::BaseModel @@ -54,9 +58,11 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(prompt_tokens:, total_tokens:) # The usage information for the request. # - # @param prompt_tokens [Integer] The number of tokens used by the prompt. + # @param prompt_tokens [Integer] + # The number of tokens used by the prompt. # - # @param total_tokens [Integer] The total number of tokens used by the request. + # @param total_tokens [Integer] + # The total number of tokens used by the request. end end end diff --git a/lib/openai/models/custom_tool_input_format.rb b/lib/openai/models/custom_tool_input_format.rb index e716a67dc..405b07c8e 100644 --- a/lib/openai/models/custom_tool_input_format.rb +++ b/lib/openai/models/custom_tool_input_format.rb @@ -24,7 +24,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :text) # Unconstrained free-form text. # - # @param type [Symbol, :text] Unconstrained text format. Always `text`. + # @param type [Symbol, :text] + # Unconstrained text format. Always `text`. end class Grammar < OpenAI::Internal::Type::BaseModel @@ -49,11 +50,14 @@ class Grammar < OpenAI::Internal::Type::BaseModel # @!method initialize(definition:, syntax:, type: :grammar) # A grammar defined by the user. # - # @param definition [String] The grammar definition. + # @param definition [String] + # The grammar definition. # - # @param syntax [Symbol, OpenAI::Models::CustomToolInputFormat::Grammar::Syntax] The syntax of the grammar definition. One of `lark` or `regex`. + # @param syntax [Symbol, OpenAI::Models::CustomToolInputFormat::Grammar::Syntax] + # The syntax of the grammar definition. One of `lark` or `regex`. # - # @param type [Symbol, :grammar] Grammar format. Always `grammar`. + # @param type [Symbol, :grammar] + # Grammar format. Always `grammar`. # The syntax of the grammar definition. One of `lark` or `regex`. # diff --git a/lib/openai/models/embedding.rb b/lib/openai/models/embedding.rb index 9a511defe..557ada7c7 100644 --- a/lib/openai/models/embedding.rb +++ b/lib/openai/models/embedding.rb @@ -6,7 +6,7 @@ class Embedding < OpenAI::Internal::Type::BaseModel # @!attribute embedding # The embedding vector, which is a list of floats. The length of vector depends on # the model as listed in the - # [embedding guide](https://platform.openai.com/docs/guides/embeddings). + # [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). # # @return [Array] required :embedding, OpenAI::Internal::Type::ArrayOf[Float] @@ -24,16 +24,18 @@ class Embedding < OpenAI::Internal::Type::BaseModel required :object, const: :embedding # @!method initialize(embedding:, index:, object: :embedding) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Embedding} for more details. - # # Represents an embedding vector returned by embedding endpoint. # - # @param embedding [Array] The embedding vector, which is a list of floats. The length of vector depends on + # @param embedding [Array] + # The embedding vector, which is a list of floats. The length of vector depends on + # the model as listed in the + # [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). # - # @param index [Integer] The index of the embedding in the list of embeddings. + # @param index [Integer] + # The index of the embedding in the list of embeddings. # - # @param object [Symbol, :embedding] The object type, which is always "embedding". + # @param object [Symbol, :embedding] + # The object type, which is always "embedding". end end end diff --git a/lib/openai/models/embedding_create_params.rb b/lib/openai/models/embedding_create_params.rb index fea9547ef..2ad0d052b 100644 --- a/lib/openai/models/embedding_create_params.rb +++ b/lib/openai/models/embedding_create_params.rb @@ -23,10 +23,10 @@ class EmbeddingCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # # @return [String, Symbol, OpenAI::Models::EmbeddingModel] required :model, union: -> { OpenAI::EmbeddingCreateParams::Model } @@ -48,24 +48,42 @@ class EmbeddingCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(input:, model:, dimensions: nil, encoding_format: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EmbeddingCreateParams} for more details. + # @param input [String, Array, Array, Array>] + # Input text to embed, encoded as a string or array of tokens. To embed multiple + # inputs in a single request, pass an array of strings or array of token arrays. + # The input must not exceed the max input tokens for the model (8192 tokens for + # all embedding models), cannot be an empty string, and any array must be 2048 + # dimensions or less. + # [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + # for counting tokens. In addition to the per-input token limit, all embedding + # models enforce a maximum of 300,000 tokens summed across all inputs in a single + # request. # - # @param input [String, Array, Array, Array>] Input text to embed, encoded as a string or array of tokens. To embed multiple i + # @param model [String, Symbol, OpenAI::Models::EmbeddingModel] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # - # @param model [String, Symbol, OpenAI::Models::EmbeddingModel] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param dimensions [Integer] + # The number of dimensions the resulting output embeddings should have. Only + # supported in `text-embedding-3` and later models. # - # @param dimensions [Integer] The number of dimensions the resulting output embeddings should have. Only suppo + # @param encoding_format [Symbol, OpenAI::Models::EmbeddingCreateParams::EncodingFormat] + # The format to return the embeddings in. Can be either `float` or + # [`base64`](https://pypi.org/project/pybase64/). # - # @param encoding_format [Symbol, OpenAI::Models::EmbeddingCreateParams::EncodingFormat] The format to return the embeddings in. Can be either `float` or [`base64`](http - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -107,16 +125,16 @@ module Input end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union variant String - # ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + # ID of the model to use. You can use the [List models](https://developers.openai.com/api/reference/resources/models/methods/list) API to see all of your available models, or see our [Model overview](https://developers.openai.com/api/docs/models) for descriptions of them. variant enum: -> { OpenAI::EmbeddingModel } # @!method self.variants diff --git a/lib/openai/models/error_object.rb b/lib/openai/models/error_object.rb index 101ce1d73..4e700981d 100644 --- a/lib/openai/models/error_object.rb +++ b/lib/openai/models/error_object.rb @@ -56,11 +56,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel optional :steer, -> { OpenAI::ErrorObject::Misalignment::Steer } # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::ErrorObject::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::ErrorObject::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::ErrorObject::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::ErrorObject::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -114,7 +117,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end diff --git a/lib/openai/models/eval_create_params.rb b/lib/openai/models/eval_create_params.rb index 735d7cf9c..eeded498a 100644 --- a/lib/openai/models/eval_create_params.rb +++ b/lib/openai/models/eval_create_params.rb @@ -44,16 +44,26 @@ class EvalCreateParams < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(data_source_config:, testing_criteria:, metadata: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams} for more details. + # @param data_source_config [OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom, OpenAI::Models::EvalCreateParams::DataSourceConfig::Logs, OpenAI::Models::EvalCreateParams::DataSourceConfig::StoredCompletions] + # The configuration for the data source used for the evaluation runs. Dictates the + # schema of the data used in the evaluation. # - # @param data_source_config [OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom, OpenAI::Models::EvalCreateParams::DataSourceConfig::Logs, OpenAI::Models::EvalCreateParams::DataSourceConfig::StoredCompletions] The configuration for the data source used for the evaluation runs. Dictates the + # @param testing_criteria [Array] + # A list of graders for all eval runs in this group. Graders can reference + # variables in the data source using double curly braces notation, like + # `{{item.variable_name}}`. To reference the model's output, use the `sample` + # namespace (ie, `{{sample.output_text}}`). # - # @param testing_criteria [Array] A list of graders for all eval runs in this group. Graders can reference variabl + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -98,9 +108,6 @@ class Custom < OpenAI::Internal::Type::BaseModel optional :include_sample_schema, OpenAI::Internal::Type::Boolean # @!method initialize(item_schema:, include_sample_schema: nil, type: :custom) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom} for more details. - # # A CustomDataSourceConfig object that defines the schema for the data source used # for the evaluation runs. This schema is used to define the shape of the data # that will be: @@ -108,11 +115,15 @@ class Custom < OpenAI::Internal::Type::BaseModel # - Used to define your testing criteria and # - What data is required when creating a run # - # @param item_schema [Hash{Symbol=>Object}] The json schema for each row in the data source. + # @param item_schema [Hash{Symbol=>Object}] + # The json schema for each row in the data source. # - # @param include_sample_schema [Boolean] Whether the eval should expect you to populate the sample namespace (ie, by gene + # @param include_sample_schema [Boolean] + # Whether the eval should expect you to populate the sample namespace (ie, by + # generating responses off of your data source) # - # @param type [Symbol, :custom] The type of data source. Always `custom`. + # @param type [Symbol, :custom] + # The type of data source. Always `custom`. end class Logs < OpenAI::Internal::Type::BaseModel @@ -132,9 +143,11 @@ class Logs < OpenAI::Internal::Type::BaseModel # A data source config which specifies the metadata property of your logs query. # This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. # - # @param metadata [Hash{Symbol=>Object}] Metadata filters for the logs data source. + # @param metadata [Hash{Symbol=>Object}] + # Metadata filters for the logs data source. # - # @param type [Symbol, :logs] The type of data source. Always `logs`. + # @param type [Symbol, :logs] + # The type of data source. Always `logs`. end # @deprecated @@ -154,9 +167,11 @@ class StoredCompletions < OpenAI::Internal::Type::BaseModel # @!method initialize(metadata: nil, type: :stored_completions) # Deprecated in favor of LogsDataSourceConfig. # - # @param metadata [Hash{Symbol=>Object}] Metadata filters for the stored completions data source. + # @param metadata [Hash{Symbol=>Object}] + # Metadata filters for the stored completions data source. # - # @param type [Symbol, :stored_completions] The type of data source. Always `stored_completions`. + # @param type [Symbol, :stored_completions] + # The type of data source. Always `stored_completions`. end # @!method self.variants @@ -230,24 +245,27 @@ class LabelModel < OpenAI::Internal::Type::BaseModel required :type, const: :label_model # @!method initialize(input:, labels:, model:, name:, passing_labels:, type: :label_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel} for more - # details. - # # A LabelModelGrader object which uses a model to assign labels to each item in # the evaluation. # - # @param input [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param input [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param labels [Array] The labels to classify to each item in the evaluation. + # @param labels [Array] + # The labels to classify to each item in the evaluation. # - # @param model [String] The model to use for the evaluation. Must support structured outputs. + # @param model [String] + # The model to use for the evaluation. Must support structured outputs. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param passing_labels [Array] The labels that indicate a passing result. Must be a subset of labels. + # @param passing_labels [Array] + # The labels that indicate a passing result. Must be a subset of labels. # - # @param type [Symbol, :label_model] The object type, which is always `label_model`. + # @param type [Symbol, :label_model] + # The object type, which is always `label_model`. # A chat message that makes up the prompt or context. May include variable # references to the `item` namespace, ie {{item.name}}. @@ -277,9 +295,11 @@ class SimpleInputMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -313,21 +333,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::OutputText, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::OutputText, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -373,15 +394,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -405,17 +424,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -464,23 +483,26 @@ class TextSimilarity < OpenAI::Models::Graders::TextSimilarityGrader required :pass_threshold, Float # @!method initialize(evaluation_metric:, input:, name:, reference:, pass_threshold:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::TextSimilarity} for more - # details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. end class Python < OpenAI::Models::Graders::PythonGrader @@ -493,15 +515,20 @@ class Python < OpenAI::Models::Graders::PythonGrader # @!method initialize(name:, source:, image_tag: nil, pass_threshold: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end class ScoreModel < OpenAI::Models::Graders::ScoreModelGrader @@ -512,25 +539,29 @@ class ScoreModel < OpenAI::Models::Graders::ScoreModelGrader optional :pass_threshold, Float # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams::TestingCriterion::ScoreModel} for more - # details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. end # @!method self.variants diff --git a/lib/openai/models/eval_create_response.rb b/lib/openai/models/eval_create_response.rb index 9d5116d95..3c2a0febd 100644 --- a/lib/openai/models/eval_create_response.rb +++ b/lib/openai/models/eval_create_response.rb @@ -55,9 +55,6 @@ class EvalCreateResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, created_at:, data_source_config:, metadata:, name:, testing_criteria:, object: :eval) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateResponse} for more details. - # # An Eval object with a data source config and testing criteria. An Eval # represents a task to be done for your LLM integration. Like: # @@ -65,19 +62,31 @@ class EvalCreateResponse < OpenAI::Internal::Type::BaseModel # - See how well my chatbot handles customer support # - Check if o4-mini is better at my usecase than gpt-6-astra # - # @param id [String] Unique identifier for the evaluation. + # @param id [String] + # Unique identifier for the evaluation. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the eval was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the eval was created. + # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalCreateResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] + # Configuration of data sources used in runs of the evaluation. # - # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalCreateResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] Configuration of data sources used in runs of the evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # - # @param testing_criteria [Array] A list of testing criteria. + # @param testing_criteria [Array] + # A list of testing criteria. # - # @param object [Symbol, :eval] The object type. + # @param object [Symbol, :eval] + # The object type. # Configuration of data sources used in runs of the evaluation. # @@ -128,20 +137,26 @@ class Logs < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(schema:, metadata: nil, type: :logs) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateResponse::DataSourceConfig::Logs} for more details. - # # A LogsDataSourceConfig which specifies the metadata property of your logs query. # This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The # schema returned by this data source config is used to defined what variables are # available in your evals. `item` and `sample` are both defined when using this # data source config. # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param type [Symbol, :logs] The type of data source. Always `logs`. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param type [Symbol, :logs] + # The type of data source. Always `logs`. end # @!method self.variants @@ -177,23 +192,26 @@ class EvalGraderTextSimilarity < OpenAI::Models::Graders::TextSimilarityGrader required :pass_threshold, Float # @!method initialize(evaluation_metric:, input:, name:, reference:, pass_threshold:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateResponse::TestingCriterion::EvalGraderTextSimilarity} - # for more details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. end class EvalGraderPython < OpenAI::Models::Graders::PythonGrader @@ -206,15 +224,20 @@ class EvalGraderPython < OpenAI::Models::Graders::PythonGrader # @!method initialize(name:, source:, image_tag: nil, pass_threshold: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader @@ -225,25 +248,29 @@ class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader optional :pass_threshold, Float # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateResponse::TestingCriterion::EvalGraderScoreModel} for - # more details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. end # @!method self.variants diff --git a/lib/openai/models/eval_custom_data_source_config.rb b/lib/openai/models/eval_custom_data_source_config.rb index 5ff8b5db3..aa6cc7bf5 100644 --- a/lib/openai/models/eval_custom_data_source_config.rb +++ b/lib/openai/models/eval_custom_data_source_config.rb @@ -17,9 +17,6 @@ class EvalCustomDataSourceConfig < OpenAI::Internal::Type::BaseModel required :type, const: :custom # @!method initialize(schema:, type: :custom) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCustomDataSourceConfig} for more details. - # # A CustomDataSourceConfig which specifies the schema of your `item` and # optionally `sample` namespaces. The response schema defines the shape of the # data that will be: @@ -27,9 +24,12 @@ class EvalCustomDataSourceConfig < OpenAI::Internal::Type::BaseModel # - Used to define your testing criteria and # - What data is required when creating a run # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). # - # @param type [Symbol, :custom] The type of data source. Always `custom`. + # @param type [Symbol, :custom] + # The type of data source. Always `custom`. end end end diff --git a/lib/openai/models/eval_list_params.rb b/lib/openai/models/eval_list_params.rb index ff5f8d607..80ceb21e7 100644 --- a/lib/openai/models/eval_list_params.rb +++ b/lib/openai/models/eval_list_params.rb @@ -34,16 +34,19 @@ class EvalListParams < OpenAI::Internal::Type::BaseModel optional :order_by, enum: -> { OpenAI::EvalListParams::OrderBy } # @!method initialize(after: nil, limit: nil, order: nil, order_by: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListParams} for more details. + # @param after [String] + # Identifier for the last eval from the previous pagination request. # - # @param after [String] Identifier for the last eval from the previous pagination request. + # @param limit [Integer] + # Number of evals to retrieve. # - # @param limit [Integer] Number of evals to retrieve. + # @param order [Symbol, OpenAI::Models::EvalListParams::Order] + # Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # - # @param order [Symbol, OpenAI::Models::EvalListParams::Order] Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for d - # - # @param order_by [Symbol, OpenAI::Models::EvalListParams::OrderBy] Evals can be ordered by creation time or last updated time. Use + # @param order_by [Symbol, OpenAI::Models::EvalListParams::OrderBy] + # Evals can be ordered by creation time or last updated time. Use `created_at` for + # creation time or `updated_at` for last updated time. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/eval_list_response.rb b/lib/openai/models/eval_list_response.rb index 8d62c3680..057200a4b 100644 --- a/lib/openai/models/eval_list_response.rb +++ b/lib/openai/models/eval_list_response.rb @@ -55,9 +55,6 @@ class EvalListResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, created_at:, data_source_config:, metadata:, name:, testing_criteria:, object: :eval) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListResponse} for more details. - # # An Eval object with a data source config and testing criteria. An Eval # represents a task to be done for your LLM integration. Like: # @@ -65,19 +62,31 @@ class EvalListResponse < OpenAI::Internal::Type::BaseModel # - See how well my chatbot handles customer support # - Check if o4-mini is better at my usecase than gpt-6-astra # - # @param id [String] Unique identifier for the evaluation. + # @param id [String] + # Unique identifier for the evaluation. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the eval was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the eval was created. + # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalListResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] + # Configuration of data sources used in runs of the evaluation. # - # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalListResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] Configuration of data sources used in runs of the evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # - # @param testing_criteria [Array] A list of testing criteria. + # @param testing_criteria [Array] + # A list of testing criteria. # - # @param object [Symbol, :eval] The object type. + # @param object [Symbol, :eval] + # The object type. # Configuration of data sources used in runs of the evaluation. # @@ -128,20 +137,26 @@ class Logs < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(schema:, metadata: nil, type: :logs) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListResponse::DataSourceConfig::Logs} for more details. - # # A LogsDataSourceConfig which specifies the metadata property of your logs query. # This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The # schema returned by this data source config is used to defined what variables are # available in your evals. `item` and `sample` are both defined when using this # data source config. # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param type [Symbol, :logs] The type of data source. Always `logs`. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param type [Symbol, :logs] + # The type of data source. Always `logs`. end # @!method self.variants @@ -177,23 +192,26 @@ class EvalGraderTextSimilarity < OpenAI::Models::Graders::TextSimilarityGrader required :pass_threshold, Float # @!method initialize(evaluation_metric:, input:, name:, reference:, pass_threshold:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListResponse::TestingCriterion::EvalGraderTextSimilarity} - # for more details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. end class EvalGraderPython < OpenAI::Models::Graders::PythonGrader @@ -206,15 +224,20 @@ class EvalGraderPython < OpenAI::Models::Graders::PythonGrader # @!method initialize(name:, source:, image_tag: nil, pass_threshold: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader @@ -225,25 +248,29 @@ class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader optional :pass_threshold, Float # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListResponse::TestingCriterion::EvalGraderScoreModel} for - # more details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. end # @!method self.variants diff --git a/lib/openai/models/eval_retrieve_response.rb b/lib/openai/models/eval_retrieve_response.rb index de25c8294..685dd8624 100644 --- a/lib/openai/models/eval_retrieve_response.rb +++ b/lib/openai/models/eval_retrieve_response.rb @@ -55,9 +55,6 @@ class EvalRetrieveResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, created_at:, data_source_config:, metadata:, name:, testing_criteria:, object: :eval) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalRetrieveResponse} for more details. - # # An Eval object with a data source config and testing criteria. An Eval # represents a task to be done for your LLM integration. Like: # @@ -65,19 +62,31 @@ class EvalRetrieveResponse < OpenAI::Internal::Type::BaseModel # - See how well my chatbot handles customer support # - Check if o4-mini is better at my usecase than gpt-6-astra # - # @param id [String] Unique identifier for the evaluation. + # @param id [String] + # Unique identifier for the evaluation. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the eval was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the eval was created. + # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalRetrieveResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] + # Configuration of data sources used in runs of the evaluation. # - # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalRetrieveResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] Configuration of data sources used in runs of the evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # - # @param testing_criteria [Array] A list of testing criteria. + # @param testing_criteria [Array] + # A list of testing criteria. # - # @param object [Symbol, :eval] The object type. + # @param object [Symbol, :eval] + # The object type. # Configuration of data sources used in runs of the evaluation. # @@ -128,20 +137,26 @@ class Logs < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(schema:, metadata: nil, type: :logs) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalRetrieveResponse::DataSourceConfig::Logs} for more details. - # # A LogsDataSourceConfig which specifies the metadata property of your logs query. # This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The # schema returned by this data source config is used to defined what variables are # available in your evals. `item` and `sample` are both defined when using this # data source config. # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param type [Symbol, :logs] The type of data source. Always `logs`. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param type [Symbol, :logs] + # The type of data source. Always `logs`. end # @!method self.variants @@ -177,23 +192,26 @@ class EvalGraderTextSimilarity < OpenAI::Models::Graders::TextSimilarityGrader required :pass_threshold, Float # @!method initialize(evaluation_metric:, input:, name:, reference:, pass_threshold:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalRetrieveResponse::TestingCriterion::EvalGraderTextSimilarity} - # for more details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. end class EvalGraderPython < OpenAI::Models::Graders::PythonGrader @@ -206,15 +224,20 @@ class EvalGraderPython < OpenAI::Models::Graders::PythonGrader # @!method initialize(name:, source:, image_tag: nil, pass_threshold: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader @@ -225,25 +248,29 @@ class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader optional :pass_threshold, Float # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalRetrieveResponse::TestingCriterion::EvalGraderScoreModel} - # for more details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. end # @!method self.variants diff --git a/lib/openai/models/eval_stored_completions_data_source_config.rb b/lib/openai/models/eval_stored_completions_data_source_config.rb index 2a57fdfd1..ab37c23b0 100644 --- a/lib/openai/models/eval_stored_completions_data_source_config.rb +++ b/lib/openai/models/eval_stored_completions_data_source_config.rb @@ -29,16 +29,22 @@ class EvalStoredCompletionsDataSourceConfig < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(schema:, metadata: nil, type: :stored_completions) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalStoredCompletionsDataSourceConfig} for more details. - # # Deprecated in favor of LogsDataSourceConfig. # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param type [Symbol, :stored_completions] The type of data source. Always `stored_completions`. + # @param type [Symbol, :stored_completions] + # The type of data source. Always `stored_completions`. end end end diff --git a/lib/openai/models/eval_update_params.rb b/lib/openai/models/eval_update_params.rb index 99c2ed2f3..f61fe4f3a 100644 --- a/lib/openai/models/eval_update_params.rb +++ b/lib/openai/models/eval_update_params.rb @@ -30,14 +30,18 @@ class EvalUpdateParams < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(eval_id:, metadata: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateParams} for more details. - # # @param eval_id [String] # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] Rename the evaluation. + # @param name [String] + # Rename the evaluation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/eval_update_response.rb b/lib/openai/models/eval_update_response.rb index f654d6321..eeba1231d 100644 --- a/lib/openai/models/eval_update_response.rb +++ b/lib/openai/models/eval_update_response.rb @@ -55,9 +55,6 @@ class EvalUpdateResponse < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, created_at:, data_source_config:, metadata:, name:, testing_criteria:, object: :eval) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateResponse} for more details. - # # An Eval object with a data source config and testing criteria. An Eval # represents a task to be done for your LLM integration. Like: # @@ -65,19 +62,31 @@ class EvalUpdateResponse < OpenAI::Internal::Type::BaseModel # - See how well my chatbot handles customer support # - Check if o4-mini is better at my usecase than gpt-6-astra # - # @param id [String] Unique identifier for the evaluation. + # @param id [String] + # Unique identifier for the evaluation. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the eval was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the eval was created. + # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalUpdateResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] + # Configuration of data sources used in runs of the evaluation. # - # @param data_source_config [OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalUpdateResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig] Configuration of data sources used in runs of the evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # - # @param testing_criteria [Array] A list of testing criteria. + # @param testing_criteria [Array] + # A list of testing criteria. # - # @param object [Symbol, :eval] The object type. + # @param object [Symbol, :eval] + # The object type. # Configuration of data sources used in runs of the evaluation. # @@ -128,20 +137,26 @@ class Logs < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(schema:, metadata: nil, type: :logs) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateResponse::DataSourceConfig::Logs} for more details. - # # A LogsDataSourceConfig which specifies the metadata property of your logs query. # This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. The # schema returned by this data source config is used to defined what variables are # available in your evals. `item` and `sample` are both defined when using this # data source config. # - # @param schema [Hash{Symbol=>Object}] The json schema for the run data source items. + # @param schema [Hash{Symbol=>Object}] + # The json schema for the run data source items. Learn how to build JSON schemas + # [here](https://json-schema.org/). # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param type [Symbol, :logs] The type of data source. Always `logs`. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param type [Symbol, :logs] + # The type of data source. Always `logs`. end # @!method self.variants @@ -177,23 +192,26 @@ class EvalGraderTextSimilarity < OpenAI::Models::Graders::TextSimilarityGrader required :pass_threshold, Float # @!method initialize(evaluation_metric:, input:, name:, reference:, pass_threshold:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateResponse::TestingCriterion::EvalGraderTextSimilarity} - # for more details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. end class EvalGraderPython < OpenAI::Models::Graders::PythonGrader @@ -206,15 +224,20 @@ class EvalGraderPython < OpenAI::Models::Graders::PythonGrader # @!method initialize(name:, source:, image_tag: nil, pass_threshold: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader @@ -225,25 +248,29 @@ class EvalGraderScoreModel < OpenAI::Models::Graders::ScoreModelGrader optional :pass_threshold, Float # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, pass_threshold: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateResponse::TestingCriterion::EvalGraderScoreModel} for - # more details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param pass_threshold [Float] The threshold for the score. + # @param pass_threshold [Float] + # The threshold for the score. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. end # @!method self.variants diff --git a/lib/openai/models/evals/create_eval_completions_run_data_source.rb b/lib/openai/models/evals/create_eval_completions_run_data_source.rb index 3530f24d0..b818ef784 100644 --- a/lib/openai/models/evals/create_eval_completions_run_data_source.rb +++ b/lib/openai/models/evals/create_eval_completions_run_data_source.rb @@ -37,18 +37,22 @@ class CreateEvalCompletionsRunDataSource < OpenAI::Internal::Type::BaseModel optional :sampling_params, -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::SamplingParams } # @!method initialize(source:, type:, input_messages: nil, model: nil, sampling_params: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource} for more details. - # # A CompletionsRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileID, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::StoredCompletions] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileID, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::StoredCompletions] + # Determines what populates the `item` namespace in this run's data source. # - # @param type [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Type] The type of run data source. Always `completions`. + # @param type [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Type] + # The type of run data source. Always `completions`. # - # @param input_messages [OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams] @@ -91,10 +95,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -126,9 +131,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class StoredCompletions < OpenAI::Internal::Type::BaseModel @@ -174,23 +181,30 @@ class StoredCompletions < OpenAI::Internal::Type::BaseModel optional :model, String, nil?: true # @!method initialize(created_after: nil, created_before: nil, limit: nil, metadata: nil, model: nil, type: :stored_completions) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::StoredCompletions} - # for more details. - # # A StoredCompletionsRunDataSource configuration describing a set of filters # - # @param created_after [Integer, nil] An optional Unix timestamp to filter items created after this time. + # @param created_after [Integer, nil] + # An optional Unix timestamp to filter items created after this time. # - # @param created_before [Integer, nil] An optional Unix timestamp to filter items created before this time. + # @param created_before [Integer, nil] + # An optional Unix timestamp to filter items created before this time. # - # @param limit [Integer, nil] An optional maximum number of items to return. + # @param limit [Integer, nil] + # An optional maximum number of items to return. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param model [String, nil] An optional model to filter by (e.g., 'gpt-6-astra'). + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param type [Symbol, :stored_completions] The type of source. Always `stored_completions`. + # @param model [String, nil] + # An optional model to filter by (e.g., 'gpt-6-astra'). + # + # @param type [Symbol, :stored_completions] + # The type of source. Always `stored_completions`. end # @!method self.variants @@ -249,13 +263,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -318,21 +331,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -382,15 +396,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -414,17 +426,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -479,9 +491,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -501,7 +515,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -513,7 +527,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -552,30 +566,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, response_format: nil, seed: nil, temperature: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams} for - # more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param tools [Array] A list of tools the model may call. Currently, only functions are supported as a + # @param tools [Array] + # A list of tools the model may call. Currently, only functions are supported as a + # tool. Use this to provide a list of functions the model may generate JSON inputs + # for. A max of 128 functions are supported. # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # An object specifying the format that the model must output. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -589,7 +622,7 @@ module ResponseFormat variant -> { OpenAI::ResponseFormatText } # JSON Schema response format. Used to generate structured JSON responses. - # Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). variant -> { OpenAI::ResponseFormatJSONSchema } # JSON object response format. An older method of generating JSON responses. diff --git a/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb b/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb index ec0e050c8..a7c49e488 100644 --- a/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb +++ b/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb @@ -20,9 +20,11 @@ class CreateEvalJSONLRunDataSource < OpenAI::Internal::Type::BaseModel # A JsonlRunDataSource object with that specifies a JSONL file that matches the # eval # - # @param source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource::Source::FileContent, OpenAI::Models::Evals::CreateEvalJSONLRunDataSource::Source::FileID] Determines what populates the `item` namespace in the data source. + # @param source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource::Source::FileContent, OpenAI::Models::Evals::CreateEvalJSONLRunDataSource::Source::FileID] + # Determines what populates the `item` namespace in the data source. # - # @param type [Symbol, :jsonl] The type of data source. Always `jsonl`. + # @param type [Symbol, :jsonl] + # The type of data source. Always `jsonl`. # Determines what populates the `item` namespace in the data source. # @@ -57,10 +59,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -92,9 +95,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end # @!method self.variants diff --git a/lib/openai/models/evals/eval_api_error.rb b/lib/openai/models/evals/eval_api_error.rb index 87f111229..070f58f66 100644 --- a/lib/openai/models/evals/eval_api_error.rb +++ b/lib/openai/models/evals/eval_api_error.rb @@ -19,9 +19,11 @@ class EvalAPIError < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:) # An object representing an error response from the Eval API. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. end end diff --git a/lib/openai/models/evals/run_cancel_response.rb b/lib/openai/models/evals/run_cancel_response.rb index dedc9ba0a..b6c4687ad 100644 --- a/lib/openai/models/evals/run_cancel_response.rb +++ b/lib/openai/models/evals/run_cancel_response.rb @@ -101,38 +101,54 @@ class RunCancelResponse < OpenAI::Internal::Type::BaseModel required :status, String # @!method initialize(id:, created_at:, data_source:, error:, eval_id:, metadata:, model:, name:, per_model_usage:, per_testing_criteria_results:, report_url:, result_counts:, status:, object: :"eval.run") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse} for more details. - # # A schema representing an evaluation run. # - # @param id [String] Unique identifier for the evaluation run. + # @param id [String] + # Unique identifier for the evaluation run. + # + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses] + # Information about the run's data source. # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses] Information about the run's data source. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param eval_id [String] + # The identifier of the associated evaluation. # - # @param eval_id [String] The identifier of the associated evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param model [String] The model that is evaluated, if applicable. + # @param model [String] + # The model that is evaluated, if applicable. # - # @param name [String] The name of the evaluation run. + # @param name [String] + # The name of the evaluation run. # - # @param per_model_usage [Array] Usage statistics for each model during the evaluation run. + # @param per_model_usage [Array] + # Usage statistics for each model during the evaluation run. # - # @param per_testing_criteria_results [Array] Results per testing criteria applied during the evaluation run. + # @param per_testing_criteria_results [Array] + # Results per testing criteria applied during the evaluation run. # - # @param report_url [String] The URL to the rendered evaluation run report on the UI dashboard. + # @param report_url [String] + # The URL to the rendered evaluation run report on the UI dashboard. # - # @param result_counts [OpenAI::Models::Evals::RunCancelResponse::ResultCounts] Counters summarizing the outcomes of the evaluation run. + # @param result_counts [OpenAI::Models::Evals::RunCancelResponse::ResultCounts] + # Counters summarizing the outcomes of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run"] The type of the object. Always "eval.run". + # @param object [Symbol, :"eval.run"] + # The type of the object. Always "eval.run". # Information about the run's data source. # @@ -191,21 +207,24 @@ class Responses < OpenAI::Internal::Type::BaseModel ) # @!method initialize(source:, input_messages: nil, model: nil, sampling_params: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses} for more - # details. - # # A ResponsesRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::Responses] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::Responses] + # Determines what populates the `item` namespace in this run's data source. # - # @param input_messages [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams] # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. # Determines what populates the `item` namespace in this run's data source. # @@ -249,10 +268,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -284,9 +304,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class Responses < OpenAI::Internal::Type::BaseModel @@ -336,7 +358,7 @@ class Responses < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -367,33 +389,50 @@ class Responses < OpenAI::Internal::Type::BaseModel optional :users, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(created_after: nil, created_before: nil, instructions_search: nil, metadata: nil, model: nil, reasoning_effort: nil, temperature: nil, tools: nil, top_p: nil, users: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::Source::Responses} - # for more details. - # # A EvalResponsesSource object describing a run data source configuration. # - # @param created_after [Integer, nil] Only include items created after this timestamp (inclusive). This is a query par + # @param created_after [Integer, nil] + # Only include items created after this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param created_before [Integer, nil] Only include items created before this timestamp (inclusive). This is a query pa + # @param created_before [Integer, nil] + # Only include items created before this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param instructions_search [String, nil] Optional string to search the 'instructions' field. This is a query parameter us + # @param instructions_search [String, nil] + # Optional string to search the 'instructions' field. This is a query parameter + # used to select responses. # - # @param metadata [Object, nil] Metadata filter for the responses. This is a query parameter used to select resp + # @param metadata [Object, nil] + # Metadata filter for the responses. This is a query parameter used to select + # responses. # - # @param model [String, nil] The name of the model to find responses for. This is a query parameter used to s + # @param model [String, nil] + # The name of the model to find responses for. This is a query parameter used to + # select responses. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param temperature [Float, nil] Sampling temperature. This is a query parameter used to select responses. + # @param temperature [Float, nil] + # Sampling temperature. This is a query parameter used to select responses. # - # @param tools [Array, nil] List of tool names. This is a query parameter used to select responses. + # @param tools [Array, nil] + # List of tool names. This is a query parameter used to select responses. # - # @param top_p [Float, nil] Nucleus sampling parameter. This is a query parameter used to select responses. + # @param top_p [Float, nil] + # Nucleus sampling parameter. This is a query parameter used to select responses. # - # @param users [Array, nil] List of user identifiers. This is a query parameter used to select responses. + # @param users [Array, nil] + # List of user identifiers. This is a query parameter used to select responses. # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. end # @!method self.variants @@ -443,13 +482,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -490,9 +528,11 @@ class ChatMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -532,21 +572,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -596,15 +637,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -628,17 +667,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -693,9 +732,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.name" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.name" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -715,7 +756,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -737,8 +778,8 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text, nil] optional( @@ -754,13 +795,14 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } @@ -772,23 +814,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams} - # for more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param text [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param text [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text] Configuration options for a text response from the model. Can be plain + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param tools [Array] An array of tools the model may call while generating a response. You + # The two categories of tools you can provide the model are: # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code. Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # @see OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams#text class Text < OpenAI::Internal::Type::BaseModel @@ -797,7 +865,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -817,17 +885,26 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text} - # for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. end end end @@ -874,17 +951,23 @@ class PerModelUsage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(cached_tokens:, completion_tokens:, invocation_count:, model_name:, prompt_tokens:, total_tokens:) - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param invocation_count [Integer] The number of invocations. + # @param invocation_count [Integer] + # The number of invocations. # - # @param model_name [String] The name of the model. + # @param model_name [String] + # The name of the model. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel @@ -907,11 +990,14 @@ class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel required :testing_criteria, String # @!method initialize(failed:, passed:, testing_criteria:) - # @param failed [Integer] Number of tests failed for this criteria. + # @param failed [Integer] + # Number of tests failed for this criteria. # - # @param passed [Integer] Number of tests passed for this criteria. + # @param passed [Integer] + # Number of tests passed for this criteria. # - # @param testing_criteria [String] A description of the testing criteria. + # @param testing_criteria [String] + # A description of the testing criteria. end # @see OpenAI::Models::Evals::RunCancelResponse#result_counts @@ -943,13 +1029,17 @@ class ResultCounts < OpenAI::Internal::Type::BaseModel # @!method initialize(errored:, failed:, passed:, total:) # Counters summarizing the outcomes of the evaluation run. # - # @param errored [Integer] Number of output items that resulted in an error. + # @param errored [Integer] + # Number of output items that resulted in an error. # - # @param failed [Integer] Number of output items that failed to pass the evaluation. + # @param failed [Integer] + # Number of output items that failed to pass the evaluation. # - # @param passed [Integer] Number of output items that passed the evaluation. + # @param passed [Integer] + # Number of output items that passed the evaluation. # - # @param total [Integer] Total number of executed output items. + # @param total [Integer] + # Total number of executed output items. end end end diff --git a/lib/openai/models/evals/run_create_params.rb b/lib/openai/models/evals/run_create_params.rb index 999efcf77..cc5b37e90 100644 --- a/lib/openai/models/evals/run_create_params.rb +++ b/lib/openai/models/evals/run_create_params.rb @@ -37,16 +37,21 @@ class RunCreateParams < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(eval_id:, data_source:, metadata: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams} for more details. - # # @param eval_id [String] # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource] Details about the run's data source. + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource] + # Details about the run's data source. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the run. + # @param name [String] + # The name of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -109,19 +114,22 @@ class CreateEvalResponsesRunDataSource < OpenAI::Internal::Type::BaseModel ) # @!method initialize(source:, type:, input_messages: nil, model: nil, sampling_params: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource} - # for more details. - # # A ResponsesRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::FileContent, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::FileID, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::Responses] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::FileContent, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::FileID, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::Responses] + # Determines what populates the `item` namespace in this run's data source. # - # @param type [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Type] The type of run data source. Always `responses`. + # @param type [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Type] + # The type of run data source. Always `responses`. # - # @param input_messages [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams] @@ -172,10 +180,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -207,9 +216,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class Responses < OpenAI::Internal::Type::BaseModel @@ -259,7 +270,7 @@ class Responses < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -290,33 +301,50 @@ class Responses < OpenAI::Internal::Type::BaseModel optional :users, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(created_after: nil, created_before: nil, instructions_search: nil, metadata: nil, model: nil, reasoning_effort: nil, temperature: nil, tools: nil, top_p: nil, users: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::Responses} - # for more details. - # # A EvalResponsesSource object describing a run data source configuration. # - # @param created_after [Integer, nil] Only include items created after this timestamp (inclusive). This is a query par + # @param created_after [Integer, nil] + # Only include items created after this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param created_before [Integer, nil] Only include items created before this timestamp (inclusive). This is a query pa + # @param created_before [Integer, nil] + # Only include items created before this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param instructions_search [String, nil] Optional string to search the 'instructions' field. This is a query parameter us + # @param instructions_search [String, nil] + # Optional string to search the 'instructions' field. This is a query parameter + # used to select responses. # - # @param metadata [Object, nil] Metadata filter for the responses. This is a query parameter used to select resp + # @param metadata [Object, nil] + # Metadata filter for the responses. This is a query parameter used to select + # responses. # - # @param model [String, nil] The name of the model to find responses for. This is a query parameter used to s + # @param model [String, nil] + # The name of the model to find responses for. This is a query parameter used to + # select responses. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param temperature [Float, nil] Sampling temperature. This is a query parameter used to select responses. + # @param temperature [Float, nil] + # Sampling temperature. This is a query parameter used to select responses. # - # @param tools [Array, nil] List of tool names. This is a query parameter used to select responses. + # @param tools [Array, nil] + # List of tool names. This is a query parameter used to select responses. # - # @param top_p [Float, nil] Nucleus sampling parameter. This is a query parameter used to select responses. + # @param top_p [Float, nil] + # Nucleus sampling parameter. This is a query parameter used to select responses. # - # @param users [Array, nil] List of user identifiers. This is a query parameter used to select responses. + # @param users [Array, nil] + # List of user identifiers. This is a query parameter used to select responses. # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. end # @!method self.variants @@ -382,13 +410,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -429,9 +456,11 @@ class ChatMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -471,21 +500,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -535,15 +565,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -567,17 +595,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -632,9 +660,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.name" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.name" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -654,7 +684,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -676,8 +706,8 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text, nil] optional( @@ -695,13 +725,14 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } @@ -713,23 +744,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams} - # for more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param text [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param text [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text] Configuration options for a text response from the model. Can be plain + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param tools [Array] An array of tools the model may call while generating a response. You + # The two categories of tools you can provide the model are: # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code. Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # @see OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams#text class Text < OpenAI::Internal::Type::BaseModel @@ -738,7 +795,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -758,17 +815,26 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text} - # for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. end end end diff --git a/lib/openai/models/evals/run_create_response.rb b/lib/openai/models/evals/run_create_response.rb index 8cd23ac90..967b87c51 100644 --- a/lib/openai/models/evals/run_create_response.rb +++ b/lib/openai/models/evals/run_create_response.rb @@ -101,38 +101,54 @@ class RunCreateResponse < OpenAI::Internal::Type::BaseModel required :status, String # @!method initialize(id:, created_at:, data_source:, error:, eval_id:, metadata:, model:, name:, per_model_usage:, per_testing_criteria_results:, report_url:, result_counts:, status:, object: :"eval.run") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse} for more details. - # # A schema representing an evaluation run. # - # @param id [String] Unique identifier for the evaluation run. + # @param id [String] + # Unique identifier for the evaluation run. + # + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses] + # Information about the run's data source. # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses] Information about the run's data source. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param eval_id [String] + # The identifier of the associated evaluation. # - # @param eval_id [String] The identifier of the associated evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param model [String] The model that is evaluated, if applicable. + # @param model [String] + # The model that is evaluated, if applicable. # - # @param name [String] The name of the evaluation run. + # @param name [String] + # The name of the evaluation run. # - # @param per_model_usage [Array] Usage statistics for each model during the evaluation run. + # @param per_model_usage [Array] + # Usage statistics for each model during the evaluation run. # - # @param per_testing_criteria_results [Array] Results per testing criteria applied during the evaluation run. + # @param per_testing_criteria_results [Array] + # Results per testing criteria applied during the evaluation run. # - # @param report_url [String] The URL to the rendered evaluation run report on the UI dashboard. + # @param report_url [String] + # The URL to the rendered evaluation run report on the UI dashboard. # - # @param result_counts [OpenAI::Models::Evals::RunCreateResponse::ResultCounts] Counters summarizing the outcomes of the evaluation run. + # @param result_counts [OpenAI::Models::Evals::RunCreateResponse::ResultCounts] + # Counters summarizing the outcomes of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run"] The type of the object. Always "eval.run". + # @param object [Symbol, :"eval.run"] + # The type of the object. Always "eval.run". # Information about the run's data source. # @@ -191,21 +207,24 @@ class Responses < OpenAI::Internal::Type::BaseModel ) # @!method initialize(source:, input_messages: nil, model: nil, sampling_params: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses} for more - # details. - # # A ResponsesRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::Responses] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::Responses] + # Determines what populates the `item` namespace in this run's data source. # - # @param input_messages [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams] # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. # Determines what populates the `item` namespace in this run's data source. # @@ -249,10 +268,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -284,9 +304,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class Responses < OpenAI::Internal::Type::BaseModel @@ -336,7 +358,7 @@ class Responses < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -367,33 +389,50 @@ class Responses < OpenAI::Internal::Type::BaseModel optional :users, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(created_after: nil, created_before: nil, instructions_search: nil, metadata: nil, model: nil, reasoning_effort: nil, temperature: nil, tools: nil, top_p: nil, users: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::Source::Responses} - # for more details. - # # A EvalResponsesSource object describing a run data source configuration. # - # @param created_after [Integer, nil] Only include items created after this timestamp (inclusive). This is a query par + # @param created_after [Integer, nil] + # Only include items created after this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param created_before [Integer, nil] Only include items created before this timestamp (inclusive). This is a query pa + # @param created_before [Integer, nil] + # Only include items created before this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param instructions_search [String, nil] Optional string to search the 'instructions' field. This is a query parameter us + # @param instructions_search [String, nil] + # Optional string to search the 'instructions' field. This is a query parameter + # used to select responses. # - # @param metadata [Object, nil] Metadata filter for the responses. This is a query parameter used to select resp + # @param metadata [Object, nil] + # Metadata filter for the responses. This is a query parameter used to select + # responses. # - # @param model [String, nil] The name of the model to find responses for. This is a query parameter used to s + # @param model [String, nil] + # The name of the model to find responses for. This is a query parameter used to + # select responses. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param temperature [Float, nil] Sampling temperature. This is a query parameter used to select responses. + # @param temperature [Float, nil] + # Sampling temperature. This is a query parameter used to select responses. # - # @param tools [Array, nil] List of tool names. This is a query parameter used to select responses. + # @param tools [Array, nil] + # List of tool names. This is a query parameter used to select responses. # - # @param top_p [Float, nil] Nucleus sampling parameter. This is a query parameter used to select responses. + # @param top_p [Float, nil] + # Nucleus sampling parameter. This is a query parameter used to select responses. # - # @param users [Array, nil] List of user identifiers. This is a query parameter used to select responses. + # @param users [Array, nil] + # List of user identifiers. This is a query parameter used to select responses. # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. end # @!method self.variants @@ -443,13 +482,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -490,9 +528,11 @@ class ChatMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -532,21 +572,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -596,15 +637,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -628,17 +667,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -693,9 +732,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.name" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.name" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -715,7 +756,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -737,8 +778,8 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text, nil] optional( @@ -754,13 +795,14 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } @@ -772,23 +814,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams} - # for more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param text [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param text [OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text] Configuration options for a text response from the model. Can be plain + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param tools [Array] An array of tools the model may call while generating a response. You + # The two categories of tools you can provide the model are: # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code. Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # @see OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams#text class Text < OpenAI::Internal::Type::BaseModel @@ -797,7 +865,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -817,17 +885,26 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text} - # for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. end end end @@ -874,17 +951,23 @@ class PerModelUsage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(cached_tokens:, completion_tokens:, invocation_count:, model_name:, prompt_tokens:, total_tokens:) - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param invocation_count [Integer] The number of invocations. + # @param invocation_count [Integer] + # The number of invocations. # - # @param model_name [String] The name of the model. + # @param model_name [String] + # The name of the model. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel @@ -907,11 +990,14 @@ class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel required :testing_criteria, String # @!method initialize(failed:, passed:, testing_criteria:) - # @param failed [Integer] Number of tests failed for this criteria. + # @param failed [Integer] + # Number of tests failed for this criteria. # - # @param passed [Integer] Number of tests passed for this criteria. + # @param passed [Integer] + # Number of tests passed for this criteria. # - # @param testing_criteria [String] A description of the testing criteria. + # @param testing_criteria [String] + # A description of the testing criteria. end # @see OpenAI::Models::Evals::RunCreateResponse#result_counts @@ -943,13 +1029,17 @@ class ResultCounts < OpenAI::Internal::Type::BaseModel # @!method initialize(errored:, failed:, passed:, total:) # Counters summarizing the outcomes of the evaluation run. # - # @param errored [Integer] Number of output items that resulted in an error. + # @param errored [Integer] + # Number of output items that resulted in an error. # - # @param failed [Integer] Number of output items that failed to pass the evaluation. + # @param failed [Integer] + # Number of output items that failed to pass the evaluation. # - # @param passed [Integer] Number of output items that passed the evaluation. + # @param passed [Integer] + # Number of output items that passed the evaluation. # - # @param total [Integer] Total number of executed output items. + # @param total [Integer] + # Total number of executed output items. end end end diff --git a/lib/openai/models/evals/run_list_params.rb b/lib/openai/models/evals/run_list_params.rb index 7f8b2f949..5091ebf88 100644 --- a/lib/openai/models/evals/run_list_params.rb +++ b/lib/openai/models/evals/run_list_params.rb @@ -40,18 +40,21 @@ class RunListParams < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Evals::RunListParams::Status } # @!method initialize(eval_id:, after: nil, limit: nil, order: nil, status: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListParams} for more details. - # # @param eval_id [String] # - # @param after [String] Identifier for the last run from the previous pagination request. + # @param after [String] + # Identifier for the last run from the previous pagination request. # - # @param limit [Integer] Number of runs to retrieve. + # @param limit [Integer] + # Number of runs to retrieve. # - # @param order [Symbol, OpenAI::Models::Evals::RunListParams::Order] Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for de + # @param order [Symbol, OpenAI::Models::Evals::RunListParams::Order] + # Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for + # descending order. Defaults to `asc`. # - # @param status [Symbol, OpenAI::Models::Evals::RunListParams::Status] Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` + # @param status [Symbol, OpenAI::Models::Evals::RunListParams::Status] + # Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` + # | `canceled`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/evals/run_list_response.rb b/lib/openai/models/evals/run_list_response.rb index d401da810..6fb83d8d1 100644 --- a/lib/openai/models/evals/run_list_response.rb +++ b/lib/openai/models/evals/run_list_response.rb @@ -101,38 +101,54 @@ class RunListResponse < OpenAI::Internal::Type::BaseModel required :status, String # @!method initialize(id:, created_at:, data_source:, error:, eval_id:, metadata:, model:, name:, per_model_usage:, per_testing_criteria_results:, report_url:, result_counts:, status:, object: :"eval.run") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse} for more details. - # # A schema representing an evaluation run. # - # @param id [String] Unique identifier for the evaluation run. + # @param id [String] + # Unique identifier for the evaluation run. + # + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunListResponse::DataSource::Responses] + # Information about the run's data source. # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunListResponse::DataSource::Responses] Information about the run's data source. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param eval_id [String] + # The identifier of the associated evaluation. # - # @param eval_id [String] The identifier of the associated evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param model [String] The model that is evaluated, if applicable. + # @param model [String] + # The model that is evaluated, if applicable. # - # @param name [String] The name of the evaluation run. + # @param name [String] + # The name of the evaluation run. # - # @param per_model_usage [Array] Usage statistics for each model during the evaluation run. + # @param per_model_usage [Array] + # Usage statistics for each model during the evaluation run. # - # @param per_testing_criteria_results [Array] Results per testing criteria applied during the evaluation run. + # @param per_testing_criteria_results [Array] + # Results per testing criteria applied during the evaluation run. # - # @param report_url [String] The URL to the rendered evaluation run report on the UI dashboard. + # @param report_url [String] + # The URL to the rendered evaluation run report on the UI dashboard. # - # @param result_counts [OpenAI::Models::Evals::RunListResponse::ResultCounts] Counters summarizing the outcomes of the evaluation run. + # @param result_counts [OpenAI::Models::Evals::RunListResponse::ResultCounts] + # Counters summarizing the outcomes of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run"] The type of the object. Always "eval.run". + # @param object [Symbol, :"eval.run"] + # The type of the object. Always "eval.run". # Information about the run's data source. # @@ -191,21 +207,24 @@ class Responses < OpenAI::Internal::Type::BaseModel ) # @!method initialize(source:, input_messages: nil, model: nil, sampling_params: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses} for more - # details. - # # A ResponsesRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::Responses] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::Responses] + # Determines what populates the `item` namespace in this run's data source. # - # @param input_messages [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams] # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. # Determines what populates the `item` namespace in this run's data source. # @@ -249,10 +268,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -284,9 +304,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class Responses < OpenAI::Internal::Type::BaseModel @@ -336,7 +358,7 @@ class Responses < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -367,33 +389,50 @@ class Responses < OpenAI::Internal::Type::BaseModel optional :users, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(created_after: nil, created_before: nil, instructions_search: nil, metadata: nil, model: nil, reasoning_effort: nil, temperature: nil, tools: nil, top_p: nil, users: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::Source::Responses} - # for more details. - # # A EvalResponsesSource object describing a run data source configuration. # - # @param created_after [Integer, nil] Only include items created after this timestamp (inclusive). This is a query par + # @param created_after [Integer, nil] + # Only include items created after this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param created_before [Integer, nil] Only include items created before this timestamp (inclusive). This is a query pa + # @param created_before [Integer, nil] + # Only include items created before this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param instructions_search [String, nil] Optional string to search the 'instructions' field. This is a query parameter us + # @param instructions_search [String, nil] + # Optional string to search the 'instructions' field. This is a query parameter + # used to select responses. # - # @param metadata [Object, nil] Metadata filter for the responses. This is a query parameter used to select resp + # @param metadata [Object, nil] + # Metadata filter for the responses. This is a query parameter used to select + # responses. # - # @param model [String, nil] The name of the model to find responses for. This is a query parameter used to s + # @param model [String, nil] + # The name of the model to find responses for. This is a query parameter used to + # select responses. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param temperature [Float, nil] Sampling temperature. This is a query parameter used to select responses. + # @param temperature [Float, nil] + # Sampling temperature. This is a query parameter used to select responses. # - # @param tools [Array, nil] List of tool names. This is a query parameter used to select responses. + # @param tools [Array, nil] + # List of tool names. This is a query parameter used to select responses. # - # @param top_p [Float, nil] Nucleus sampling parameter. This is a query parameter used to select responses. + # @param top_p [Float, nil] + # Nucleus sampling parameter. This is a query parameter used to select responses. # - # @param users [Array, nil] List of user identifiers. This is a query parameter used to select responses. + # @param users [Array, nil] + # List of user identifiers. This is a query parameter used to select responses. # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. end # @!method self.variants @@ -443,13 +482,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -490,9 +528,11 @@ class ChatMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -532,21 +572,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -596,15 +637,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -628,17 +667,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -693,9 +732,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.name" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.name" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -715,7 +756,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -737,8 +778,8 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text, nil] optional( @@ -754,13 +795,14 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } @@ -772,23 +814,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams} - # for more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param text [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param text [OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text] Configuration options for a text response from the model. Can be plain + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param tools [Array] An array of tools the model may call while generating a response. You + # The two categories of tools you can provide the model are: # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code. Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # @see OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams#text class Text < OpenAI::Internal::Type::BaseModel @@ -797,7 +865,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -817,17 +885,26 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text} - # for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. end end end @@ -874,17 +951,23 @@ class PerModelUsage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(cached_tokens:, completion_tokens:, invocation_count:, model_name:, prompt_tokens:, total_tokens:) - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param invocation_count [Integer] The number of invocations. + # @param invocation_count [Integer] + # The number of invocations. # - # @param model_name [String] The name of the model. + # @param model_name [String] + # The name of the model. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel @@ -907,11 +990,14 @@ class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel required :testing_criteria, String # @!method initialize(failed:, passed:, testing_criteria:) - # @param failed [Integer] Number of tests failed for this criteria. + # @param failed [Integer] + # Number of tests failed for this criteria. # - # @param passed [Integer] Number of tests passed for this criteria. + # @param passed [Integer] + # Number of tests passed for this criteria. # - # @param testing_criteria [String] A description of the testing criteria. + # @param testing_criteria [String] + # A description of the testing criteria. end # @see OpenAI::Models::Evals::RunListResponse#result_counts @@ -943,13 +1029,17 @@ class ResultCounts < OpenAI::Internal::Type::BaseModel # @!method initialize(errored:, failed:, passed:, total:) # Counters summarizing the outcomes of the evaluation run. # - # @param errored [Integer] Number of output items that resulted in an error. + # @param errored [Integer] + # Number of output items that resulted in an error. # - # @param failed [Integer] Number of output items that failed to pass the evaluation. + # @param failed [Integer] + # Number of output items that failed to pass the evaluation. # - # @param passed [Integer] Number of output items that passed the evaluation. + # @param passed [Integer] + # Number of output items that passed the evaluation. # - # @param total [Integer] Total number of executed output items. + # @param total [Integer] + # Total number of executed output items. end end end diff --git a/lib/openai/models/evals/run_retrieve_response.rb b/lib/openai/models/evals/run_retrieve_response.rb index eecb847d6..eef4dc985 100644 --- a/lib/openai/models/evals/run_retrieve_response.rb +++ b/lib/openai/models/evals/run_retrieve_response.rb @@ -101,38 +101,54 @@ class RunRetrieveResponse < OpenAI::Internal::Type::BaseModel required :status, String # @!method initialize(id:, created_at:, data_source:, error:, eval_id:, metadata:, model:, name:, per_model_usage:, per_testing_criteria_results:, report_url:, result_counts:, status:, object: :"eval.run") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse} for more details. - # # A schema representing an evaluation run. # - # @param id [String] Unique identifier for the evaluation run. + # @param id [String] + # Unique identifier for the evaluation run. + # + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses] + # Information about the run's data source. # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses] Information about the run's data source. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param eval_id [String] + # The identifier of the associated evaluation. # - # @param eval_id [String] The identifier of the associated evaluation. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param model [String] The model that is evaluated, if applicable. + # @param model [String] + # The model that is evaluated, if applicable. # - # @param name [String] The name of the evaluation run. + # @param name [String] + # The name of the evaluation run. # - # @param per_model_usage [Array] Usage statistics for each model during the evaluation run. + # @param per_model_usage [Array] + # Usage statistics for each model during the evaluation run. # - # @param per_testing_criteria_results [Array] Results per testing criteria applied during the evaluation run. + # @param per_testing_criteria_results [Array] + # Results per testing criteria applied during the evaluation run. # - # @param report_url [String] The URL to the rendered evaluation run report on the UI dashboard. + # @param report_url [String] + # The URL to the rendered evaluation run report on the UI dashboard. # - # @param result_counts [OpenAI::Models::Evals::RunRetrieveResponse::ResultCounts] Counters summarizing the outcomes of the evaluation run. + # @param result_counts [OpenAI::Models::Evals::RunRetrieveResponse::ResultCounts] + # Counters summarizing the outcomes of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run"] The type of the object. Always "eval.run". + # @param object [Symbol, :"eval.run"] + # The type of the object. Always "eval.run". # Information about the run's data source. # @@ -191,21 +207,24 @@ class Responses < OpenAI::Internal::Type::BaseModel ) # @!method initialize(source:, input_messages: nil, model: nil, sampling_params: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses} for more - # details. - # # A ResponsesRunDataSource object describing a model sampling configuration. # - # @param source [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::Responses] Determines what populates the `item` namespace in this run's data source. + # @param source [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::FileContent, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::FileID, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::Responses] + # Determines what populates the `item` namespace in this run's data source. # - # @param input_messages [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::ItemReference] Used when sampling from a model. Dictates the structure of the messages passed i + # @param input_messages [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::ItemReference] + # Used when sampling from a model. Dictates the structure of the messages passed + # into the model. Can either be a reference to a prebuilt trajectory (ie, + # `item.input_trajectory`), or a template with variable references to the `item` + # namespace. # - # @param model [String] The name of the model to use for generating completions (e.g. "o3-mini"). + # @param model [String] + # The name of the model to use for generating completions (e.g. "o3-mini"). # # @param sampling_params [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams] # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. # Determines what populates the `item` namespace in this run's data source. # @@ -252,10 +271,11 @@ class FileContent < OpenAI::Internal::Type::BaseModel required :type, const: :file_content # @!method initialize(content:, type: :file_content) - # @param content [Array] The content of the jsonl file. + # @param content [Array] + # The content of the jsonl file. # - # @param type [Symbol, :file_content] The type of jsonl source. Always `file_content`. - + # @param type [Symbol, :file_content] + # The type of jsonl source. Always `file_content`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute item # @@ -287,9 +307,11 @@ class FileID < OpenAI::Internal::Type::BaseModel required :type, const: :file_id # @!method initialize(id:, type: :file_id) - # @param id [String] The identifier of the file. + # @param id [String] + # The identifier of the file. # - # @param type [Symbol, :file_id] The type of jsonl source. Always `file_id`. + # @param type [Symbol, :file_id] + # The type of jsonl source. Always `file_id`. end class Responses < OpenAI::Internal::Type::BaseModel @@ -339,7 +361,7 @@ class Responses < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -370,33 +392,50 @@ class Responses < OpenAI::Internal::Type::BaseModel optional :users, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(created_after: nil, created_before: nil, instructions_search: nil, metadata: nil, model: nil, reasoning_effort: nil, temperature: nil, tools: nil, top_p: nil, users: nil, type: :responses) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::Source::Responses} - # for more details. - # # A EvalResponsesSource object describing a run data source configuration. # - # @param created_after [Integer, nil] Only include items created after this timestamp (inclusive). This is a query par + # @param created_after [Integer, nil] + # Only include items created after this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param created_before [Integer, nil] Only include items created before this timestamp (inclusive). This is a query pa + # @param created_before [Integer, nil] + # Only include items created before this timestamp (inclusive). This is a query + # parameter used to select responses. # - # @param instructions_search [String, nil] Optional string to search the 'instructions' field. This is a query parameter us + # @param instructions_search [String, nil] + # Optional string to search the 'instructions' field. This is a query parameter + # used to select responses. # - # @param metadata [Object, nil] Metadata filter for the responses. This is a query parameter used to select resp + # @param metadata [Object, nil] + # Metadata filter for the responses. This is a query parameter used to select + # responses. # - # @param model [String, nil] The name of the model to find responses for. This is a query parameter used to s + # @param model [String, nil] + # The name of the model to find responses for. This is a query parameter used to + # select responses. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param temperature [Float, nil] Sampling temperature. This is a query parameter used to select responses. + # @param temperature [Float, nil] + # Sampling temperature. This is a query parameter used to select responses. # - # @param tools [Array, nil] List of tool names. This is a query parameter used to select responses. + # @param tools [Array, nil] + # List of tool names. This is a query parameter used to select responses. # - # @param top_p [Float, nil] Nucleus sampling parameter. This is a query parameter used to select responses. + # @param top_p [Float, nil] + # Nucleus sampling parameter. This is a query parameter used to select responses. # - # @param users [Array, nil] List of user identifiers. This is a query parameter used to select responses. + # @param users [Array, nil] + # List of user identifiers. This is a query parameter used to select responses. # - # @param type [Symbol, :responses] The type of run data source. Always `responses`. + # @param type [Symbol, :responses] + # The type of run data source. Always `responses`. end # @!method self.variants @@ -446,13 +485,12 @@ class Template < OpenAI::Internal::Type::BaseModel required :type, const: :template # @!method initialize(template:, type: :template) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template} - # for more details. - # - # @param template [Array] A list of chat messages forming the prompt or context. May include variable refe + # @param template [Array] + # A list of chat messages forming the prompt or context. May include variable + # references to the `item` namespace, ie {{item.name}}. # - # @param type [Symbol, :template] The type of input messages. Always `template`. + # @param type [Symbol, :template] + # The type of input messages. Always `template`. # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take @@ -493,9 +531,11 @@ class ChatMessage < OpenAI::Internal::Type::BaseModel required :role, String # @!method initialize(content:, role:) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end class EvalItem < OpenAI::Internal::Type::BaseModel @@ -535,21 +575,22 @@ class EvalItem < OpenAI::Internal::Type::BaseModel ) # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem} - # for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -599,15 +640,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::OutputText} - # for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -631,17 +670,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::InputMessages::Template::Template::EvalItem::Content::InputImage} - # for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -696,9 +735,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel required :type, const: :item_reference # @!method initialize(item_reference:, type: :item_reference) - # @param item_reference [String] A reference to a variable in the `item` namespace. Ie, "item.name" + # @param item_reference [String] + # A reference to a variable in the `item` namespace. Ie, "item.name" # - # @param type [Symbol, :item_reference] The type of input messages. Always `item_reference`. + # @param type [Symbol, :item_reference] + # The type of input messages. Always `item_reference`. end # @!method self.variants @@ -718,7 +759,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -740,8 +781,8 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text, nil] optional( @@ -757,13 +798,14 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Array, nil] optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] } @@ -775,23 +817,49 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float # @!method initialize(max_completion_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, text: nil, tools: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams} - # for more details. + # @param max_completion_tokens [Integer] + # The maximum number of tokens in the generated output. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param max_completion_tokens [Integer] The maximum number of tokens in the generated output. + # @param seed [Integer] + # A seed value to initialize the randomness, during sampling. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param temperature [Float] + # A higher temperature increases randomness in the outputs. # - # @param seed [Integer] A seed value to initialize the randomness, during sampling. + # @param text [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param temperature [Float] A higher temperature increases randomness in the outputs. + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param text [OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text] Configuration options for a text response from the model. Can be plain + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param tools [Array] An array of tools the model may call while generating a response. You + # The two categories of tools you can provide the model are: # - # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code. Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_p [Float] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. # @see OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams#text class Text < OpenAI::Internal::Type::BaseModel @@ -800,7 +868,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -820,17 +888,26 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text} - # for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. end end end @@ -877,17 +954,23 @@ class PerModelUsage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(cached_tokens:, completion_tokens:, invocation_count:, model_name:, prompt_tokens:, total_tokens:) - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param invocation_count [Integer] The number of invocations. + # @param invocation_count [Integer] + # The number of invocations. # - # @param model_name [String] The name of the model. + # @param model_name [String] + # The name of the model. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel @@ -910,11 +993,14 @@ class PerTestingCriteriaResult < OpenAI::Internal::Type::BaseModel required :testing_criteria, String # @!method initialize(failed:, passed:, testing_criteria:) - # @param failed [Integer] Number of tests failed for this criteria. + # @param failed [Integer] + # Number of tests failed for this criteria. # - # @param passed [Integer] Number of tests passed for this criteria. + # @param passed [Integer] + # Number of tests passed for this criteria. # - # @param testing_criteria [String] A description of the testing criteria. + # @param testing_criteria [String] + # A description of the testing criteria. end # @see OpenAI::Models::Evals::RunRetrieveResponse#result_counts @@ -946,13 +1032,17 @@ class ResultCounts < OpenAI::Internal::Type::BaseModel # @!method initialize(errored:, failed:, passed:, total:) # Counters summarizing the outcomes of the evaluation run. # - # @param errored [Integer] Number of output items that resulted in an error. + # @param errored [Integer] + # Number of output items that resulted in an error. # - # @param failed [Integer] Number of output items that failed to pass the evaluation. + # @param failed [Integer] + # Number of output items that failed to pass the evaluation. # - # @param passed [Integer] Number of output items that passed the evaluation. + # @param passed [Integer] + # Number of output items that passed the evaluation. # - # @param total [Integer] Total number of executed output items. + # @param total [Integer] + # Total number of executed output items. end end end diff --git a/lib/openai/models/evals/runs/output_item_list_params.rb b/lib/openai/models/evals/runs/output_item_list_params.rb index c1a8e5520..b0fb054a5 100644 --- a/lib/openai/models/evals/runs/output_item_list_params.rb +++ b/lib/openai/models/evals/runs/output_item_list_params.rb @@ -46,20 +46,23 @@ class OutputItemListParams < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Evals::Runs::OutputItemListParams::Status } # @!method initialize(eval_id:, run_id:, after: nil, limit: nil, order: nil, status: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::Runs::OutputItemListParams} for more details. - # # @param eval_id [String] # # @param run_id [String] # - # @param after [String] Identifier for the last output item from the previous pagination request. + # @param after [String] + # Identifier for the last output item from the previous pagination request. # - # @param limit [Integer] Number of output items to retrieve. + # @param limit [Integer] + # Number of output items to retrieve. # - # @param order [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Order] Sort order for output items by timestamp. Use `asc` for ascending order or `desc + # @param order [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Order] + # Sort order for output items by timestamp. Use `asc` for ascending order or + # `desc` for descending order. Defaults to `asc`. # - # @param status [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Status] Filter output items by status. Use `failed` to filter by failed output + # @param status [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Status] + # Filter output items by status. Use `failed` to filter by failed output items or + # `pass` to filter by passed output items. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/evals/runs/output_item_list_response.rb b/lib/openai/models/evals/runs/output_item_list_response.rb index 6f56b675f..8309741b6 100644 --- a/lib/openai/models/evals/runs/output_item_list_response.rb +++ b/lib/openai/models/evals/runs/output_item_list_response.rb @@ -72,26 +72,35 @@ class OutputItemListResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, datasource_item:, datasource_item_id:, eval_id:, results:, run_id:, sample:, status:, object: :"eval.run.output_item") # A schema representing an evaluation run output item. # - # @param id [String] Unique identifier for the evaluation run output item. + # @param id [String] + # Unique identifier for the evaluation run output item. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param datasource_item [Hash{Symbol=>Object}] Details of the input data source item. + # @param datasource_item [Hash{Symbol=>Object}] + # Details of the input data source item. # - # @param datasource_item_id [Integer] The identifier for the data source item. + # @param datasource_item_id [Integer] + # The identifier for the data source item. # - # @param eval_id [String] The identifier of the evaluation group. + # @param eval_id [String] + # The identifier of the evaluation group. # - # @param results [Array] A list of grader results for this output item. + # @param results [Array] + # A list of grader results for this output item. # - # @param run_id [String] The identifier of the evaluation run associated with this output item. + # @param run_id [String] + # The identifier of the evaluation run associated with this output item. # - # @param sample [OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample] A sample containing the input and output of the evaluation run. + # @param sample [OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample] + # A sample containing the input and output of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run.output_item"] The type of the object. Always "eval.run.output_item". - + # @param object [Symbol, :"eval.run.output_item"] + # The type of the object. Always "eval.run.output_item". class Result < OpenAI::Internal::Type::BaseModel # @!attribute name # The name of the grader. @@ -126,15 +135,20 @@ class Result < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, passed:, score:, sample: nil, type: nil) # A single grader result for an evaluation run output item. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param passed [Boolean] Whether the grader considered the output a pass. + # @param passed [Boolean] + # Whether the grader considered the output a pass. # - # @param score [Float] The numeric score produced by the grader. + # @param score [Float] + # The numeric score produced by the grader. # - # @param sample [Hash{Symbol=>Object}, nil] Optional sample or intermediate data produced by the grader. + # @param sample [Hash{Symbol=>Object}, nil] + # Optional sample or intermediate data produced by the grader. # - # @param type [String] The grader type (for example, "string-check-grader"). + # @param type [String] + # The grader type (for example, "string-check-grader"). end # @see OpenAI::Models::Evals::Runs::OutputItemListResponse#sample @@ -210,31 +224,37 @@ class Sample < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample::Usage } # @!method initialize(error:, finish_reason:, input:, max_completion_tokens:, model:, output:, seed:, temperature:, top_p:, usage:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample} for more details. - # # A sample containing the input and output of the evaluation run. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param finish_reason [String] The reason why the sample generation was finished. + # @param finish_reason [String] + # The reason why the sample generation was finished. # - # @param input [Array] An array of input messages. + # @param input [Array] + # An array of input messages. # - # @param max_completion_tokens [Integer] The maximum number of tokens allowed for completion. + # @param max_completion_tokens [Integer] + # The maximum number of tokens allowed for completion. # - # @param model [String] The model used for generating the sample. + # @param model [String] + # The model used for generating the sample. # - # @param output [Array] An array of output messages. + # @param output [Array] + # An array of output messages. # - # @param seed [Integer] The seed used for generating the sample. + # @param seed [Integer] + # The seed used for generating the sample. # - # @param temperature [Float] The sampling temperature used. + # @param temperature [Float] + # The sampling temperature used. # - # @param top_p [Float] The top_p value used for sampling. + # @param top_p [Float] + # The top_p value used for sampling. # - # @param usage [OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample::Usage] Token usage details for the sample. - + # @param usage [OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample::Usage] + # Token usage details for the sample. class Input < OpenAI::Internal::Type::BaseModel # @!attribute content # The content of the message. @@ -251,9 +271,11 @@ class Input < OpenAI::Internal::Type::BaseModel # @!method initialize(content:, role:) # An input message. # - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message sender (e.g., system, user, developer). + # @param role [String] + # The role of the message sender (e.g., system, user, developer). end class Output < OpenAI::Internal::Type::BaseModel @@ -270,9 +292,11 @@ class Output < OpenAI::Internal::Type::BaseModel optional :role, String # @!method initialize(content: nil, role: nil) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end # @see OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample#usage @@ -304,13 +328,17 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(cached_tokens:, completion_tokens:, prompt_tokens:, total_tokens:) # Token usage details for the sample. # - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end end end diff --git a/lib/openai/models/evals/runs/output_item_retrieve_response.rb b/lib/openai/models/evals/runs/output_item_retrieve_response.rb index 682adf0d6..6ec350de8 100644 --- a/lib/openai/models/evals/runs/output_item_retrieve_response.rb +++ b/lib/openai/models/evals/runs/output_item_retrieve_response.rb @@ -72,26 +72,35 @@ class OutputItemRetrieveResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, datasource_item:, datasource_item_id:, eval_id:, results:, run_id:, sample:, status:, object: :"eval.run.output_item") # A schema representing an evaluation run output item. # - # @param id [String] Unique identifier for the evaluation run output item. + # @param id [String] + # Unique identifier for the evaluation run output item. # - # @param created_at [Integer] Unix timestamp (in seconds) when the evaluation run was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the evaluation run was created. # - # @param datasource_item [Hash{Symbol=>Object}] Details of the input data source item. + # @param datasource_item [Hash{Symbol=>Object}] + # Details of the input data source item. # - # @param datasource_item_id [Integer] The identifier for the data source item. + # @param datasource_item_id [Integer] + # The identifier for the data source item. # - # @param eval_id [String] The identifier of the evaluation group. + # @param eval_id [String] + # The identifier of the evaluation group. # - # @param results [Array] A list of grader results for this output item. + # @param results [Array] + # A list of grader results for this output item. # - # @param run_id [String] The identifier of the evaluation run associated with this output item. + # @param run_id [String] + # The identifier of the evaluation run associated with this output item. # - # @param sample [OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample] A sample containing the input and output of the evaluation run. + # @param sample [OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample] + # A sample containing the input and output of the evaluation run. # - # @param status [String] The status of the evaluation run. + # @param status [String] + # The status of the evaluation run. # - # @param object [Symbol, :"eval.run.output_item"] The type of the object. Always "eval.run.output_item". - + # @param object [Symbol, :"eval.run.output_item"] + # The type of the object. Always "eval.run.output_item". class Result < OpenAI::Internal::Type::BaseModel # @!attribute name # The name of the grader. @@ -126,15 +135,20 @@ class Result < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, passed:, score:, sample: nil, type: nil) # A single grader result for an evaluation run output item. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param passed [Boolean] Whether the grader considered the output a pass. + # @param passed [Boolean] + # Whether the grader considered the output a pass. # - # @param score [Float] The numeric score produced by the grader. + # @param score [Float] + # The numeric score produced by the grader. # - # @param sample [Hash{Symbol=>Object}, nil] Optional sample or intermediate data produced by the grader. + # @param sample [Hash{Symbol=>Object}, nil] + # Optional sample or intermediate data produced by the grader. # - # @param type [String] The grader type (for example, "string-check-grader"). + # @param type [String] + # The grader type (for example, "string-check-grader"). end # @see OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse#sample @@ -210,32 +224,37 @@ class Sample < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample::Usage } # @!method initialize(error:, finish_reason:, input:, max_completion_tokens:, model:, output:, seed:, temperature:, top_p:, usage:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample} for more - # details. - # # A sample containing the input and output of the evaluation run. # - # @param error [OpenAI::Models::Evals::EvalAPIError] An object representing an error response from the Eval API. + # @param error [OpenAI::Models::Evals::EvalAPIError] + # An object representing an error response from the Eval API. # - # @param finish_reason [String] The reason why the sample generation was finished. + # @param finish_reason [String] + # The reason why the sample generation was finished. # - # @param input [Array] An array of input messages. + # @param input [Array] + # An array of input messages. # - # @param max_completion_tokens [Integer] The maximum number of tokens allowed for completion. + # @param max_completion_tokens [Integer] + # The maximum number of tokens allowed for completion. # - # @param model [String] The model used for generating the sample. + # @param model [String] + # The model used for generating the sample. # - # @param output [Array] An array of output messages. + # @param output [Array] + # An array of output messages. # - # @param seed [Integer] The seed used for generating the sample. + # @param seed [Integer] + # The seed used for generating the sample. # - # @param temperature [Float] The sampling temperature used. + # @param temperature [Float] + # The sampling temperature used. # - # @param top_p [Float] The top_p value used for sampling. + # @param top_p [Float] + # The top_p value used for sampling. # - # @param usage [OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample::Usage] Token usage details for the sample. - + # @param usage [OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample::Usage] + # Token usage details for the sample. class Input < OpenAI::Internal::Type::BaseModel # @!attribute content # The content of the message. @@ -252,9 +271,11 @@ class Input < OpenAI::Internal::Type::BaseModel # @!method initialize(content:, role:) # An input message. # - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message sender (e.g., system, user, developer). + # @param role [String] + # The role of the message sender (e.g., system, user, developer). end class Output < OpenAI::Internal::Type::BaseModel @@ -271,9 +292,11 @@ class Output < OpenAI::Internal::Type::BaseModel optional :role, String # @!method initialize(content: nil, role: nil) - # @param content [String] The content of the message. + # @param content [String] + # The content of the message. # - # @param role [String] The role of the message (e.g. "system", "assistant", "user"). + # @param role [String] + # The role of the message (e.g. "system", "assistant", "user"). end # @see OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample#usage @@ -305,13 +328,17 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(cached_tokens:, completion_tokens:, prompt_tokens:, total_tokens:) # Token usage details for the sample. # - # @param cached_tokens [Integer] The number of tokens retrieved from cache. + # @param cached_tokens [Integer] + # The number of tokens retrieved from cache. # - # @param completion_tokens [Integer] The number of completion tokens generated. + # @param completion_tokens [Integer] + # The number of completion tokens generated. # - # @param prompt_tokens [Integer] The number of prompt tokens used. + # @param prompt_tokens [Integer] + # The number of prompt tokens used. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. end end end diff --git a/lib/openai/models/file_create_params.rb b/lib/openai/models/file_create_params.rb index f1538d5ba..093fce0a6 100644 --- a/lib/openai/models/file_create_params.rb +++ b/lib/openai/models/file_create_params.rb @@ -38,14 +38,26 @@ class FileCreateParams < OpenAI::Internal::Type::BaseModel optional :expires_after, -> { OpenAI::FileCreateParams::ExpiresAfter } # @!method initialize(file:, purpose:, expires_after: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileCreateParams} for more details. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The File object (not file name) to be uploaded. # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of: + # @param purpose [Symbol, OpenAI::Models::FilePurpose] + # The intended purpose of the uploaded file. One of: # - # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire + # - `assistants`: Used in the Assistants API + # - `batch`: Used in the Batch API + # - `fine-tune`: Used for fine-tuning + # - `vision`: Images used for vision fine-tuning + # - `user_data`: Flexible file type for any purpose + # - `evals`: Used for eval data sets + # + # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] + # The expiration policy for a file. By default, files with `purpose=batch` expire + # after 30 days and all other files are persisted until they are manually deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -65,15 +77,16 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :seconds, Integer # @!method initialize(seconds:, anchor: :created_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileCreateParams::ExpiresAfter} for more details. - # # The expiration policy for a file. By default, files with `purpose=batch` expire # after 30 days and all other files are persisted until they are manually deleted. # - # @param seconds [Integer] The number of seconds after the anchor time that the file will expire. Must be b + # @param seconds [Integer] + # The number of seconds after the anchor time that the file will expire. Must be + # between 3600 (1 hour) and 2592000 (30 days). # - # @param anchor [Symbol, :created_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :created_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `created_at`. end end end diff --git a/lib/openai/models/file_list_params.rb b/lib/openai/models/file_list_params.rb index 193eebacf..b133c9b55 100644 --- a/lib/openai/models/file_list_params.rb +++ b/lib/openai/models/file_list_params.rb @@ -37,16 +37,22 @@ class FileListParams < OpenAI::Internal::Type::BaseModel optional :purpose, String # @!method initialize(after: nil, limit: nil, order: nil, purpose: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 10,000, and the default is 10,000. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param order [Symbol, OpenAI::Models::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # - # @param order [Symbol, OpenAI::Models::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord - # - # @param purpose [String] Only return files with the given purpose. + # @param purpose [String] + # Only return files with the given purpose. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/file_object.rb b/lib/openai/models/file_object.rb index 6efe2e16e..1a279f6f5 100644 --- a/lib/openai/models/file_object.rb +++ b/lib/openai/models/file_object.rb @@ -67,28 +67,38 @@ class FileObject < OpenAI::Internal::Type::BaseModel optional :status_details, String # @!method initialize(id:, bytes:, created_at:, filename:, purpose:, status:, expires_at: nil, status_details: nil, object: :file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileObject} for more details. - # # The `File` object represents a document that has been uploaded to OpenAI. # - # @param id [String] The file identifier, which can be referenced in the API endpoints. + # @param id [String] + # The file identifier, which can be referenced in the API endpoints. # - # @param bytes [Integer] The size of the file, in bytes. + # @param bytes [Integer] + # The size of the file, in bytes. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the file was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the file was created. # - # @param filename [String] The name of the file. + # @param filename [String] + # The name of the file. # - # @param purpose [Symbol, OpenAI::Models::FileObject::Purpose] The intended purpose of the file. Supported values are `assistants`, `assistants + # @param purpose [Symbol, OpenAI::Models::FileObject::Purpose] + # The intended purpose of the file. Supported values are `assistants`, + # `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, + # `vision`, and `user_data`. # - # @param status [Symbol, OpenAI::Models::FileObject::Status] Deprecated. The current status of the file, which can be either `uploaded`, `pro + # @param status [Symbol, OpenAI::Models::FileObject::Status] + # Deprecated. The current status of the file, which can be either `uploaded`, + # `processed`, or `error`. # - # @param expires_at [Integer] The Unix timestamp (in seconds) for when the file will expire. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) for when the file will expire. # - # @param status_details [String] Deprecated. For details on why a fine-tuning training file failed validation, se + # @param status_details [String] + # Deprecated. For details on why a fine-tuning training file failed validation, + # see the `error` field on `fine_tuning.job`. # - # @param object [Symbol, :file] The object type, which is always `file`. + # @param object [Symbol, :file] + # The object type, which is always `file`. # The intended purpose of the file. Supported values are `assistants`, # `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, diff --git a/lib/openai/models/fine_tuning/alpha/grader_run_params.rb b/lib/openai/models/fine_tuning/alpha/grader_run_params.rb index 152ac2a1e..2f77ff06c 100644 --- a/lib/openai/models/fine_tuning/alpha/grader_run_params.rb +++ b/lib/openai/models/fine_tuning/alpha/grader_run_params.rb @@ -18,9 +18,9 @@ class GraderRunParams < OpenAI::Internal::Type::BaseModel # @!attribute model_sample # The model sample to be evaluated. This value will be used to populate the # `sample` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. - # The `output_json` variable will be populated if the model sample is a valid JSON - # string. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. # # @return [String] required :model_sample, String @@ -28,20 +28,28 @@ class GraderRunParams < OpenAI::Internal::Type::BaseModel # @!attribute item # The dataset item provided to the grader. This will be used to populate the # `item` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. # # @return [Object, nil] optional :item, OpenAI::Internal::Type::Unknown # @!method initialize(grader:, model_sample:, item: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Alpha::GraderRunParams} for more details. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param model_sample [String] + # The model sample to be evaluated. This value will be used to populate the + # `sample` namespace. See + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. # - # @param model_sample [String] The model sample to be evaluated. This value will be used to populate - # - # @param item [Object] The dataset item provided to the grader. This will be used to populate + # @param item [Object] + # The dataset item provided to the grader. This will be used to populate the + # `item` namespace. See + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/fine_tuning/alpha/grader_validate_params.rb b/lib/openai/models/fine_tuning/alpha/grader_validate_params.rb index fb0650a03..3244c4008 100644 --- a/lib/openai/models/fine_tuning/alpha/grader_validate_params.rb +++ b/lib/openai/models/fine_tuning/alpha/grader_validate_params.rb @@ -16,7 +16,8 @@ class GraderValidateParams < OpenAI::Internal::Type::BaseModel required :grader, union: -> { OpenAI::FineTuning::Alpha::GraderValidateParams::Grader } # @!method initialize(grader:, request_options: {}) - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/fine_tuning/alpha/grader_validate_response.rb b/lib/openai/models/fine_tuning/alpha/grader_validate_response.rb index 9d7458fcb..71c388339 100644 --- a/lib/openai/models/fine_tuning/alpha/grader_validate_response.rb +++ b/lib/openai/models/fine_tuning/alpha/grader_validate_response.rb @@ -13,7 +13,8 @@ class GraderValidateResponse < OpenAI::Internal::Type::BaseModel optional :grader, union: -> { OpenAI::Models::FineTuning::Alpha::GraderValidateResponse::Grader } # @!method initialize(grader: nil) - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # The grader used for the fine-tuning job. # diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_create_params.rb b/lib/openai/models/fine_tuning/checkpoints/permission_create_params.rb index d8a178bf0..5418a9a3b 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_create_params.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_create_params.rb @@ -23,7 +23,8 @@ class PermissionCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuned_model_checkpoint:, project_ids:, request_options: {}) # @param fine_tuned_model_checkpoint [String] # - # @param project_ids [Array] The project identifiers to grant access to. + # @param project_ids [Array] + # The project identifiers to grant access to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_create_response.rb b/lib/openai/models/fine_tuning/checkpoints/permission_create_response.rb index efe00e34c..501b40e7e 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_create_response.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_create_response.rb @@ -34,13 +34,17 @@ class PermissionCreateResponse < OpenAI::Internal::Type::BaseModel # The `checkpoint.permission` object represents a permission for a fine-tuned # model checkpoint. # - # @param id [String] The permission identifier, which can be referenced in the API endpoints. + # @param id [String] + # The permission identifier, which can be referenced in the API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the permission was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the permission was created. # - # @param project_id [String] The project identifier that the permission is for. + # @param project_id [String] + # The project identifier that the permission is for. # - # @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission". + # @param object [Symbol, :"checkpoint.permission"] + # The object type, which is always "checkpoint.permission". end end end diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_delete_response.rb b/lib/openai/models/fine_tuning/checkpoints/permission_delete_response.rb index 483d46649..dc32f081e 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_delete_response.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_delete_response.rb @@ -25,11 +25,14 @@ class PermissionDeleteResponse < OpenAI::Internal::Type::BaseModel required :object, const: :"checkpoint.permission" # @!method initialize(id:, deleted:, object: :"checkpoint.permission") - # @param id [String] The ID of the fine-tuned model checkpoint permission that was deleted. + # @param id [String] + # The ID of the fine-tuned model checkpoint permission that was deleted. # - # @param deleted [Boolean] Whether the fine-tuned model checkpoint permission was successfully deleted. + # @param deleted [Boolean] + # Whether the fine-tuned model checkpoint permission was successfully deleted. # - # @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission". + # @param object [Symbol, :"checkpoint.permission"] + # The object type, which is always "checkpoint.permission". end end end diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_list_params.rb b/lib/openai/models/fine_tuning/checkpoints/permission_list_params.rb index b6f34e5cb..41fe16272 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_list_params.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_list_params.rb @@ -41,13 +41,17 @@ class PermissionListParams < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuned_model_checkpoint:, after: nil, limit: nil, order: nil, project_id: nil, request_options: {}) # @param fine_tuned_model_checkpoint [String] # - # @param after [String] Identifier for the last permission ID from the previous pagination request. + # @param after [String] + # Identifier for the last permission ID from the previous pagination request. # - # @param limit [Integer] Number of permissions to retrieve. + # @param limit [Integer] + # Number of permissions to retrieve. # - # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionListParams::Order] The order in which to retrieve permissions. + # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionListParams::Order] + # The order in which to retrieve permissions. # - # @param project_id [String] The ID of the project to get permissions for. + # @param project_id [String] + # The ID of the project to get permissions for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_list_response.rb b/lib/openai/models/fine_tuning/checkpoints/permission_list_response.rb index 0e321b9e7..aeee92484 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_list_response.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_list_response.rb @@ -34,13 +34,17 @@ class PermissionListResponse < OpenAI::Internal::Type::BaseModel # The `checkpoint.permission` object represents a permission for a fine-tuned # model checkpoint. # - # @param id [String] The permission identifier, which can be referenced in the API endpoints. + # @param id [String] + # The permission identifier, which can be referenced in the API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the permission was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the permission was created. # - # @param project_id [String] The project identifier that the permission is for. + # @param project_id [String] + # The project identifier that the permission is for. # - # @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission". + # @param object [Symbol, :"checkpoint.permission"] + # The object type, which is always "checkpoint.permission". end end end diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rb b/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rb index c2bb82164..6492b0c9e 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rb @@ -41,13 +41,17 @@ class PermissionRetrieveParams < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuned_model_checkpoint:, after: nil, limit: nil, order: nil, project_id: nil, request_options: {}) # @param fine_tuned_model_checkpoint [String] # - # @param after [String] Identifier for the last permission ID from the previous pagination request. + # @param after [String] + # Identifier for the last permission ID from the previous pagination request. # - # @param limit [Integer] Number of permissions to retrieve. + # @param limit [Integer] + # Number of permissions to retrieve. # - # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams::Order] The order in which to retrieve permissions. + # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams::Order] + # The order in which to retrieve permissions. # - # @param project_id [String] The ID of the project to get permissions for. + # @param project_id [String] + # The ID of the project to get permissions for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb b/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb index 82a57890b..da80044eb 100644 --- a/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb +++ b/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb @@ -72,13 +72,17 @@ class Data < OpenAI::Internal::Type::BaseModel # The `checkpoint.permission` object represents a permission for a fine-tuned # model checkpoint. # - # @param id [String] The permission identifier, which can be referenced in the API endpoints. + # @param id [String] + # The permission identifier, which can be referenced in the API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the permission was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the permission was created. # - # @param project_id [String] The project identifier that the permission is for. + # @param project_id [String] + # The project identifier that the permission is for. # - # @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission". + # @param object [Symbol, :"checkpoint.permission"] + # The object type, which is always "checkpoint.permission". end end end diff --git a/lib/openai/models/fine_tuning/dpo_hyperparameters.rb b/lib/openai/models/fine_tuning/dpo_hyperparameters.rb index a1cf3dba8..46d1d479f 100644 --- a/lib/openai/models/fine_tuning/dpo_hyperparameters.rb +++ b/lib/openai/models/fine_tuning/dpo_hyperparameters.rb @@ -36,18 +36,23 @@ class DpoHyperparameters < OpenAI::Internal::Type::BaseModel optional :n_epochs, union: -> { OpenAI::FineTuning::DpoHyperparameters::NEpochs } # @!method initialize(batch_size: nil, beta: nil, learning_rate_multiplier: nil, n_epochs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::DpoHyperparameters} for more details. - # # The hyperparameters used for the DPO fine-tuning job. # - # @param batch_size [Symbol, :auto, Integer] Number of examples in each batch. A larger batch size means that model parameter + # @param batch_size [Symbol, :auto, Integer] + # Number of examples in each batch. A larger batch size means that model + # parameters are updated less frequently, but with lower variance. # - # @param beta [Symbol, :auto, Float] The beta value for the DPO method. A higher beta value will increase the weight + # @param beta [Symbol, :auto, Float] + # The beta value for the DPO method. A higher beta value will increase the weight + # of the penalty between the policy and reference model. # - # @param learning_rate_multiplier [Symbol, :auto, Float] Scaling factor for the learning rate. A smaller learning rate may be useful to a + # @param learning_rate_multiplier [Symbol, :auto, Float] + # Scaling factor for the learning rate. A smaller learning rate may be useful to + # avoid overfitting. # - # @param n_epochs [Symbol, :auto, Integer] The number of epochs to train the model for. An epoch refers to one full cycle t + # @param n_epochs [Symbol, :auto, Integer] + # The number of epochs to train the model for. An epoch refers to one full cycle + # through the training dataset. # Number of examples in each batch. A larger batch size means that model # parameters are updated less frequently, but with lower variance. diff --git a/lib/openai/models/fine_tuning/dpo_method.rb b/lib/openai/models/fine_tuning/dpo_method.rb index 57bfe3061..781e65fa8 100644 --- a/lib/openai/models/fine_tuning/dpo_method.rb +++ b/lib/openai/models/fine_tuning/dpo_method.rb @@ -13,7 +13,8 @@ class DpoMethod < OpenAI::Internal::Type::BaseModel # @!method initialize(hyperparameters: nil) # Configuration for the DPO fine-tuning method. # - # @param hyperparameters [OpenAI::Models::FineTuning::DpoHyperparameters] The hyperparameters used for the DPO fine-tuning job. + # @param hyperparameters [OpenAI::Models::FineTuning::DpoHyperparameters] + # The hyperparameters used for the DPO fine-tuning job. end end end diff --git a/lib/openai/models/fine_tuning/fine_tuning_job.rb b/lib/openai/models/fine_tuning/fine_tuning_job.rb index 815412643..a761fbc98 100644 --- a/lib/openai/models/fine_tuning/fine_tuning_job.rb +++ b/lib/openai/models/fine_tuning/fine_tuning_job.rb @@ -66,7 +66,7 @@ class FineTuningJob < OpenAI::Internal::Type::BaseModel # @!attribute result_files # The compiled results file ID(s) for the fine-tuning job. You can retrieve the # results with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # # @return [Array] required :result_files, OpenAI::Internal::Type::ArrayOf[String] @@ -93,7 +93,7 @@ class FineTuningJob < OpenAI::Internal::Type::BaseModel # @!attribute training_file # The file ID used for training. You can retrieve the training data with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # # @return [String] required :training_file, String @@ -101,7 +101,7 @@ class FineTuningJob < OpenAI::Internal::Type::BaseModel # @!attribute validation_file # The file ID used for validation. You can retrieve the validation results with # the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # # @return [String, nil] required :validation_file, String, nil?: true @@ -143,49 +143,82 @@ class FineTuningJob < OpenAI::Internal::Type::BaseModel optional :method_, -> { OpenAI::FineTuning::FineTuningJob::Method }, api_name: :method # @!method initialize(id:, created_at:, error:, fine_tuned_model:, finished_at:, hyperparameters:, model:, organization_id:, result_files:, seed:, status:, trained_tokens:, training_file:, validation_file:, estimated_finish: nil, integrations: nil, metadata: nil, method_: nil, object: :"fine_tuning.job") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::FineTuningJob} for more details. - # # The `fine_tuning.job` object represents a fine-tuning job that has been created # through the API. # - # @param id [String] The object identifier, which can be referenced in the API endpoints. + # @param id [String] + # The object identifier, which can be referenced in the API endpoints. + # + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the fine-tuning job was created. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the fine-tuning job was created. + # @param error [OpenAI::Models::FineTuning::FineTuningJob::Error, nil] + # For fine-tuning jobs that have `failed`, this will contain more information on + # the cause of the failure. # - # @param error [OpenAI::Models::FineTuning::FineTuningJob::Error, nil] For fine-tuning jobs that have `failed`, this will contain more information on t + # @param fine_tuned_model [String, nil] + # The name of the fine-tuned model that is being created. The value will be null + # if the fine-tuning job is still running. # - # @param fine_tuned_model [String, nil] The name of the fine-tuned model that is being created. The value will be null i + # @param finished_at [Integer, nil] + # The Unix timestamp (in seconds) for when the fine-tuning job was finished. The + # value will be null if the fine-tuning job is still running. # - # @param finished_at [Integer, nil] The Unix timestamp (in seconds) for when the fine-tuning job was finished. The v + # @param hyperparameters [OpenAI::Models::FineTuning::FineTuningJob::Hyperparameters] + # The hyperparameters used for the fine-tuning job. This value will only be + # returned when running `supervised` jobs. # - # @param hyperparameters [OpenAI::Models::FineTuning::FineTuningJob::Hyperparameters] The hyperparameters used for the fine-tuning job. This value will only be return + # @param model [String] + # The base model that is being fine-tuned. # - # @param model [String] The base model that is being fine-tuned. + # @param organization_id [String] + # The organization that owns the fine-tuning job. # - # @param organization_id [String] The organization that owns the fine-tuning job. + # @param result_files [Array] + # The compiled results file ID(s) for the fine-tuning job. You can retrieve the + # results with the + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # - # @param result_files [Array] The compiled results file ID(s) for the fine-tuning job. You can retrieve the re + # @param seed [Integer] + # The seed used for the fine-tuning job. # - # @param seed [Integer] The seed used for the fine-tuning job. + # @param status [Symbol, OpenAI::Models::FineTuning::FineTuningJob::Status] + # The current status of the fine-tuning job, which can be either + # `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. # - # @param status [Symbol, OpenAI::Models::FineTuning::FineTuningJob::Status] The current status of the fine-tuning job, which can be either `validating_files + # @param trained_tokens [Integer, nil] + # The total number of billable tokens processed by this fine-tuning job. The value + # will be null if the fine-tuning job is still running. # - # @param trained_tokens [Integer, nil] The total number of billable tokens processed by this fine-tuning job. The value + # @param training_file [String] + # The file ID used for training. You can retrieve the training data with the + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # - # @param training_file [String] The file ID used for training. You can retrieve the training data with the [File + # @param validation_file [String, nil] + # The file ID used for validation. You can retrieve the validation results with + # the + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). # - # @param validation_file [String, nil] The file ID used for validation. You can retrieve the validation results with th + # @param estimated_finish [Integer, nil] + # The Unix timestamp (in seconds) for when the fine-tuning job is estimated to + # finish. The value will be null if the fine-tuning job is not running. # - # @param estimated_finish [Integer, nil] The Unix timestamp (in seconds) for when the fine-tuning job is estimated to fin + # @param integrations [Array, nil] + # A list of integrations to enable for this fine-tuning job. # - # @param integrations [Array, nil] A list of integrations to enable for this fine-tuning job. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param method_ [OpenAI::Models::FineTuning::FineTuningJob::Method] The method used for fine-tuning. + # @param method_ [OpenAI::Models::FineTuning::FineTuningJob::Method] + # The method used for fine-tuning. # - # @param object [Symbol, :"fine_tuning.job"] The object type, which is always "fine_tuning.job". + # @param object [Symbol, :"fine_tuning.job"] + # The object type, which is always "fine_tuning.job". # @see OpenAI::Models::FineTuning::FineTuningJob#error class Error < OpenAI::Internal::Type::BaseModel @@ -209,17 +242,18 @@ class Error < OpenAI::Internal::Type::BaseModel required :param, String, nil?: true # @!method initialize(code:, message:, param:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::FineTuningJob::Error} for more details. - # # For fine-tuning jobs that have `failed`, this will contain more information on # the cause of the failure. # - # @param code [String] A machine-readable error code. + # @param code [String] + # A machine-readable error code. # - # @param message [String] A human-readable error message. + # @param message [String] + # A human-readable error message. # - # @param param [String, nil] The parameter that was invalid, usually `training_file` or `validation_file`. Th + # @param param [String, nil] + # The parameter that was invalid, usually `training_file` or `validation_file`. + # This field will be null if the failure was not parameter-specific. end # @see OpenAI::Models::FineTuning::FineTuningJob#hyperparameters @@ -253,17 +287,20 @@ class Hyperparameters < OpenAI::Internal::Type::BaseModel optional :n_epochs, union: -> { OpenAI::FineTuning::FineTuningJob::Hyperparameters::NEpochs } # @!method initialize(batch_size: nil, learning_rate_multiplier: nil, n_epochs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::FineTuningJob::Hyperparameters} for more details. - # # The hyperparameters used for the fine-tuning job. This value will only be # returned when running `supervised` jobs. # - # @param batch_size [Symbol, :auto, Integer, nil] Number of examples in each batch. A larger batch size means that model parameter + # @param batch_size [Symbol, :auto, Integer, nil] + # Number of examples in each batch. A larger batch size means that model + # parameters are updated less frequently, but with lower variance. # - # @param learning_rate_multiplier [Symbol, :auto, Float] Scaling factor for the learning rate. A smaller learning rate may be useful to a + # @param learning_rate_multiplier [Symbol, :auto, Float] + # Scaling factor for the learning rate. A smaller learning rate may be useful to + # avoid overfitting. # - # @param n_epochs [Symbol, :auto, Integer] The number of epochs to train the model for. An epoch refers to one full cycle + # @param n_epochs [Symbol, :auto, Integer] + # The number of epochs to train the model for. An epoch refers to one full cycle + # through the training dataset. # Number of examples in each batch. A larger batch size means that model # parameters are updated less frequently, but with lower variance. @@ -358,13 +395,17 @@ class Method < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, dpo: nil, reinforcement: nil, supervised: nil) # The method used for fine-tuning. # - # @param type [Symbol, OpenAI::Models::FineTuning::FineTuningJob::Method::Type] The type of method. Is either `supervised`, `dpo`, or `reinforcement`. + # @param type [Symbol, OpenAI::Models::FineTuning::FineTuningJob::Method::Type] + # The type of method. Is either `supervised`, `dpo`, or `reinforcement`. # - # @param dpo [OpenAI::Models::FineTuning::DpoMethod] Configuration for the DPO fine-tuning method. + # @param dpo [OpenAI::Models::FineTuning::DpoMethod] + # Configuration for the DPO fine-tuning method. # - # @param reinforcement [OpenAI::Models::FineTuning::ReinforcementMethod] Configuration for the reinforcement fine-tuning method. + # @param reinforcement [OpenAI::Models::FineTuning::ReinforcementMethod] + # Configuration for the reinforcement fine-tuning method. # - # @param supervised [OpenAI::Models::FineTuning::SupervisedMethod] Configuration for the supervised fine-tuning method. + # @param supervised [OpenAI::Models::FineTuning::SupervisedMethod] + # Configuration for the supervised fine-tuning method. # The type of method. Is either `supervised`, `dpo`, or `reinforcement`. # diff --git a/lib/openai/models/fine_tuning/fine_tuning_job_event.rb b/lib/openai/models/fine_tuning/fine_tuning_job_event.rb index d609e035f..77026027a 100644 --- a/lib/openai/models/fine_tuning/fine_tuning_job_event.rb +++ b/lib/openai/models/fine_tuning/fine_tuning_job_event.rb @@ -50,19 +50,26 @@ class FineTuningJobEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, level:, message:, data: nil, type: nil, object: :"fine_tuning.job.event") # Fine-tuning job event object # - # @param id [String] The object identifier. + # @param id [String] + # The object identifier. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the fine-tuning job was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the fine-tuning job was created. # - # @param level [Symbol, OpenAI::Models::FineTuning::FineTuningJobEvent::Level] The log level of the event. + # @param level [Symbol, OpenAI::Models::FineTuning::FineTuningJobEvent::Level] + # The log level of the event. # - # @param message [String] The message of the event. + # @param message [String] + # The message of the event. # - # @param data [Object] The data associated with the event. + # @param data [Object] + # The data associated with the event. # - # @param type [Symbol, OpenAI::Models::FineTuning::FineTuningJobEvent::Type] The type of event. + # @param type [Symbol, OpenAI::Models::FineTuning::FineTuningJobEvent::Type] + # The type of event. # - # @param object [Symbol, :"fine_tuning.job.event"] The object type, which is always "fine_tuning.job.event". + # @param object [Symbol, :"fine_tuning.job.event"] + # The object type, which is always "fine_tuning.job.event". # The log level of the event. # diff --git a/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rb b/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rb index e9e7c30d2..d27267498 100644 --- a/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rb +++ b/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rb @@ -34,21 +34,27 @@ class FineTuningJobWandbIntegration < OpenAI::Internal::Type::BaseModel optional :tags, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(project:, entity: nil, name: nil, tags: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::FineTuningJobWandbIntegration} for more details. - # # The settings for your integration with Weights and Biases. This payload # specifies the project that metrics will be sent to. Optionally, you can set an # explicit display name for your run, add tags to your run, and set a default # entity (team, username, etc) to be associated with your run. # - # @param project [String] The name of the project that the new run will be created under. + # @param project [String] + # The name of the project that the new run will be created under. # - # @param entity [String, nil] The entity to use for the run. This allows you to set the team or username of th + # @param entity [String, nil] + # The entity to use for the run. This allows you to set the team or username of + # the WandB user that you would like associated with the run. If not set, the + # default entity for the registered WandB API key is used. # - # @param name [String, nil] A display name to set for the run. If not set, we will use the Job ID as the nam + # @param name [String, nil] + # A display name to set for the run. If not set, we will use the Job ID as the + # name. # - # @param tags [Array] A list of tags to be attached to the newly created run. These tags are passed th + # @param tags [Array] + # A list of tags to be attached to the newly created run. These tags are passed + # through directly to WandB. Some default tags are generated by OpenAI: + # "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". end end diff --git a/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rb b/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rb index 54781dde7..c5b68e5a6 100644 --- a/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rb +++ b/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rb @@ -20,13 +20,14 @@ class FineTuningJobWandbIntegrationObject < OpenAI::Internal::Type::BaseModel required :wandb, -> { OpenAI::FineTuning::FineTuningJobWandbIntegration } # @!method initialize(wandb:, type: :wandb) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::FineTuningJobWandbIntegrationObject} for more - # details. + # @param wandb [OpenAI::Models::FineTuning::FineTuningJobWandbIntegration] + # The settings for your integration with Weights and Biases. This payload + # specifies the project that metrics will be sent to. Optionally, you can set an + # explicit display name for your run, add tags to your run, and set a default + # entity (team, username, etc) to be associated with your run. # - # @param wandb [OpenAI::Models::FineTuning::FineTuningJobWandbIntegration] The settings for your integration with Weights and Biases. This payload specifie - # - # @param type [Symbol, :wandb] The type of the integration being enabled for the fine-tuning job + # @param type [Symbol, :wandb] + # The type of the integration being enabled for the fine-tuning job end end diff --git a/lib/openai/models/fine_tuning/job_create_params.rb b/lib/openai/models/fine_tuning/job_create_params.rb index c81d19134..cd35da20b 100644 --- a/lib/openai/models/fine_tuning/job_create_params.rb +++ b/lib/openai/models/fine_tuning/job_create_params.rb @@ -10,7 +10,7 @@ class JobCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). # # @return [String, Symbol, OpenAI::Models::FineTuning::JobCreateParams::Model] required :model, union: -> { OpenAI::FineTuning::JobCreateParams::Model } @@ -18,21 +18,22 @@ class JobCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute training_file # The ID of an uploaded file that contains training data. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your dataset must be formatted as a JSONL file. Additionally, you must upload # your file with the purpose `fine-tune`. # # The contents of the file should differ depending on if the model uses the - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # format, or if the fine-tuning method uses the - # [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) # format. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. # # @return [String] @@ -104,38 +105,87 @@ class JobCreateParams < OpenAI::Internal::Type::BaseModel # the purpose `fine-tune`. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. # # @return [String, nil] optional :validation_file, String, nil?: true # @!method initialize(model:, training_file:, hyperparameters: nil, integrations: nil, metadata: nil, method_: nil, seed: nil, suffix: nil, validation_file: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCreateParams} for more details. + # @param model [String, Symbol, OpenAI::Models::FineTuning::JobCreateParams::Model] + # The name of the model to fine-tune. You can select one of the + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). # - # @param model [String, Symbol, OpenAI::Models::FineTuning::JobCreateParams::Model] The name of the model to fine-tune. You can select one of the + # @param training_file [String] + # The ID of an uploaded file that contains training data. # - # @param training_file [String] The ID of an uploaded file that contains training data. + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) + # for how to upload a file. # - # @param hyperparameters [OpenAI::Models::FineTuning::JobCreateParams::Hyperparameters] The hyperparameters used for the fine-tuning job. + # Your dataset must be formatted as a JSONL file. Additionally, you must upload + # your file with the purpose `fine-tune`. # - # @param integrations [Array, nil] A list of integrations to enable for your fine-tuning job. + # The contents of the file should differ depending on if the model uses the + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) + # format, or if the fine-tuning method uses the + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) + # format. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # See the + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + # for more details. # - # @param method_ [OpenAI::Models::FineTuning::JobCreateParams::Method] The method used for fine-tuning. + # @param hyperparameters [OpenAI::Models::FineTuning::JobCreateParams::Hyperparameters] + # The hyperparameters used for the fine-tuning job. This value is now deprecated + # in favor of `method`, and should be passed in under the `method` parameter. # - # @param seed [Integer, nil] The seed controls the reproducibility of the job. Passing in the same seed and j + # @param integrations [Array, nil] + # A list of integrations to enable for your fine-tuning job. # - # @param suffix [String, nil] A string of up to 64 characters that will be added to your fine-tuned model name + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param validation_file [String, nil] The ID of an uploaded file that contains validation data. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param method_ [OpenAI::Models::FineTuning::JobCreateParams::Method] + # The method used for fine-tuning. + # + # @param seed [Integer, nil] + # The seed controls the reproducibility of the job. Passing in the same seed and + # job parameters should produce the same results, but may differ in rare cases. If + # a seed is not specified, one will be generated for you. + # + # @param suffix [String, nil] + # A string of up to 64 characters that will be added to your fine-tuned model + # name. + # + # For example, a `suffix` of "custom-model-name" would produce a model name like + # `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. + # + # @param validation_file [String, nil] + # The ID of an uploaded file that contains validation data. + # + # If you provide this file, the data is used to generate validation metrics + # periodically during fine-tuning. These metrics can be viewed in the fine-tuning + # results file. The same data should not be present in both train and validation + # files. + # + # Your dataset must be formatted as a JSONL file. You must upload your file with + # the purpose `fine-tune`. + # + # See the + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + # for more details. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). module Model extend OpenAI::Internal::Type::Union @@ -193,17 +243,20 @@ class Hyperparameters < OpenAI::Internal::Type::BaseModel optional :n_epochs, union: -> { OpenAI::FineTuning::JobCreateParams::Hyperparameters::NEpochs } # @!method initialize(batch_size: nil, learning_rate_multiplier: nil, n_epochs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCreateParams::Hyperparameters} for more details. - # # The hyperparameters used for the fine-tuning job. This value is now deprecated # in favor of `method`, and should be passed in under the `method` parameter. # - # @param batch_size [Symbol, :auto, Integer] Number of examples in each batch. A larger batch size means that model parameter + # @param batch_size [Symbol, :auto, Integer] + # Number of examples in each batch. A larger batch size means that model + # parameters are updated less frequently, but with lower variance. # - # @param learning_rate_multiplier [Symbol, :auto, Float] Scaling factor for the learning rate. A smaller learning rate may be useful to a + # @param learning_rate_multiplier [Symbol, :auto, Float] + # Scaling factor for the learning rate. A smaller learning rate may be useful to + # avoid overfitting. # - # @param n_epochs [Symbol, :auto, Integer] The number of epochs to train the model for. An epoch refers to one full cycle + # @param n_epochs [Symbol, :auto, Integer] + # The number of epochs to train the model for. An epoch refers to one full cycle + # through the training dataset. # Number of examples in each batch. A larger batch size means that model # parameters are updated less frequently, but with lower variance. @@ -269,12 +322,15 @@ class Integration < OpenAI::Internal::Type::BaseModel required :wandb, -> { OpenAI::FineTuning::JobCreateParams::Integration::Wandb } # @!method initialize(wandb:, type: :wandb) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCreateParams::Integration} for more details. + # @param wandb [OpenAI::Models::FineTuning::JobCreateParams::Integration::Wandb] + # The settings for your integration with Weights and Biases. This payload + # specifies the project that metrics will be sent to. Optionally, you can set an + # explicit display name for your run, add tags to your run, and set a default + # entity (team, username, etc) to be associated with your run. # - # @param wandb [OpenAI::Models::FineTuning::JobCreateParams::Integration::Wandb] The settings for your integration with Weights and Biases. This payload specifie - # - # @param type [Symbol, :wandb] The type of integration to enable. Currently, only "wandb" (Weights and Biases) + # @param type [Symbol, :wandb] + # The type of integration to enable. Currently, only "wandb" (Weights and Biases) + # is supported. # @see OpenAI::Models::FineTuning::JobCreateParams::Integration#wandb class Wandb < OpenAI::Internal::Type::BaseModel @@ -308,22 +364,27 @@ class Wandb < OpenAI::Internal::Type::BaseModel optional :tags, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(project:, entity: nil, name: nil, tags: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCreateParams::Integration::Wandb} for more - # details. - # # The settings for your integration with Weights and Biases. This payload # specifies the project that metrics will be sent to. Optionally, you can set an # explicit display name for your run, add tags to your run, and set a default # entity (team, username, etc) to be associated with your run. # - # @param project [String] The name of the project that the new run will be created under. + # @param project [String] + # The name of the project that the new run will be created under. # - # @param entity [String, nil] The entity to use for the run. This allows you to set the team or username of th + # @param entity [String, nil] + # The entity to use for the run. This allows you to set the team or username of + # the WandB user that you would like associated with the run. If not set, the + # default entity for the registered WandB API key is used. # - # @param name [String, nil] A display name to set for the run. If not set, we will use the Job ID as the nam + # @param name [String, nil] + # A display name to set for the run. If not set, we will use the Job ID as the + # name. # - # @param tags [Array] A list of tags to be attached to the newly created run. These tags are passed th + # @param tags [Array] + # A list of tags to be attached to the newly created run. These tags are passed + # through directly to WandB. Some default tags are generated by OpenAI: + # "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". end end @@ -355,13 +416,17 @@ class Method < OpenAI::Internal::Type::BaseModel # @!method initialize(type:, dpo: nil, reinforcement: nil, supervised: nil) # The method used for fine-tuning. # - # @param type [Symbol, OpenAI::Models::FineTuning::JobCreateParams::Method::Type] The type of method. Is either `supervised`, `dpo`, or `reinforcement`. + # @param type [Symbol, OpenAI::Models::FineTuning::JobCreateParams::Method::Type] + # The type of method. Is either `supervised`, `dpo`, or `reinforcement`. # - # @param dpo [OpenAI::Models::FineTuning::DpoMethod] Configuration for the DPO fine-tuning method. + # @param dpo [OpenAI::Models::FineTuning::DpoMethod] + # Configuration for the DPO fine-tuning method. # - # @param reinforcement [OpenAI::Models::FineTuning::ReinforcementMethod] Configuration for the reinforcement fine-tuning method. + # @param reinforcement [OpenAI::Models::FineTuning::ReinforcementMethod] + # Configuration for the reinforcement fine-tuning method. # - # @param supervised [OpenAI::Models::FineTuning::SupervisedMethod] Configuration for the supervised fine-tuning method. + # @param supervised [OpenAI::Models::FineTuning::SupervisedMethod] + # Configuration for the supervised fine-tuning method. # The type of method. Is either `supervised`, `dpo`, or `reinforcement`. # diff --git a/lib/openai/models/fine_tuning/job_list_events_params.rb b/lib/openai/models/fine_tuning/job_list_events_params.rb index 27804785c..dc6926115 100644 --- a/lib/openai/models/fine_tuning/job_list_events_params.rb +++ b/lib/openai/models/fine_tuning/job_list_events_params.rb @@ -28,9 +28,11 @@ class JobListEventsParams < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuning_job_id:, after: nil, limit: nil, request_options: {}) # @param fine_tuning_job_id [String] # - # @param after [String] Identifier for the last event from the previous pagination request. + # @param after [String] + # Identifier for the last event from the previous pagination request. # - # @param limit [Integer] Number of events to retrieve. + # @param limit [Integer] + # Number of events to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/fine_tuning/job_list_params.rb b/lib/openai/models/fine_tuning/job_list_params.rb index 30c6f937e..35b085769 100644 --- a/lib/openai/models/fine_tuning/job_list_params.rb +++ b/lib/openai/models/fine_tuning/job_list_params.rb @@ -28,14 +28,15 @@ class JobListParams < OpenAI::Internal::Type::BaseModel optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(after: nil, limit: nil, metadata: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobListParams} for more details. + # @param after [String] + # Identifier for the last job from the previous pagination request. # - # @param after [String] Identifier for the last job from the previous pagination request. + # @param limit [Integer] + # Number of fine-tuning jobs to retrieve. # - # @param limit [Integer] Number of fine-tuning jobs to retrieve. - # - # @param metadata [Hash{Symbol=>String}, nil] Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternative + # @param metadata [Hash{Symbol=>String}, nil] + # Optional metadata filter. To filter, use the syntax `metadata[k]=v`. + # Alternatively, set `metadata=null` to indicate no metadata. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/fine_tuning/jobs/checkpoint_list_params.rb b/lib/openai/models/fine_tuning/jobs/checkpoint_list_params.rb index 444645c2f..f767f7681 100644 --- a/lib/openai/models/fine_tuning/jobs/checkpoint_list_params.rb +++ b/lib/openai/models/fine_tuning/jobs/checkpoint_list_params.rb @@ -29,9 +29,11 @@ class CheckpointListParams < OpenAI::Internal::Type::BaseModel # @!method initialize(fine_tuning_job_id:, after: nil, limit: nil, request_options: {}) # @param fine_tuning_job_id [String] # - # @param after [String] Identifier for the last checkpoint ID from the previous pagination request. + # @param after [String] + # Identifier for the last checkpoint ID from the previous pagination request. # - # @param limit [Integer] Number of checkpoints to retrieve. + # @param limit [Integer] + # Number of checkpoints to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rb b/lib/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rb index cb4e4a9b8..2a6815f6f 100644 --- a/lib/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rb +++ b/lib/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rb @@ -52,19 +52,26 @@ class FineTuningJobCheckpoint < OpenAI::Internal::Type::BaseModel # The `fine_tuning.job.checkpoint` object represents a model checkpoint for a # fine-tuning job that is ready to use. # - # @param id [String] The checkpoint identifier, which can be referenced in the API endpoints. + # @param id [String] + # The checkpoint identifier, which can be referenced in the API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the checkpoint was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the checkpoint was created. # - # @param fine_tuned_model_checkpoint [String] The name of the fine-tuned checkpoint model that is created. + # @param fine_tuned_model_checkpoint [String] + # The name of the fine-tuned checkpoint model that is created. # - # @param fine_tuning_job_id [String] The name of the fine-tuning job that this checkpoint was created from. + # @param fine_tuning_job_id [String] + # The name of the fine-tuning job that this checkpoint was created from. # - # @param metrics [OpenAI::Models::FineTuning::Jobs::FineTuningJobCheckpoint::Metrics] Metrics at the step number during the fine-tuning job. + # @param metrics [OpenAI::Models::FineTuning::Jobs::FineTuningJobCheckpoint::Metrics] + # Metrics at the step number during the fine-tuning job. # - # @param step_number [Integer] The step number that the checkpoint was created at. + # @param step_number [Integer] + # The step number that the checkpoint was created at. # - # @param object [Symbol, :"fine_tuning.job.checkpoint"] The object type, which is always "fine_tuning.job.checkpoint". + # @param object [Symbol, :"fine_tuning.job.checkpoint"] + # The object type, which is always "fine_tuning.job.checkpoint". # @see OpenAI::Models::FineTuning::Jobs::FineTuningJobCheckpoint#metrics class Metrics < OpenAI::Internal::Type::BaseModel diff --git a/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb b/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb index e4e27e82c..9ecb74569 100644 --- a/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +++ b/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb @@ -56,24 +56,31 @@ class ReinforcementHyperparameters < OpenAI::Internal::Type::BaseModel optional :reasoning_effort, enum: -> { OpenAI::FineTuning::ReinforcementHyperparameters::ReasoningEffort } # @!method initialize(batch_size: nil, compute_multiplier: nil, eval_interval: nil, eval_samples: nil, learning_rate_multiplier: nil, n_epochs: nil, reasoning_effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::ReinforcementHyperparameters} for more details. - # # The hyperparameters used for the reinforcement fine-tuning job. # - # @param batch_size [Symbol, :auto, Integer] Number of examples in each batch. A larger batch size means that model parameter + # @param batch_size [Symbol, :auto, Integer] + # Number of examples in each batch. A larger batch size means that model + # parameters are updated less frequently, but with lower variance. # - # @param compute_multiplier [Symbol, :auto, Float] Multiplier on amount of compute used for exploring search space during training. + # @param compute_multiplier [Symbol, :auto, Float] + # Multiplier on amount of compute used for exploring search space during training. # - # @param eval_interval [Symbol, :auto, Integer] The number of training steps between evaluation runs. + # @param eval_interval [Symbol, :auto, Integer] + # The number of training steps between evaluation runs. # - # @param eval_samples [Symbol, :auto, Integer] Number of evaluation samples to generate per training step. + # @param eval_samples [Symbol, :auto, Integer] + # Number of evaluation samples to generate per training step. # - # @param learning_rate_multiplier [Symbol, :auto, Float] Scaling factor for the learning rate. A smaller learning rate may be useful to a + # @param learning_rate_multiplier [Symbol, :auto, Float] + # Scaling factor for the learning rate. A smaller learning rate may be useful to + # avoid overfitting. # - # @param n_epochs [Symbol, :auto, Integer] The number of epochs to train the model for. An epoch refers to one full cycle t + # @param n_epochs [Symbol, :auto, Integer] + # The number of epochs to train the model for. An epoch refers to one full cycle + # through the training dataset. # - # @param reasoning_effort [Symbol, OpenAI::Models::FineTuning::ReinforcementHyperparameters::ReasoningEffort] Level of reasoning effort. + # @param reasoning_effort [Symbol, OpenAI::Models::FineTuning::ReinforcementHyperparameters::ReasoningEffort] + # Level of reasoning effort. # Number of examples in each batch. A larger batch size means that model # parameters are updated less frequently, but with lower variance. diff --git a/lib/openai/models/fine_tuning/reinforcement_method.rb b/lib/openai/models/fine_tuning/reinforcement_method.rb index 40395ee89..6bb40ce0f 100644 --- a/lib/openai/models/fine_tuning/reinforcement_method.rb +++ b/lib/openai/models/fine_tuning/reinforcement_method.rb @@ -19,9 +19,11 @@ class ReinforcementMethod < OpenAI::Internal::Type::BaseModel # @!method initialize(grader:, hyperparameters: nil) # Configuration for the reinforcement fine-tuning method. # - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # - # @param hyperparameters [OpenAI::Models::FineTuning::ReinforcementHyperparameters] The hyperparameters used for the reinforcement fine-tuning job. + # @param hyperparameters [OpenAI::Models::FineTuning::ReinforcementHyperparameters] + # The hyperparameters used for the reinforcement fine-tuning job. # The grader used for the fine-tuning job. # diff --git a/lib/openai/models/fine_tuning/supervised_hyperparameters.rb b/lib/openai/models/fine_tuning/supervised_hyperparameters.rb index e7729fdda..838d60e7e 100644 --- a/lib/openai/models/fine_tuning/supervised_hyperparameters.rb +++ b/lib/openai/models/fine_tuning/supervised_hyperparameters.rb @@ -29,16 +29,19 @@ class SupervisedHyperparameters < OpenAI::Internal::Type::BaseModel optional :n_epochs, union: -> { OpenAI::FineTuning::SupervisedHyperparameters::NEpochs } # @!method initialize(batch_size: nil, learning_rate_multiplier: nil, n_epochs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::SupervisedHyperparameters} for more details. - # # The hyperparameters used for the fine-tuning job. # - # @param batch_size [Symbol, :auto, Integer] Number of examples in each batch. A larger batch size means that model parameter + # @param batch_size [Symbol, :auto, Integer] + # Number of examples in each batch. A larger batch size means that model + # parameters are updated less frequently, but with lower variance. # - # @param learning_rate_multiplier [Symbol, :auto, Float] Scaling factor for the learning rate. A smaller learning rate may be useful to a + # @param learning_rate_multiplier [Symbol, :auto, Float] + # Scaling factor for the learning rate. A smaller learning rate may be useful to + # avoid overfitting. # - # @param n_epochs [Symbol, :auto, Integer] The number of epochs to train the model for. An epoch refers to one full cycle t + # @param n_epochs [Symbol, :auto, Integer] + # The number of epochs to train the model for. An epoch refers to one full cycle + # through the training dataset. # Number of examples in each batch. A larger batch size means that model # parameters are updated less frequently, but with lower variance. diff --git a/lib/openai/models/fine_tuning/supervised_method.rb b/lib/openai/models/fine_tuning/supervised_method.rb index f81f36481..0c688fbc2 100644 --- a/lib/openai/models/fine_tuning/supervised_method.rb +++ b/lib/openai/models/fine_tuning/supervised_method.rb @@ -13,7 +13,8 @@ class SupervisedMethod < OpenAI::Internal::Type::BaseModel # @!method initialize(hyperparameters: nil) # Configuration for the supervised fine-tuning method. # - # @param hyperparameters [OpenAI::Models::FineTuning::SupervisedHyperparameters] The hyperparameters used for the fine-tuning job. + # @param hyperparameters [OpenAI::Models::FineTuning::SupervisedHyperparameters] + # The hyperparameters used for the fine-tuning job. end end end diff --git a/lib/openai/models/function_definition.rb b/lib/openai/models/function_definition.rb index 6471ea8e8..6e25c8512 100644 --- a/lib/openai/models/function_definition.rb +++ b/lib/openai/models/function_definition.rb @@ -19,8 +19,8 @@ class FunctionDefinition < OpenAI::Internal::Type::BaseModel # @!attribute parameters # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -34,22 +34,35 @@ class FunctionDefinition < OpenAI::Internal::Type::BaseModel # set to true, the model will follow the exact schema defined in the `parameters` # field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn # more about Structured Outputs in the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling). + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). # # @return [Boolean, nil] optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, description: nil, parameters: nil, strict: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FunctionDefinition} for more details. + # @param name [String] + # The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + # underscores and dashes, with a maximum length of 64. # - # @param name [String] The name of the function to be called. Must be a-z, A-Z, 0-9, or contain undersc + # @param description [String] + # A description of what the function does, used by the model to choose when and + # how to call the function. # - # @param description [String] A description of what the function does, used by the model to choose when and ho + # @param parameters [Hash{Symbol=>Object}] + # The parameters the functions accepts, described as a JSON Schema object. See the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the + # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + # documentation about the format. # - # @param parameters [Hash{Symbol=>Object}] The parameters the functions accepts, described as a JSON Schema object. See the + # Omitting `parameters` defines a function with an empty parameter list. # - # @param strict [Boolean, nil] Whether to enable strict schema adherence when generating the function call. If + # @param strict [Boolean, nil] + # Whether to enable strict schema adherence when generating the function call. If + # set to true, the model will follow the exact schema defined in the `parameters` + # field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn + # more about Structured Outputs in the + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). end end end diff --git a/lib/openai/models/graders/grader_input_item.rb b/lib/openai/models/graders/grader_input_item.rb index be51dd320..cb26f9ffc 100644 --- a/lib/openai/models/graders/grader_input_item.rb +++ b/lib/openai/models/graders/grader_input_item.rb @@ -36,14 +36,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::GraderInputItem::OutputText} for more details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -67,16 +66,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::GraderInputItem::InputImage} for more details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants diff --git a/lib/openai/models/graders/label_model_grader.rb b/lib/openai/models/graders/label_model_grader.rb index 5218bcfdb..ef3880249 100644 --- a/lib/openai/models/graders/label_model_grader.rb +++ b/lib/openai/models/graders/label_model_grader.rb @@ -45,16 +45,20 @@ class LabelModelGrader < OpenAI::Internal::Type::BaseModel # # @param input [Array] # - # @param labels [Array] The labels to assign to each item in the evaluation. + # @param labels [Array] + # The labels to assign to each item in the evaluation. # - # @param model [String] The model to use for the evaluation. Must support structured outputs. + # @param model [String] + # The model to use for the evaluation. Must support structured outputs. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param passing_labels [Array] The labels that indicate a passing result. Must be a subset of labels. + # @param passing_labels [Array] + # The labels that indicate a passing result. Must be a subset of labels. # - # @param type [Symbol, :label_model] The object type, which is always `label_model`. - + # @param type [Symbol, :label_model] + # The object type, which is always `label_model`. class Input < OpenAI::Internal::Type::BaseModel # @!attribute content # Inputs to the model - can contain template strings. Supports text, output text, @@ -77,20 +81,22 @@ class Input < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Graders::LabelModelGrader::Input::Type } # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::LabelModelGrader::Input} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Graders::LabelModelGrader::Input::Content::OutputText, OpenAI::Models::Graders::LabelModelGrader::Input::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Graders::LabelModelGrader::Input::Content::OutputText, OpenAI::Models::Graders::LabelModelGrader::Input::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Graders::LabelModelGrader::Input::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Graders::LabelModelGrader::Input::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Graders::LabelModelGrader::Input::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Graders::LabelModelGrader::Input::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -132,15 +138,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::LabelModelGrader::Input::Content::OutputText} for more - # details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -164,17 +168,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::LabelModelGrader::Input::Content::InputImage} for more - # details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants diff --git a/lib/openai/models/graders/multi_grader.rb b/lib/openai/models/graders/multi_grader.rb index 0f5bd82e6..b118eb3c2 100644 --- a/lib/openai/models/graders/multi_grader.rb +++ b/lib/openai/models/graders/multi_grader.rb @@ -30,19 +30,21 @@ class MultiGrader < OpenAI::Internal::Type::BaseModel required :type, const: :multi # @!method initialize(calculate_output:, graders:, name:, type: :multi) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::MultiGrader} for more details. - # # A MultiGrader object combines the output of multiple graders to produce a single # score. # - # @param calculate_output [String] A formula to calculate the output based on grader results. + # @param calculate_output [String] + # A formula to calculate the output based on grader results. # - # @param graders [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::LabelModelGrader] A StringCheckGrader object that performs a string comparison between input and r + # @param graders [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::LabelModelGrader] + # A StringCheckGrader object that performs a string comparison between input and + # reference using a specified operation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param type [Symbol, :multi] The object type, which is always `multi`. + # @param type [Symbol, :multi] + # The object type, which is always `multi`. # A StringCheckGrader object that performs a string comparison between input and # reference using a specified operation. diff --git a/lib/openai/models/graders/python_grader.rb b/lib/openai/models/graders/python_grader.rb index f5fcae1cd..8defa7d60 100644 --- a/lib/openai/models/graders/python_grader.rb +++ b/lib/openai/models/graders/python_grader.rb @@ -31,13 +31,17 @@ class PythonGrader < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, source:, image_tag: nil, type: :python) # A PythonGrader object that runs a python script on the input. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param source [String] The source code of the python script. + # @param source [String] + # The source code of the python script. # - # @param image_tag [String] The image tag to use for the python script. + # @param image_tag [String] + # The image tag to use for the python script. # - # @param type [Symbol, :python] The object type, which is always `python`. + # @param type [Symbol, :python] + # The object type, which is always `python`. end end diff --git a/lib/openai/models/graders/score_model_grader.rb b/lib/openai/models/graders/score_model_grader.rb index c1b798ab3..23ebd9379 100644 --- a/lib/openai/models/graders/score_model_grader.rb +++ b/lib/openai/models/graders/score_model_grader.rb @@ -42,23 +42,26 @@ class ScoreModelGrader < OpenAI::Internal::Type::BaseModel optional :sampling_params, -> { OpenAI::Graders::ScoreModelGrader::SamplingParams } # @!method initialize(input:, model:, name:, range: nil, sampling_params: nil, type: :score_model) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::ScoreModelGrader} for more details. - # # A ScoreModelGrader object that uses a model to assign a score to the input. # - # @param input [Array] The input messages evaluated by the grader. Supports text, output text, input im + # @param input [Array] + # The input messages evaluated by the grader. Supports text, output text, input + # image, and input audio content blocks, and may include template strings. # - # @param model [String] The model to use for the evaluation. + # @param model [String] + # The model to use for the evaluation. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param range [Array] The range of the score. Defaults to `[0, 1]`. + # @param range [Array] + # The range of the score. Defaults to `[0, 1]`. # - # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] The sampling parameters for the model. + # @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams] + # The sampling parameters for the model. # - # @param type [Symbol, :score_model] The object type, which is always `score_model`. - + # @param type [Symbol, :score_model] + # The object type, which is always `score_model`. class Input < OpenAI::Internal::Type::BaseModel # @!attribute content # Inputs to the model - can contain template strings. Supports text, output text, @@ -81,20 +84,22 @@ class Input < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Graders::ScoreModelGrader::Input::Type } # @!method initialize(content:, role:, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::ScoreModelGrader::Input} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Graders::ScoreModelGrader::Input::Content::OutputText, OpenAI::Models::Graders::ScoreModelGrader::Input::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] Inputs to the model - can contain template strings. Supports text, output text, + # @param content [String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Graders::ScoreModelGrader::Input::Content::OutputText, OpenAI::Models::Graders::ScoreModelGrader::Input::Content::InputImage, OpenAI::Models::Responses::ResponseInputAudio, Array] + # Inputs to the model - can contain template strings. Supports text, output text, + # input images, and input audio, either as a single item or an array of items. # - # @param role [Symbol, OpenAI::Models::Graders::ScoreModelGrader::Input::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Graders::ScoreModelGrader::Input::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param type [Symbol, OpenAI::Models::Graders::ScoreModelGrader::Input::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Graders::ScoreModelGrader::Input::Type] + # The type of the message input. Always `message`. # Inputs to the model - can contain template strings. Supports text, output text, # input images, and input audio, either as a single item or an array of items. @@ -136,15 +141,13 @@ class OutputText < OpenAI::Internal::Type::BaseModel required :type, const: :output_text # @!method initialize(text:, type: :output_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::ScoreModelGrader::Input::Content::OutputText} for more - # details. - # # A text output from the model. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. end class InputImage < OpenAI::Internal::Type::BaseModel @@ -168,17 +171,17 @@ class InputImage < OpenAI::Internal::Type::BaseModel optional :detail, String # @!method initialize(image_url:, detail: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::ScoreModelGrader::Input::Content::InputImage} for more - # details. - # # An image input block used within EvalItem content arrays. # - # @param image_url [String] The URL of the image input. + # @param image_url [String] + # The URL of the image input. # - # @param detail [String] The detail level of the image to be sent to the model. One of `high`, `low`, or + # @param detail [String] + # The detail level of the image to be sent to the model. One of `high`, `low`, or + # `auto`. Defaults to `auto`. # - # @param type [Symbol, :input_image] The type of the image input. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the image input. Always `input_image`. end # @!method self.variants @@ -227,7 +230,7 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -252,20 +255,27 @@ class SamplingParams < OpenAI::Internal::Type::BaseModel optional :top_p, Float, nil?: true # @!method initialize(max_completions_tokens: nil, reasoning_effort: nil, seed: nil, temperature: nil, top_p: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::ScoreModelGrader::SamplingParams} for more details. - # # The sampling parameters for the model. # - # @param max_completions_tokens [Integer, nil] The maximum number of tokens the grader model may generate in its response. + # @param max_completions_tokens [Integer, nil] + # The maximum number of tokens the grader model may generate in its response. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. # - # @param seed [Integer, nil] A seed value to initialize the randomness, during sampling. + # @param seed [Integer, nil] + # A seed value to initialize the randomness, during sampling. # - # @param temperature [Float, nil] A higher temperature increases randomness in the outputs. + # @param temperature [Float, nil] + # A higher temperature increases randomness in the outputs. # - # @param top_p [Float, nil] An alternative to temperature for nucleus sampling; 1.0 includes all tokens. + # @param top_p [Float, nil] + # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. end end end diff --git a/lib/openai/models/graders/string_check_grader.rb b/lib/openai/models/graders/string_check_grader.rb index 2d8f5a302..5d3307814 100644 --- a/lib/openai/models/graders/string_check_grader.rb +++ b/lib/openai/models/graders/string_check_grader.rb @@ -38,15 +38,20 @@ class StringCheckGrader < OpenAI::Internal::Type::BaseModel # A StringCheckGrader object that performs a string comparison between input and # reference using a specified operation. # - # @param input [String] The input text. This may include template strings. + # @param input [String] + # The input text. This may include template strings. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param operation [Symbol, OpenAI::Models::Graders::StringCheckGrader::Operation] The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. + # @param operation [Symbol, OpenAI::Models::Graders::StringCheckGrader::Operation] + # The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. # - # @param reference [String] The reference text. This may include template strings. + # @param reference [String] + # The reference text. This may include template strings. # - # @param type [Symbol, :string_check] The object type, which is always `string_check`. + # @param type [Symbol, :string_check] + # The object type, which is always `string_check`. # The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. # diff --git a/lib/openai/models/graders/text_similarity_grader.rb b/lib/openai/models/graders/text_similarity_grader.rb index 8cc51499b..4132a7f72 100644 --- a/lib/openai/models/graders/text_similarity_grader.rb +++ b/lib/openai/models/graders/text_similarity_grader.rb @@ -36,20 +36,23 @@ class TextSimilarityGrader < OpenAI::Internal::Type::BaseModel required :type, const: :text_similarity # @!method initialize(evaluation_metric:, input:, name:, reference:, type: :text_similarity) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Graders::TextSimilarityGrader} for more details. - # # A TextSimilarityGrader object which grades text based on similarity metrics. # - # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, + # @param evaluation_metric [Symbol, OpenAI::Models::Graders::TextSimilarityGrader::EvaluationMetric] + # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, + # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. # - # @param input [String] The text being graded. + # @param input [String] + # The text being graded. # - # @param name [String] The name of the grader. + # @param name [String] + # The name of the grader. # - # @param reference [String] The text being graded against. + # @param reference [String] + # The text being graded against. # - # @param type [Symbol, :text_similarity] The type of grader. + # @param type [Symbol, :text_similarity] + # The type of grader. # The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, `gleu`, # `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. diff --git a/lib/openai/models/image.rb b/lib/openai/models/image.rb index a0bf98dd1..f80a009f6 100644 --- a/lib/openai/models/image.rb +++ b/lib/openai/models/image.rb @@ -26,16 +26,20 @@ class Image < OpenAI::Internal::Type::BaseModel optional :url, String # @!method initialize(b64_json: nil, revised_prompt: nil, url: nil) - # Some parameter documentations has been truncated, see {OpenAI::Models::Image} - # for more details. - # # Represents the content or the URL of an image generated by the OpenAI API. # - # @param b64_json [String] The base64-encoded JSON of the generated image. Returned by default for the GPT + # @param b64_json [String] + # The base64-encoded JSON of the generated image. Returned by default for the GPT + # image models, and only present if `response_format` is set to `b64_json` for + # `dall-e-2` and `dall-e-3`. # - # @param revised_prompt [String] For `dall-e-3` only, the revised prompt that was used to generate the image. + # @param revised_prompt [String] + # For `dall-e-3` only, the revised prompt that was used to generate the image. # - # @param url [String] When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response + # @param url [String] + # When using `dall-e-2` or `dall-e-3`, the URL of the generated image if + # `response_format` is set to `url` (default value). Unsupported for the GPT image + # models. end end end diff --git a/lib/openai/models/image_create_variation_params.rb b/lib/openai/models/image_create_variation_params.rb index 9c5f40e5e..2adb10cbc 100644 --- a/lib/openai/models/image_create_variation_params.rb +++ b/lib/openai/models/image_create_variation_params.rb @@ -49,26 +49,40 @@ class ImageCreateVariationParams < OpenAI::Internal::Type::BaseModel # @!attribute user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(image:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageCreateVariationParams} for more details. + # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The image to use as the basis for the variation(s). Must be a valid PNG file, + # less than 4MB, and square. # - # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] The image to use as the basis for the variation(s). Must be a valid PNG file, le + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. Only `dall-e-2` is supported at this time + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. Only `dall-e-2` is supported at this + # time. # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. # - # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or ` + # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] + # The format in which the generated images are returned. Must be one of `url` or + # `b64_json`. URLs are only valid for 60 minutes after the image has been + # generated. # - # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x + # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] + # The size of the generated images. Must be one of `256x256`, `512x512`, or + # `1024x1024`. # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/image_edit_completed_event.rb b/lib/openai/models/image_edit_completed_event.rb index edf450700..19e9c9e79 100644 --- a/lib/openai/models/image_edit_completed_event.rb +++ b/lib/openai/models/image_edit_completed_event.rb @@ -53,26 +53,32 @@ class ImageEditCompletedEvent < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::ImageEditCompletedEvent::Usage } # @!method initialize(b64_json:, background:, created_at:, output_format:, quality:, size:, usage:, type: :"image_edit.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditCompletedEvent} for more details. - # # Emitted when image editing has completed and the final image is available. # - # @param b64_json [String] Base64-encoded final edited image data, suitable for rendering as an image. + # @param b64_json [String] + # Base64-encoded final edited image data, suitable for rendering as an image. # - # @param background [Symbol, OpenAI::Models::ImageEditCompletedEvent::Background] The background setting for the edited image. + # @param background [Symbol, OpenAI::Models::ImageEditCompletedEvent::Background] + # The background setting for the edited image. # - # @param created_at [Integer] The Unix timestamp when the event was created. + # @param created_at [Integer] + # The Unix timestamp when the event was created. # - # @param output_format [Symbol, OpenAI::Models::ImageEditCompletedEvent::OutputFormat] The output format for the edited image. + # @param output_format [Symbol, OpenAI::Models::ImageEditCompletedEvent::OutputFormat] + # The output format for the edited image. # - # @param quality [Symbol, OpenAI::Models::ImageEditCompletedEvent::Quality] The quality setting for the edited image. + # @param quality [Symbol, OpenAI::Models::ImageEditCompletedEvent::Quality] + # The quality setting for the edited image. # - # @param size [String, Symbol, OpenAI::Models::ImageEditCompletedEvent::Size] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::ImageEditCompletedEvent::Size] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param usage [OpenAI::Models::ImageEditCompletedEvent::Usage] For the GPT image models only, the token usage information for the image generat + # @param usage [OpenAI::Models::ImageEditCompletedEvent::Usage] + # For the GPT image models only, the token usage information for the image + # generation. # - # @param type [Symbol, :"image_edit.completed"] The type of the event. Always `image_edit.completed`. + # @param type [Symbol, :"image_edit.completed"] + # The type of the event. Always `image_edit.completed`. # The background setting for the edited image. # @@ -185,19 +191,20 @@ class Usage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(input_tokens:, input_tokens_details:, output_tokens:, total_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditCompletedEvent::Usage} for more details. - # # For the GPT image models only, the token usage information for the image # generation. # - # @param input_tokens [Integer] The number of tokens (images and text) in the input prompt. + # @param input_tokens [Integer] + # The number of tokens (images and text) in the input prompt. # - # @param input_tokens_details [OpenAI::Models::ImageEditCompletedEvent::Usage::InputTokensDetails] The input tokens detailed information for the image generation. + # @param input_tokens_details [OpenAI::Models::ImageEditCompletedEvent::Usage::InputTokensDetails] + # The input tokens detailed information for the image generation. # - # @param output_tokens [Integer] The number of image tokens in the output image. + # @param output_tokens [Integer] + # The number of image tokens in the output image. # - # @param total_tokens [Integer] The total number of tokens (images and text) used for the image generation. + # @param total_tokens [Integer] + # The total number of tokens (images and text) used for the image generation. # @see OpenAI::Models::ImageEditCompletedEvent::Usage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel @@ -216,9 +223,11 @@ class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(image_tokens:, text_tokens:) # The input tokens detailed information for the image generation. # - # @param image_tokens [Integer] The number of image tokens in the input prompt. + # @param image_tokens [Integer] + # The number of image tokens in the input prompt. # - # @param text_tokens [Integer] The number of text tokens in the input prompt. + # @param text_tokens [Integer] + # The number of text tokens in the input prompt. end end end diff --git a/lib/openai/models/image_edit_params.rb b/lib/openai/models/image_edit_params.rb index 2b6bbc9bb..12d5b43b4 100644 --- a/lib/openai/models/image_edit_params.rb +++ b/lib/openai/models/image_edit_params.rb @@ -154,42 +154,119 @@ class ImageEditParams < OpenAI::Internal::Type::BaseModel # @!attribute user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(image:, prompt:, background: nil, input_fidelity: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditParams} for more details. - # - # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] The image(s) to edit. Must be a supported image file or an array of images. - # - # @param prompt [String] A text description of the desired image(s). The maximum length is 1000 character - # - # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es - # - # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] An additional image whose fully transparent areas (e.g. where alpha is zero) ind - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2` or a GPT image model (` - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter - # - # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] The quality of the image that will be generated for GPT image models. The GPT im - # - # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or ` - # - # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] + # The image(s) to edit. Must be a supported image file or an array of images. + # + # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should + # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 + # images. + # + # For `dall-e-2`, you can only provide one image, and it should be a square `png` + # file less than 4MB. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 1000 + # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # + # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. This parameter is only supported + # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for + # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + # + # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] + # An additional image whose fully transparent areas (e.g. where alpha is zero) + # indicate where `image` should be edited. If there are multiple images provided, + # the mask will be applied on the first image. Must be a valid PNG file, less than + # 4MB, and have the same dimensions as `image`. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2` or a GPT image model + # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to + # `gpt-image-1.5`. + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The + # default value is `png`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] + # The quality of the image that will be generated for GPT image models. The GPT + # image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and + # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support + # `xhigh` and `max`. Defaults to `auto`. + # + # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] + # The format in which the generated images are returned. Must be one of `url` or + # `b64_json`. URLs are only valid for 60 minutes after the image has been + # generated. This parameter is only supported for `dall-e-2` (default is `url` for + # `dall-e-2`), as GPT image models always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/image_edit_partial_image_event.rb b/lib/openai/models/image_edit_partial_image_event.rb index eee42be53..47f209ecf 100644 --- a/lib/openai/models/image_edit_partial_image_event.rb +++ b/lib/openai/models/image_edit_partial_image_event.rb @@ -52,26 +52,31 @@ class ImageEditPartialImageEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"image_edit.partial_image" # @!method initialize(b64_json:, background:, created_at:, output_format:, partial_image_index:, quality:, size:, type: :"image_edit.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditPartialImageEvent} for more details. - # # Emitted when a partial image is available during image editing streaming. # - # @param b64_json [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param b64_json [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param background [Symbol, OpenAI::Models::ImageEditPartialImageEvent::Background] The background setting for the requested edited image. + # @param background [Symbol, OpenAI::Models::ImageEditPartialImageEvent::Background] + # The background setting for the requested edited image. # - # @param created_at [Integer] The Unix timestamp when the event was created. + # @param created_at [Integer] + # The Unix timestamp when the event was created. # - # @param output_format [Symbol, OpenAI::Models::ImageEditPartialImageEvent::OutputFormat] The output format for the requested edited image. + # @param output_format [Symbol, OpenAI::Models::ImageEditPartialImageEvent::OutputFormat] + # The output format for the requested edited image. # - # @param partial_image_index [Integer] 0-based index for the partial image (streaming). + # @param partial_image_index [Integer] + # 0-based index for the partial image (streaming). # - # @param quality [Symbol, OpenAI::Models::ImageEditPartialImageEvent::Quality] The quality setting for the requested edited image. + # @param quality [Symbol, OpenAI::Models::ImageEditPartialImageEvent::Quality] + # The quality setting for the requested edited image. # - # @param size [String, Symbol, OpenAI::Models::ImageEditPartialImageEvent::Size] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::ImageEditPartialImageEvent::Size] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :"image_edit.partial_image"] The type of the event. Always `image_edit.partial_image`. + # @param type [Symbol, :"image_edit.partial_image"] + # The type of the event. Always `image_edit.partial_image`. # The background setting for the requested edited image. # diff --git a/lib/openai/models/image_gen_completed_event.rb b/lib/openai/models/image_gen_completed_event.rb index 133954d7c..93798be49 100644 --- a/lib/openai/models/image_gen_completed_event.rb +++ b/lib/openai/models/image_gen_completed_event.rb @@ -53,26 +53,32 @@ class ImageGenCompletedEvent < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::ImageGenCompletedEvent::Usage } # @!method initialize(b64_json:, background:, created_at:, output_format:, quality:, size:, usage:, type: :"image_generation.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenCompletedEvent} for more details. - # # Emitted when image generation has completed and the final image is available. # - # @param b64_json [String] Base64-encoded image data, suitable for rendering as an image. + # @param b64_json [String] + # Base64-encoded image data, suitable for rendering as an image. # - # @param background [Symbol, OpenAI::Models::ImageGenCompletedEvent::Background] The background setting for the generated image. + # @param background [Symbol, OpenAI::Models::ImageGenCompletedEvent::Background] + # The background setting for the generated image. # - # @param created_at [Integer] The Unix timestamp when the event was created. + # @param created_at [Integer] + # The Unix timestamp when the event was created. # - # @param output_format [Symbol, OpenAI::Models::ImageGenCompletedEvent::OutputFormat] The output format for the generated image. + # @param output_format [Symbol, OpenAI::Models::ImageGenCompletedEvent::OutputFormat] + # The output format for the generated image. # - # @param quality [Symbol, OpenAI::Models::ImageGenCompletedEvent::Quality] The quality setting for the generated image. + # @param quality [Symbol, OpenAI::Models::ImageGenCompletedEvent::Quality] + # The quality setting for the generated image. # - # @param size [String, Symbol, OpenAI::Models::ImageGenCompletedEvent::Size] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::ImageGenCompletedEvent::Size] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param usage [OpenAI::Models::ImageGenCompletedEvent::Usage] For the GPT image models only, the token usage information for the image generat + # @param usage [OpenAI::Models::ImageGenCompletedEvent::Usage] + # For the GPT image models only, the token usage information for the image + # generation. # - # @param type [Symbol, :"image_generation.completed"] The type of the event. Always `image_generation.completed`. + # @param type [Symbol, :"image_generation.completed"] + # The type of the event. Always `image_generation.completed`. # The background setting for the generated image. # @@ -185,19 +191,20 @@ class Usage < OpenAI::Internal::Type::BaseModel required :total_tokens, Integer # @!method initialize(input_tokens:, input_tokens_details:, output_tokens:, total_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenCompletedEvent::Usage} for more details. - # # For the GPT image models only, the token usage information for the image # generation. # - # @param input_tokens [Integer] The number of tokens (images and text) in the input prompt. + # @param input_tokens [Integer] + # The number of tokens (images and text) in the input prompt. # - # @param input_tokens_details [OpenAI::Models::ImageGenCompletedEvent::Usage::InputTokensDetails] The input tokens detailed information for the image generation. + # @param input_tokens_details [OpenAI::Models::ImageGenCompletedEvent::Usage::InputTokensDetails] + # The input tokens detailed information for the image generation. # - # @param output_tokens [Integer] The number of image tokens in the output image. + # @param output_tokens [Integer] + # The number of image tokens in the output image. # - # @param total_tokens [Integer] The total number of tokens (images and text) used for the image generation. + # @param total_tokens [Integer] + # The total number of tokens (images and text) used for the image generation. # @see OpenAI::Models::ImageGenCompletedEvent::Usage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel @@ -216,9 +223,11 @@ class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(image_tokens:, text_tokens:) # The input tokens detailed information for the image generation. # - # @param image_tokens [Integer] The number of image tokens in the input prompt. + # @param image_tokens [Integer] + # The number of image tokens in the input prompt. # - # @param text_tokens [Integer] The number of text tokens in the input prompt. + # @param text_tokens [Integer] + # The number of text tokens in the input prompt. end end end diff --git a/lib/openai/models/image_gen_partial_image_event.rb b/lib/openai/models/image_gen_partial_image_event.rb index 4834ef4ab..65791be1e 100644 --- a/lib/openai/models/image_gen_partial_image_event.rb +++ b/lib/openai/models/image_gen_partial_image_event.rb @@ -52,26 +52,31 @@ class ImageGenPartialImageEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"image_generation.partial_image" # @!method initialize(b64_json:, background:, created_at:, output_format:, partial_image_index:, quality:, size:, type: :"image_generation.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenPartialImageEvent} for more details. - # # Emitted when a partial image is available during image generation streaming. # - # @param b64_json [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param b64_json [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param background [Symbol, OpenAI::Models::ImageGenPartialImageEvent::Background] The background setting for the requested image. + # @param background [Symbol, OpenAI::Models::ImageGenPartialImageEvent::Background] + # The background setting for the requested image. # - # @param created_at [Integer] The Unix timestamp when the event was created. + # @param created_at [Integer] + # The Unix timestamp when the event was created. # - # @param output_format [Symbol, OpenAI::Models::ImageGenPartialImageEvent::OutputFormat] The output format for the requested image. + # @param output_format [Symbol, OpenAI::Models::ImageGenPartialImageEvent::OutputFormat] + # The output format for the requested image. # - # @param partial_image_index [Integer] 0-based index for the partial image (streaming). + # @param partial_image_index [Integer] + # 0-based index for the partial image (streaming). # - # @param quality [Symbol, OpenAI::Models::ImageGenPartialImageEvent::Quality] The quality setting for the requested image. + # @param quality [Symbol, OpenAI::Models::ImageGenPartialImageEvent::Quality] + # The quality setting for the requested image. # - # @param size [String, Symbol, OpenAI::Models::ImageGenPartialImageEvent::Size] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::ImageGenPartialImageEvent::Size] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :"image_generation.partial_image"] The type of the event. Always `image_generation.partial_image`. + # @param type [Symbol, :"image_generation.partial_image"] + # The type of the event. Always `image_generation.partial_image`. # The background setting for the requested image. # diff --git a/lib/openai/models/image_generate_params.rb b/lib/openai/models/image_generate_params.rb index cafe97f5c..e347b752a 100644 --- a/lib/openai/models/image_generate_params.rb +++ b/lib/openai/models/image_generate_params.rb @@ -135,40 +135,103 @@ class ImageGenerateParams < OpenAI::Internal::Type::BaseModel # @!attribute user # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, style: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenerateParams} for more details. - # - # @param prompt [String] A text description of the desired image(s). The maximum length is 32000 characte - # - # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT i - # - # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] Control the content-moderation level for images generated by the GPT image model - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter is only - # - # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is only su - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] The quality of the image that will be generated. - # - # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] The format in which generated images with `dall-e-2` and `dall-e-3` are returned - # - # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] The style of the generated images. This parameter is only supported for `dall-e- - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 + # characters for `dall-e-3`. + # + # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT + # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter + # specific to the GPT image models is used. + # + # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] + # Control the content-moderation level for images generated by the GPT image + # models. Must be either `low` for less restrictive filtering or `auto` (default + # value). + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only + # `n=1` is supported. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] + # The quality of the image that will be generated. + # + # - `auto` (default value) will automatically select the best quality for the + # given model. + # - `high`, `medium` and `low` are supported for the GPT image models. + # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their + # `2026-09-08` snapshots, also support `xhigh` and `max`. + # - `hd` and `standard` are supported for `dall-e-3`. + # - `standard` is the only option for `dall-e-2`. + # + # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] + # The format in which generated images with `dall-e-2` and `dall-e-3` are + # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes + # after the image has been generated. This parameter isn't supported for the GPT + # image models, which always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] + # The style of the generated images. This parameter is only supported for + # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean + # towards generating hyper-real and dramatic images. Natural causes the model to + # produce more natural, less hyper-real looking images. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/image_input_reference_param.rb b/lib/openai/models/image_input_reference_param.rb index 32cf3526d..8d9c0b6ab 100644 --- a/lib/openai/models/image_input_reference_param.rb +++ b/lib/openai/models/image_input_reference_param.rb @@ -17,7 +17,8 @@ class ImageInputReferenceParam < OpenAI::Internal::Type::BaseModel # @!method initialize(file_id: nil, image_url: nil) # @param file_id [String] # - # @param image_url [String] A fully qualified URL or base64-encoded data URL. + # @param image_url [String] + # A fully qualified URL or base64-encoded data URL. end end end diff --git a/lib/openai/models/images_response.rb b/lib/openai/models/images_response.rb index b7e4bc2fa..cd3251860 100644 --- a/lib/openai/models/images_response.rb +++ b/lib/openai/models/images_response.rb @@ -49,24 +49,30 @@ class ImagesResponse < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::ImagesResponse::Usage } # @!method initialize(created:, background: nil, data: nil, output_format: nil, quality: nil, size: nil, usage: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImagesResponse} for more details. - # # The response from the image generation endpoint. # - # @param created [Integer] The Unix timestamp (in seconds) of when the image was created. + # @param created [Integer] + # The Unix timestamp (in seconds) of when the image was created. # - # @param background [Symbol, OpenAI::Models::ImagesResponse::Background] The background parameter used for the image generation. Either `transparent` or + # @param background [Symbol, OpenAI::Models::ImagesResponse::Background] + # The background parameter used for the image generation. Either `transparent` or + # `opaque`. # - # @param data [Array] The list of generated images. + # @param data [Array] + # The list of generated images. # - # @param output_format [Symbol, OpenAI::Models::ImagesResponse::OutputFormat] The output format of the image generation. Either `png`, `webp`, or `jpeg`. + # @param output_format [Symbol, OpenAI::Models::ImagesResponse::OutputFormat] + # The output format of the image generation. Either `png`, `webp`, or `jpeg`. # - # @param quality [Symbol, OpenAI::Models::ImagesResponse::Quality] The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or + # @param quality [Symbol, OpenAI::Models::ImagesResponse::Quality] + # The quality of the image generated. One of `low`, `medium`, `high`, `xhigh`, or + # `max`. # - # @param size [String, Symbol, OpenAI::Models::ImagesResponse::Size] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::ImagesResponse::Size] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param usage [OpenAI::Models::ImagesResponse::Usage] For `gpt-image-1` only, the token usage information for the image generation. + # @param usage [OpenAI::Models::ImagesResponse::Usage] + # For `gpt-image-1` only, the token usage information for the image generation. # The background parameter used for the image generation. Either `transparent` or # `opaque`. @@ -184,15 +190,20 @@ class Usage < OpenAI::Internal::Type::BaseModel # @!method initialize(input_tokens:, input_tokens_details:, output_tokens:, total_tokens:, output_tokens_details: nil) # For `gpt-image-1` only, the token usage information for the image generation. # - # @param input_tokens [Integer] The number of tokens (images and text) in the input prompt. + # @param input_tokens [Integer] + # The number of tokens (images and text) in the input prompt. # - # @param input_tokens_details [OpenAI::Models::ImagesResponse::Usage::InputTokensDetails] The input tokens detailed information for the image generation. + # @param input_tokens_details [OpenAI::Models::ImagesResponse::Usage::InputTokensDetails] + # The input tokens detailed information for the image generation. # - # @param output_tokens [Integer] The number of output tokens generated by the model. + # @param output_tokens [Integer] + # The number of output tokens generated by the model. # - # @param total_tokens [Integer] The total number of tokens (images and text) used for the image generation. + # @param total_tokens [Integer] + # The total number of tokens (images and text) used for the image generation. # - # @param output_tokens_details [OpenAI::Models::ImagesResponse::Usage::OutputTokensDetails] The output token details for the image generation. + # @param output_tokens_details [OpenAI::Models::ImagesResponse::Usage::OutputTokensDetails] + # The output token details for the image generation. # @see OpenAI::Models::ImagesResponse::Usage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel @@ -211,9 +222,11 @@ class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(image_tokens:, text_tokens:) # The input tokens detailed information for the image generation. # - # @param image_tokens [Integer] The number of image tokens in the input prompt. + # @param image_tokens [Integer] + # The number of image tokens in the input prompt. # - # @param text_tokens [Integer] The number of text tokens in the input prompt. + # @param text_tokens [Integer] + # The number of text tokens in the input prompt. end # @see OpenAI::Models::ImagesResponse::Usage#output_tokens_details @@ -233,9 +246,11 @@ class OutputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(image_tokens:, text_tokens:) # The output token details for the image generation. # - # @param image_tokens [Integer] The number of image output tokens generated by the model. + # @param image_tokens [Integer] + # The number of image output tokens generated by the model. # - # @param text_tokens [Integer] The number of text output tokens generated by the model. + # @param text_tokens [Integer] + # The number of text output tokens generated by the model. end end end diff --git a/lib/openai/models/model.rb b/lib/openai/models/model.rb index 25637ecf2..a427da50b 100644 --- a/lib/openai/models/model.rb +++ b/lib/openai/models/model.rb @@ -37,15 +37,20 @@ class Model < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created:, owned_by:, shutdown_date: nil, object: :model) # Describes an OpenAI model offering that can be used with the API. # - # @param id [String] The model identifier, which can be referenced in the API endpoints. + # @param id [String] + # The model identifier, which can be referenced in the API endpoints. # - # @param created [Integer] The Unix timestamp (in seconds) when the model was created. + # @param created [Integer] + # The Unix timestamp (in seconds) when the model was created. # - # @param owned_by [String] The organization that owns the model. + # @param owned_by [String] + # The organization that owns the model. # - # @param shutdown_date [Date, nil] The date when the model will shut down, or null if not announced. + # @param shutdown_date [Date, nil] + # The date when the model will shut down, or null if not announced. # - # @param object [Symbol, :model] The object type, which is always "model". + # @param object [Symbol, :model] + # The object type, which is always "model". end end end diff --git a/lib/openai/models/moderation.rb b/lib/openai/models/moderation.rb index e74bc74fa..743021c89 100644 --- a/lib/openai/models/moderation.rb +++ b/lib/openai/models/moderation.rb @@ -28,16 +28,17 @@ class Moderation < OpenAI::Internal::Type::BaseModel required :flagged, OpenAI::Internal::Type::Boolean # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Moderation} for more details. + # @param categories [OpenAI::Models::Moderation::Categories] + # A list of the categories, and whether they are flagged or not. # - # @param categories [OpenAI::Models::Moderation::Categories] A list of the categories, and whether they are flagged or not. + # @param category_applied_input_types [OpenAI::Models::Moderation::CategoryAppliedInputTypes] + # A list of the categories along with the input type(s) that the score applies to. # - # @param category_applied_input_types [OpenAI::Models::Moderation::CategoryAppliedInputTypes] A list of the categories along with the input type(s) that the score applies to. + # @param category_scores [OpenAI::Models::Moderation::CategoryScores] + # A list of the categories along with their scores as predicted by model. # - # @param category_scores [OpenAI::Models::Moderation::CategoryScores] A list of the categories along with their scores as predicted by model. - # - # @param flagged [Boolean] Whether any of the below categories are flagged. + # @param flagged [Boolean] + # Whether any of the below categories are flagged. # @see OpenAI::Models::Moderation#categories class Categories < OpenAI::Internal::Type::BaseModel @@ -137,36 +138,63 @@ class Categories < OpenAI::Internal::Type::BaseModel required :violence_graphic, OpenAI::Internal::Type::Boolean, api_name: :"violence/graphic" # @!method initialize(harassment:, harassment_threatening:, hate:, hate_threatening:, illicit:, illicit_violent:, self_harm:, self_harm_instructions:, self_harm_intent:, sexual:, sexual_minors:, violence:, violence_graphic:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Moderation::Categories} for more details. - # # A list of the categories, and whether they are flagged or not. # - # @param harassment [Boolean] Content that expresses, incites, or promotes harassing language towards any targ - # - # @param harassment_threatening [Boolean] Harassment content that also includes violence or serious harm towards any targe - # - # @param hate [Boolean] Content that expresses, incites, or promotes hate based on race, gender, ethnici - # - # @param hate_threatening [Boolean] Hateful content that also includes violence or serious harm towards the targeted - # - # @param illicit [Boolean, nil] Content that includes instructions or advice that facilitate the planning or exe - # - # @param illicit_violent [Boolean, nil] Content that includes instructions or advice that facilitate the planning or exe - # - # @param self_harm [Boolean] Content that promotes, encourages, or depicts acts of self-harm, such as suicide - # - # @param self_harm_instructions [Boolean] Content that encourages performing acts of self-harm, such as suicide, cutting, - # - # @param self_harm_intent [Boolean] Content where the speaker expresses that they are engaging or intend to engage i - # - # @param sexual [Boolean] Content meant to arouse sexual excitement, such as the description of sexual act - # - # @param sexual_minors [Boolean] Sexual content that includes an individual who is under 18 years old. - # - # @param violence [Boolean] Content that depicts death, violence, or physical injury. - # - # @param violence_graphic [Boolean] Content that depicts death, violence, or physical injury in graphic detail. + # @param harassment [Boolean] + # Content that expresses, incites, or promotes harassing language towards any + # target. + # + # @param harassment_threatening [Boolean] + # Harassment content that also includes violence or serious harm towards any + # target. + # + # @param hate [Boolean] + # Content that expresses, incites, or promotes hate based on race, gender, + # ethnicity, religion, nationality, sexual orientation, disability status, or + # caste. Hateful content aimed at non-protected groups (e.g., chess players) is + # harassment. + # + # @param hate_threatening [Boolean] + # Hateful content that also includes violence or serious harm towards the targeted + # group based on race, gender, ethnicity, religion, nationality, sexual + # orientation, disability status, or caste. + # + # @param illicit [Boolean, nil] + # Content that includes instructions or advice that facilitate the planning or + # execution of wrongdoing, or that gives advice or instruction on how to commit + # illicit acts. For example, "how to shoplift" would fit this category. + # + # @param illicit_violent [Boolean, nil] + # Content that includes instructions or advice that facilitate the planning or + # execution of wrongdoing that also includes violence, or that gives advice or + # instruction on the procurement of any weapon. + # + # @param self_harm [Boolean] + # Content that promotes, encourages, or depicts acts of self-harm, such as + # suicide, cutting, and eating disorders. + # + # @param self_harm_instructions [Boolean] + # Content that encourages performing acts of self-harm, such as suicide, cutting, + # and eating disorders, or that gives instructions or advice on how to commit such + # acts. + # + # @param self_harm_intent [Boolean] + # Content where the speaker expresses that they are engaging or intend to engage + # in acts of self-harm, such as suicide, cutting, and eating disorders. + # + # @param sexual [Boolean] + # Content meant to arouse sexual excitement, such as the description of sexual + # activity, or that promotes sexual services (excluding sex education and + # wellness). + # + # @param sexual_minors [Boolean] + # Sexual content that includes an individual who is under 18 years old. + # + # @param violence [Boolean] + # Content that depicts death, violence, or physical injury. + # + # @param violence_graphic [Boolean] + # Content that depicts death, violence, or physical injury in graphic detail. end # @see OpenAI::Models::Moderation#category_applied_input_types @@ -315,32 +343,44 @@ class CategoryAppliedInputTypes < OpenAI::Internal::Type::BaseModel # @!method initialize(harassment:, harassment_threatening:, hate:, hate_threatening:, illicit:, illicit_violent:, self_harm:, self_harm_instructions:, self_harm_intent:, sexual:, sexual_minors:, violence:, violence_graphic:) # A list of the categories along with the input type(s) that the score applies to. # - # @param harassment [Array] The applied input type(s) for the category 'harassment'. + # @param harassment [Array] + # The applied input type(s) for the category 'harassment'. # - # @param harassment_threatening [Array] The applied input type(s) for the category 'harassment/threatening'. + # @param harassment_threatening [Array] + # The applied input type(s) for the category 'harassment/threatening'. # - # @param hate [Array] The applied input type(s) for the category 'hate'. + # @param hate [Array] + # The applied input type(s) for the category 'hate'. # - # @param hate_threatening [Array] The applied input type(s) for the category 'hate/threatening'. + # @param hate_threatening [Array] + # The applied input type(s) for the category 'hate/threatening'. # - # @param illicit [Array] The applied input type(s) for the category 'illicit'. + # @param illicit [Array] + # The applied input type(s) for the category 'illicit'. # - # @param illicit_violent [Array] The applied input type(s) for the category 'illicit/violent'. + # @param illicit_violent [Array] + # The applied input type(s) for the category 'illicit/violent'. # - # @param self_harm [Array] The applied input type(s) for the category 'self-harm'. + # @param self_harm [Array] + # The applied input type(s) for the category 'self-harm'. # - # @param self_harm_instructions [Array] The applied input type(s) for the category 'self-harm/instructions'. + # @param self_harm_instructions [Array] + # The applied input type(s) for the category 'self-harm/instructions'. # - # @param self_harm_intent [Array] The applied input type(s) for the category 'self-harm/intent'. + # @param self_harm_intent [Array] + # The applied input type(s) for the category 'self-harm/intent'. # - # @param sexual [Array] The applied input type(s) for the category 'sexual'. + # @param sexual [Array] + # The applied input type(s) for the category 'sexual'. # - # @param sexual_minors [Array] The applied input type(s) for the category 'sexual/minors'. + # @param sexual_minors [Array] + # The applied input type(s) for the category 'sexual/minors'. # - # @param violence [Array] The applied input type(s) for the category 'violence'. + # @param violence [Array] + # The applied input type(s) for the category 'violence'. # - # @param violence_graphic [Array] The applied input type(s) for the category 'violence/graphic'. - + # @param violence_graphic [Array] + # The applied input type(s) for the category 'violence/graphic'. module Harassment extend OpenAI::Internal::Type::Enum @@ -548,31 +588,44 @@ class CategoryScores < OpenAI::Internal::Type::BaseModel # @!method initialize(harassment:, harassment_threatening:, hate:, hate_threatening:, illicit:, illicit_violent:, self_harm:, self_harm_instructions:, self_harm_intent:, sexual:, sexual_minors:, violence:, violence_graphic:) # A list of the categories along with their scores as predicted by model. # - # @param harassment [Float] The score for the category 'harassment'. + # @param harassment [Float] + # The score for the category 'harassment'. # - # @param harassment_threatening [Float] The score for the category 'harassment/threatening'. + # @param harassment_threatening [Float] + # The score for the category 'harassment/threatening'. # - # @param hate [Float] The score for the category 'hate'. + # @param hate [Float] + # The score for the category 'hate'. # - # @param hate_threatening [Float] The score for the category 'hate/threatening'. + # @param hate_threatening [Float] + # The score for the category 'hate/threatening'. # - # @param illicit [Float] The score for the category 'illicit'. + # @param illicit [Float] + # The score for the category 'illicit'. # - # @param illicit_violent [Float] The score for the category 'illicit/violent'. + # @param illicit_violent [Float] + # The score for the category 'illicit/violent'. # - # @param self_harm [Float] The score for the category 'self-harm'. + # @param self_harm [Float] + # The score for the category 'self-harm'. # - # @param self_harm_instructions [Float] The score for the category 'self-harm/instructions'. + # @param self_harm_instructions [Float] + # The score for the category 'self-harm/instructions'. # - # @param self_harm_intent [Float] The score for the category 'self-harm/intent'. + # @param self_harm_intent [Float] + # The score for the category 'self-harm/intent'. # - # @param sexual [Float] The score for the category 'sexual'. + # @param sexual [Float] + # The score for the category 'sexual'. # - # @param sexual_minors [Float] The score for the category 'sexual/minors'. + # @param sexual_minors [Float] + # The score for the category 'sexual/minors'. # - # @param violence [Float] The score for the category 'violence'. + # @param violence [Float] + # The score for the category 'violence'. # - # @param violence_graphic [Float] The score for the category 'violence/graphic'. + # @param violence_graphic [Float] + # The score for the category 'violence/graphic'. end end end diff --git a/lib/openai/models/moderation_create_params.rb b/lib/openai/models/moderation_create_params.rb index 42e761d86..f361879b2 100644 --- a/lib/openai/models/moderation_create_params.rb +++ b/lib/openai/models/moderation_create_params.rb @@ -16,20 +16,23 @@ class ModerationCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute model # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). # # @return [String, Symbol, OpenAI::Models::ModerationModel, nil] optional :model, union: -> { OpenAI::ModerationCreateParams::Model } # @!method initialize(input:, model: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ModerationCreateParams} for more details. + # @param input [String, Array, Array] + # Input (or inputs) to classify. Can be a single string, an array of strings, or + # an array of multi-modal input objects similar to other models. # - # @param input [String, Array, Array] Input (or inputs) to classify. Can be a single string, an array of strings, or - # - # @param model [String, Symbol, OpenAI::Models::ModerationModel] The content moderation model you would like to use. Learn more in + # @param model [String, Symbol, OpenAI::Models::ModerationModel] + # The content moderation model you would like to use. Learn more in + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -60,17 +63,17 @@ module Input end # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). module Model extend OpenAI::Internal::Type::Union variant String # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about - # available models [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), and learn about + # available models [here](https://developers.openai.com/api/docs/guides/moderation). variant enum: -> { OpenAI::ModerationModel } # @!method self.variants diff --git a/lib/openai/models/moderation_create_response.rb b/lib/openai/models/moderation_create_response.rb index 0085e8a83..fcac162ac 100644 --- a/lib/openai/models/moderation_create_response.rb +++ b/lib/openai/models/moderation_create_response.rb @@ -25,11 +25,14 @@ class ModerationCreateResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, model:, results:) # Represents if a given text input is potentially harmful. # - # @param id [String] The unique identifier for the moderation request. + # @param id [String] + # The unique identifier for the moderation request. # - # @param model [String] The model used to generate the moderation results. + # @param model [String] + # The model used to generate the moderation results. # - # @param results [Array] A list of moderation objects. + # @param results [Array] + # A list of moderation objects. end end end diff --git a/lib/openai/models/moderation_image_url_input.rb b/lib/openai/models/moderation_image_url_input.rb index dca658e18..93e863a19 100644 --- a/lib/openai/models/moderation_image_url_input.rb +++ b/lib/openai/models/moderation_image_url_input.rb @@ -18,9 +18,11 @@ class ModerationImageURLInput < OpenAI::Internal::Type::BaseModel # @!method initialize(image_url:, type: :image_url) # An object describing an image to classify. # - # @param image_url [OpenAI::Models::ModerationImageURLInput::ImageURL] Contains either an image URL or a data URL for a base64 encoded image. + # @param image_url [OpenAI::Models::ModerationImageURLInput::ImageURL] + # Contains either an image URL or a data URL for a base64 encoded image. # - # @param type [Symbol, :image_url] Always `image_url`. + # @param type [Symbol, :image_url] + # Always `image_url`. # @see OpenAI::Models::ModerationImageURLInput#image_url class ImageURL < OpenAI::Internal::Type::BaseModel @@ -33,7 +35,8 @@ class ImageURL < OpenAI::Internal::Type::BaseModel # @!method initialize(url:) # Contains either an image URL or a data URL for a base64 encoded image. # - # @param url [String] Either a URL of the image or the base64 encoded image data. + # @param url [String] + # Either a URL of the image or the base64 encoded image data. end end end diff --git a/lib/openai/models/moderation_text_input.rb b/lib/openai/models/moderation_text_input.rb index 087178f86..8cba0009b 100644 --- a/lib/openai/models/moderation_text_input.rb +++ b/lib/openai/models/moderation_text_input.rb @@ -18,9 +18,11 @@ class ModerationTextInput < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :text) # An object describing text to classify. # - # @param text [String] A string of text to classify. + # @param text [String] + # A string of text to classify. # - # @param type [Symbol, :text] Always `text`. + # @param type [Symbol, :text] + # Always `text`. end end end diff --git a/lib/openai/models/other_file_chunking_strategy_object.rb b/lib/openai/models/other_file_chunking_strategy_object.rb index 72fc9de8b..a82de64b9 100644 --- a/lib/openai/models/other_file_chunking_strategy_object.rb +++ b/lib/openai/models/other_file_chunking_strategy_object.rb @@ -14,7 +14,8 @@ class OtherFileChunkingStrategyObject < OpenAI::Internal::Type::BaseModel # because the file was indexed before the `chunking_strategy` concept was # introduced in the API. # - # @param type [Symbol, :other] Always `other`. + # @param type [Symbol, :other] + # Always `other`. end end end diff --git a/lib/openai/models/realtime/audio_transcription.rb b/lib/openai/models/realtime/audio_transcription.rb index 053f1514b..5bc350de7 100644 --- a/lib/openai/models/realtime/audio_transcription.rb +++ b/lib/openai/models/realtime/audio_transcription.rb @@ -48,7 +48,7 @@ class AudioTranscription < OpenAI::Internal::Type::BaseModel # @!attribute prompt # An optional text to guide the model's style or continue a previous audio # segment. For `whisper-1`, the - # [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + # [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). # For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the # prompt is a free text string, for example "expect words related to technology". # Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. @@ -57,20 +57,39 @@ class AudioTranscription < OpenAI::Internal::Type::BaseModel optional :prompt, String # @!method initialize(delay: nil, keywords: nil, language: nil, languages: nil, model: nil, prompt: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::AudioTranscription} for more details. + # @param delay [Symbol, OpenAI::Models::Realtime::AudioTranscription::Delay] + # Controls how long the model waits before emitting transcription text. Higher + # values can improve transcription accuracy at the cost of latency. Only supported + # with `gpt-realtime-whisper` in GA Realtime sessions. # - # @param delay [Symbol, OpenAI::Models::Realtime::AudioTranscription::Delay] Controls how long the model waits before emitting transcription text. + # @param keywords [Array] + # Words or phrases to guide transcription of the input audio. Supported by + # `gpt-transcribe` and `gpt-live-transcribe`. # - # @param keywords [Array] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr + # @param language [String] + # The language of the input audio. Supplying the input language in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) + # format will improve accuracy and latency. # - # @param language [String] The language of the input audio. Supplying the input language in + # @param languages [Array] + # Possible languages of the input audio, in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. + # Supported by `gpt-transcribe` and `gpt-live-transcribe`. # - # @param languages [Array] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w + # @param model [String, Symbol, OpenAI::Models::Realtime::AudioTranscription::Model] + # The model to use for transcription. Current options are `whisper-1`, + # `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, + # `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, + # `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use + # `gpt-4o-transcribe-diarize` when you need diarization with speaker labels. # - # @param model [String, Symbol, OpenAI::Models::Realtime::AudioTranscription::Model] The model to use for transcription. Current options are `whisper-1`, `gpt-transc - # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. For `whisper-1`, the + # [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). + # For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the + # prompt is a free text string, for example "expect words related to technology". + # Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. # Controls how long the model waits before emitting transcription text. Higher # values can improve transcription accuracy at the cost of latency. Only supported diff --git a/lib/openai/models/realtime/call_accept_params.rb b/lib/openai/models/realtime/call_accept_params.rb index e4acd7147..f7a0eedaf 100644 --- a/lib/openai/models/realtime/call_accept_params.rb +++ b/lib/openai/models/realtime/call_accept_params.rb @@ -14,38 +14,93 @@ class CallAcceptParams < OpenAI::Models::Realtime::RealtimeSessionCreateRequest required :call_id, String # @!method initialize(call_id:, audio: nil, include: nil, instructions: nil, max_output_tokens: nil, model: nil, output_modalities: nil, parallel_tool_calls: nil, prompt: nil, reasoning: nil, tool_choice: nil, tools: nil, tracing: nil, truncation: nil, type: :realtime, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallAcceptParams} for more details. - # # @param call_id [String] # - # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] Configuration for input and output audio. - # - # @param include [Array] Additional fields to include in server outputs. - # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model calls. - # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, - # - # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] The Realtime model used for this session. - # - # @param output_modalities [Array] The set of modalities the model can respond with. It defaults to `["audio"]`, in - # - # @param parallel_tool_calls [Boolean] Whether the model may call multiple tools in parallel. Only supported by - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model chooses tools. Provide one of the string modes or force a specific - # - # @param tools [Array] Tools available to the model. - # - # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] Realtime API can write session traces to the [Traces Dashboard](https://platform - # - # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] When the number of tokens in a conversation exceeds the model's input token limi - # - # @param type [Symbol, :realtime] The type of session to create. Always `realtime` for the Realtime API. + # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] + # Configuration for input and output audio. + # + # @param include [Array] + # Additional fields to include in server outputs. + # + # `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. + # + # Note that the server sets default instructions which will be used if this field + # is not set and are visible in the `session.created` event at the start of the + # session. + # + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. + # + # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] + # The Realtime model used for this session. + # + # @param output_modalities [Array] + # The set of modalities the model can respond with. It defaults to `["audio"]`, + # indicating that the model will respond with audio plus a transcript. `["text"]` + # can be used to make the model respond with text only. It is not possible to + # request both `text` and `audio` at the same time. + # + # @param parallel_tool_calls [Boolean] + # Whether the model may call multiple tools in parallel. Only supported by + # reasoning Realtime models such as `gpt-realtime-2`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] + # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] + # How the model chooses tools. Provide one of the string modes or force a specific + # function/MCP tool. + # + # @param tools [Array] + # Tools available to the model. + # + # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] + # Realtime API can write session traces to the + # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to + # disable tracing. Once tracing is enabled for a session, the configuration cannot + # be modified. + # + # `auto` will create a trace for the session with default values for the workflow + # name, group id, and metadata. + # + # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] + # When the number of tokens in a conversation exceeds the model's input token + # limit, the conversation be truncated, meaning messages (starting from the + # oldest) will not be included in the model's context. A 32k context model with + # 4,096 max output tokens can only include 28,224 tokens in the context before + # truncation occurs. + # + # Clients can configure truncation behavior to truncate with a lower max token + # limit, which is an effective way to control token usage and cost. + # + # Truncation will reduce the number of cached tokens on the next turn (busting the + # cache), since messages are dropped from the beginning of the context. However, + # clients can also configure truncation to retain messages up to a fraction of the + # maximum context size, which will reduce the need for future truncations and thus + # improve the cache rate. + # + # Truncation can be disabled entirely, which means the server will never truncate + # but would instead return an error if the conversation exceeds the model's input + # token limit. + # + # @param type [Symbol, :realtime] + # The type of session to create. Always `realtime` for the Realtime API. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/realtime/call_create_params.rb b/lib/openai/models/realtime/call_create_params.rb index 092bbc69c..876ff75ad 100644 --- a/lib/openai/models/realtime/call_create_params.rb +++ b/lib/openai/models/realtime/call_create_params.rb @@ -21,9 +21,11 @@ class CallCreateParams < OpenAI::Internal::Type::BaseModel optional :session, -> { OpenAI::Realtime::RealtimeSessionCreateRequest } # @!method initialize(sdp:, session: nil, request_options: {}) - # @param sdp [String] WebRTC Session Description Protocol (SDP) offer generated by the caller. + # @param sdp [String] + # WebRTC Session Description Protocol (SDP) offer generated by the caller. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest] Realtime session object configuration. + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest] + # Realtime session object configuration. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/realtime/call_refer_params.rb b/lib/openai/models/realtime/call_refer_params.rb index 324bc8de4..79e5fe5d2 100644 --- a/lib/openai/models/realtime/call_refer_params.rb +++ b/lib/openai/models/realtime/call_refer_params.rb @@ -21,12 +21,11 @@ class CallReferParams < OpenAI::Internal::Type::BaseModel required :target_uri, String # @!method initialize(call_id:, target_uri:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallReferParams} for more details. - # # @param call_id [String] # - # @param target_uri [String] URI that should appear in the SIP Refer-To header. Supports values like + # @param target_uri [String] + # URI that should appear in the SIP Refer-To header. Supports values like + # `tel:+14155550123` or `sip:agent@example.com`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/realtime/call_reject_params.rb b/lib/openai/models/realtime/call_reject_params.rb index 7b1097e15..ecba3648e 100644 --- a/lib/openai/models/realtime/call_reject_params.rb +++ b/lib/openai/models/realtime/call_reject_params.rb @@ -21,12 +21,11 @@ class CallRejectParams < OpenAI::Internal::Type::BaseModel optional :status_code, Integer # @!method initialize(call_id:, status_code: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallRejectParams} for more details. - # # @param call_id [String] # - # @param status_code [Integer] SIP response code to send back to the caller. Defaults to `603` (Decline) + # @param status_code [Integer] + # SIP response code to send back to the caller. Defaults to `603` (Decline) when + # omitted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/realtime/client_secret_create_params.rb b/lib/openai/models/realtime/client_secret_create_params.rb index f48f85c56..f979e6f02 100644 --- a/lib/openai/models/realtime/client_secret_create_params.rb +++ b/lib/openai/models/realtime/client_secret_create_params.rb @@ -25,12 +25,15 @@ class ClientSecretCreateParams < OpenAI::Internal::Type::BaseModel optional :session, union: -> { OpenAI::Realtime::ClientSecretCreateParams::Session } # @!method initialize(expires_after: nil, session: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ClientSecretCreateParams} for more details. + # @param expires_after [OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter] + # Configuration for the client secret expiration. Expiration refers to the time + # after which a client secret will no longer be valid for creating sessions. The + # session itself may continue after that time once started. A secret can be used + # to create multiple sessions until it expires. # - # @param expires_after [OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter] Configuration for the client secret expiration. Expiration refers to the time af - # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] Session configuration to use for the client secret. Choose either a realtime + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] + # Session configuration to use for the client secret. Choose either a realtime + # session or a transcription session. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -52,18 +55,20 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel optional :seconds, Integer # @!method initialize(anchor: nil, seconds: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter} for more - # details. - # # Configuration for the client secret expiration. Expiration refers to the time # after which a client secret will no longer be valid for creating sessions. The # session itself may continue after that time once started. A secret can be used # to create multiple sessions until it expires. # - # @param anchor [Symbol, OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter::Anchor] The anchor point for the client secret expiration, meaning that `seconds` will b + # @param anchor [Symbol, OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter::Anchor] + # The anchor point for the client secret expiration, meaning that `seconds` will + # be added to the `created_at` time of the client secret to produce an expiration + # timestamp. Only `created_at` is currently supported. # - # @param seconds [Integer] The number of seconds from the anchor point to the expiration. Select a value be + # @param seconds [Integer] + # The number of seconds from the anchor point to the expiration. Select a value + # between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if + # not specified. # The anchor point for the client secret expiration, meaning that `seconds` will # be added to the `created_at` time of the client secret to produce an expiration diff --git a/lib/openai/models/realtime/client_secret_create_response.rb b/lib/openai/models/realtime/client_secret_create_response.rb index 57cf5cdb3..e09d54d43 100644 --- a/lib/openai/models/realtime/client_secret_create_response.rb +++ b/lib/openai/models/realtime/client_secret_create_response.rb @@ -24,16 +24,16 @@ class ClientSecretCreateResponse < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(expires_at:, session:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ClientSecretCreateResponse} for more details. - # # Response from creating a session and client secret for the Realtime API. # - # @param expires_at [Integer] Expiration timestamp for the client secret, in seconds since epoch. + # @param expires_at [Integer] + # Expiration timestamp for the client secret, in seconds since epoch. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateResponse, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse] The session configuration for either a realtime or transcription session. + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateResponse, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse] + # The session configuration for either a realtime or transcription session. # - # @param value [String] The generated client secret value. + # @param value [String] + # The generated client secret value. # The session configuration for either a realtime or transcription session. # diff --git a/lib/openai/models/realtime/conversation_created_event.rb b/lib/openai/models/realtime/conversation_created_event.rb index cafdcac29..6ac75ceee 100644 --- a/lib/openai/models/realtime/conversation_created_event.rb +++ b/lib/openai/models/realtime/conversation_created_event.rb @@ -25,11 +25,14 @@ class ConversationCreatedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(conversation:, event_id:, type: :"conversation.created") # Returned when a conversation is created. Emitted right after session creation. # - # @param conversation [OpenAI::Models::Realtime::ConversationCreatedEvent::Conversation] The conversation resource. + # @param conversation [OpenAI::Models::Realtime::ConversationCreatedEvent::Conversation] + # The conversation resource. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param type [Symbol, :"conversation.created"] The event type, must be `conversation.created`. + # @param type [Symbol, :"conversation.created"] + # The event type, must be `conversation.created`. # @see OpenAI::Models::Realtime::ConversationCreatedEvent#conversation class Conversation < OpenAI::Internal::Type::BaseModel @@ -48,9 +51,11 @@ class Conversation < OpenAI::Internal::Type::BaseModel # @!method initialize(id: nil, object: nil) # The conversation resource. # - # @param id [String] The unique ID of the conversation. + # @param id [String] + # The unique ID of the conversation. # - # @param object [Symbol, OpenAI::Models::Realtime::ConversationCreatedEvent::Conversation::Object] The object type, must be `realtime.conversation`. + # @param object [Symbol, OpenAI::Models::Realtime::ConversationCreatedEvent::Conversation::Object] + # The object type, must be `realtime.conversation`. # The object type, must be `realtime.conversation`. # diff --git a/lib/openai/models/realtime/conversation_item_added.rb b/lib/openai/models/realtime/conversation_item_added.rb index 2e218b74c..2ced10304 100644 --- a/lib/openai/models/realtime/conversation_item_added.rb +++ b/lib/openai/models/realtime/conversation_item_added.rb @@ -30,9 +30,6 @@ class ConversationItemAdded < OpenAI::Internal::Type::BaseModel optional :previous_item_id, String, nil?: true # @!method initialize(event_id:, item:, previous_item_id: nil, type: :"conversation.item.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemAdded} for more details. - # # Sent by the server when an Item is added to the default Conversation. This can # happen in several cases: # @@ -48,13 +45,18 @@ class ConversationItemAdded < OpenAI::Internal::Type::BaseModel # generating a Response) except for audio data, which can be retrieved separately # with a `conversation.item.retrieve` event if necessary. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param previous_item_id [String, nil] The ID of the item that precedes this one, if any. This is used to + # @param previous_item_id [String, nil] + # The ID of the item that precedes this one, if any. This is used to maintain + # ordering when items are inserted. # - # @param type [Symbol, :"conversation.item.added"] The event type, must be `conversation.item.added`. + # @param type [Symbol, :"conversation.item.added"] + # The event type, must be `conversation.item.added`. end end end diff --git a/lib/openai/models/realtime/conversation_item_create_event.rb b/lib/openai/models/realtime/conversation_item_create_event.rb index 0d400cef1..8e9d0b6d5 100644 --- a/lib/openai/models/realtime/conversation_item_create_event.rb +++ b/lib/openai/models/realtime/conversation_item_create_event.rb @@ -37,9 +37,6 @@ class ConversationItemCreateEvent < OpenAI::Internal::Type::BaseModel optional :previous_item_id, String # @!method initialize(item:, event_id: nil, previous_item_id: nil, type: :"conversation.item.create") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemCreateEvent} for more details. - # # Add a new Item to the Conversation's context, including messages, function # calls, and function call responses. This event can be used both to populate a # "history" of the conversation and to add new items mid-stream, but has the @@ -48,13 +45,25 @@ class ConversationItemCreateEvent < OpenAI::Internal::Type::BaseModel # If successful, the server will respond with a `conversation.item.created` event, # otherwise an `error` event will be sent. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. + # + # @param event_id [String] + # Optional client-generated ID used to identify this event. + # + # @param previous_item_id [String] + # The ID of the preceding item after which the new item will be inserted. If not + # set, the new item will be appended to the end of the conversation. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # If set to `root`, the new item will be added to the beginning of the + # conversation. # - # @param previous_item_id [String] The ID of the preceding item after which the new item will be inserted. If not s + # If set to an existing ID, it allows an item to be inserted mid-conversation. If + # the ID cannot be found, an error will be returned and the item will not be + # added. # - # @param type [Symbol, :"conversation.item.create"] The event type, must be `conversation.item.create`. + # @param type [Symbol, :"conversation.item.create"] + # The event type, must be `conversation.item.create`. end end end diff --git a/lib/openai/models/realtime/conversation_item_created_event.rb b/lib/openai/models/realtime/conversation_item_created_event.rb index 56bc1adf1..71607a511 100644 --- a/lib/openai/models/realtime/conversation_item_created_event.rb +++ b/lib/openai/models/realtime/conversation_item_created_event.rb @@ -31,9 +31,6 @@ class ConversationItemCreatedEvent < OpenAI::Internal::Type::BaseModel optional :previous_item_id, String, nil?: true # @!method initialize(event_id:, item:, previous_item_id: nil, type: :"conversation.item.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemCreatedEvent} for more details. - # # Returned when a conversation item is created. There are several scenarios that # produce this event: # @@ -46,13 +43,19 @@ class ConversationItemCreatedEvent < OpenAI::Internal::Type::BaseModel # - The client has sent a `conversation.item.create` event to add a new Item to # the Conversation. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param previous_item_id [String, nil] The ID of the preceding item in the Conversation context, allows the + # @param previous_item_id [String, nil] + # The ID of the preceding item in the Conversation context, allows the client to + # understand the order of the conversation. Can be `null` if the item has no + # predecessor. # - # @param type [Symbol, :"conversation.item.created"] The event type, must be `conversation.item.created`. + # @param type [Symbol, :"conversation.item.created"] + # The event type, must be `conversation.item.created`. end end end diff --git a/lib/openai/models/realtime/conversation_item_delete_event.rb b/lib/openai/models/realtime/conversation_item_delete_event.rb index b65ac4ff1..6dc71435c 100644 --- a/lib/openai/models/realtime/conversation_item_delete_event.rb +++ b/lib/openai/models/realtime/conversation_item_delete_event.rb @@ -28,11 +28,14 @@ class ConversationItemDeleteEvent < OpenAI::Internal::Type::BaseModel # item does not exist in the conversation history, in which case the server will # respond with an error. # - # @param item_id [String] The ID of the item to delete. + # @param item_id [String] + # The ID of the item to delete. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"conversation.item.delete"] The event type, must be `conversation.item.delete`. + # @param type [Symbol, :"conversation.item.delete"] + # The event type, must be `conversation.item.delete`. end end end diff --git a/lib/openai/models/realtime/conversation_item_deleted_event.rb b/lib/openai/models/realtime/conversation_item_deleted_event.rb index f9c45d9b5..b16c05255 100644 --- a/lib/openai/models/realtime/conversation_item_deleted_event.rb +++ b/lib/openai/models/realtime/conversation_item_deleted_event.rb @@ -27,11 +27,14 @@ class ConversationItemDeletedEvent < OpenAI::Internal::Type::BaseModel # `conversation.item.delete` event. This event is used to synchronize the server's # understanding of the conversation history with the client's view. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item that was deleted. + # @param item_id [String] + # The ID of the item that was deleted. # - # @param type [Symbol, :"conversation.item.deleted"] The event type, must be `conversation.item.deleted`. + # @param type [Symbol, :"conversation.item.deleted"] + # The event type, must be `conversation.item.deleted`. end end end diff --git a/lib/openai/models/realtime/conversation_item_done.rb b/lib/openai/models/realtime/conversation_item_done.rb index 471c73d6c..6f06f2be9 100644 --- a/lib/openai/models/realtime/conversation_item_done.rb +++ b/lib/openai/models/realtime/conversation_item_done.rb @@ -30,21 +30,23 @@ class ConversationItemDone < OpenAI::Internal::Type::BaseModel optional :previous_item_id, String, nil?: true # @!method initialize(event_id:, item:, previous_item_id: nil, type: :"conversation.item.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemDone} for more details. - # # Returned when a conversation item is finalized. # # The event will include the full content of the Item except for audio data, which # can be retrieved separately with a `conversation.item.retrieve` event if needed. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param previous_item_id [String, nil] The ID of the item that precedes this one, if any. This is used to + # @param previous_item_id [String, nil] + # The ID of the item that precedes this one, if any. This is used to maintain + # ordering when items are inserted. # - # @param type [Symbol, :"conversation.item.done"] The event type, must be `conversation.item.done`. + # @param type [Symbol, :"conversation.item.done"] + # The event type, must be `conversation.item.done`. end end end diff --git a/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb b/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb index 64e29abd0..ff081ff1a 100644 --- a/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +++ b/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb @@ -62,10 +62,6 @@ class ConversationItemInputAudioTranscriptionCompletedEvent < OpenAI::Internal:: ) # @!method initialize(content_index:, event_id:, item_id:, transcript:, usage:, languages: nil, logprobs: nil, type: :"conversation.item.input_audio_transcription.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent} - # for more details. - # # This event is the output of audio transcription for user audio written to the # user audio buffer. Transcription begins when the input audio buffer is committed # by the client or server (when VAD is enabled). Transcription runs asynchronously @@ -77,21 +73,31 @@ class ConversationItemInputAudioTranscriptionCompletedEvent < OpenAI::Internal:: # transcript may diverge somewhat from the model's interpretation, and should be # treated as a rough guide. # - # @param content_index [Integer] The index of the content part containing the audio. + # @param content_index [Integer] + # The index of the content part containing the audio. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item containing the audio that is being transcribed. + # @param item_id [String] + # The ID of the item containing the audio that is being transcribed. # - # @param transcript [String] The transcribed text. + # @param transcript [String] + # The transcribed text. # - # @param usage [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens, OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageDuration] Usage statistics for the transcription, this is billed according to the ASR mode + # @param usage [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens, OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageDuration] + # Usage statistics for the transcription, this is billed according to the ASR + # model's pricing rather than the realtime model's pricing. # - # @param languages [Array] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra + # @param languages [Array] + # The languages detected in the audio. Returned by `gpt-transcribe`. An empty + # array indicates that no language could be reliably detected. # - # @param logprobs [Array, nil] The log probabilities of the transcription. + # @param logprobs [Array, nil] + # The log probabilities of the transcription. # - # @param type [Symbol, :"conversation.item.input_audio_transcription.completed"] The event type, must be + # @param type [Symbol, :"conversation.item.input_audio_transcription.completed"] + # The event type, must be `conversation.item.input_audio_transcription.completed`. # Usage statistics for the transcription, this is billed according to the ASR # model's pricing rather than the realtime model's pricing. @@ -153,15 +159,20 @@ class TranscriptTextUsageTokens < OpenAI::Internal::Type::BaseModel # @!method initialize(input_tokens:, output_tokens:, total_tokens:, input_token_details: nil, type: :tokens) # Usage statistics for models billed by token usage. # - # @param input_tokens [Integer] Number of input tokens billed for this request. + # @param input_tokens [Integer] + # Number of input tokens billed for this request. # - # @param output_tokens [Integer] Number of output tokens generated. + # @param output_tokens [Integer] + # Number of output tokens generated. # - # @param total_tokens [Integer] Total number of tokens used (input + output). + # @param total_tokens [Integer] + # Total number of tokens used (input + output). # - # @param input_token_details [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens::InputTokenDetails] Details about the input tokens billed for this request. + # @param input_token_details [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens::InputTokenDetails] + # Details about the input tokens billed for this request. # - # @param type [Symbol, :tokens] The type of the usage object. Always `tokens` for this variant. + # @param type [Symbol, :tokens] + # The type of the usage object. Always `tokens` for this variant. # @see OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens#input_token_details class InputTokenDetails < OpenAI::Internal::Type::BaseModel @@ -180,9 +191,11 @@ class InputTokenDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, text_tokens: nil) # Details about the input tokens billed for this request. # - # @param audio_tokens [Integer] Number of audio tokens billed for this request. + # @param audio_tokens [Integer] + # Number of audio tokens billed for this request. # - # @param text_tokens [Integer] Number of text tokens billed for this request. + # @param text_tokens [Integer] + # Number of text tokens billed for this request. end end @@ -202,9 +215,11 @@ class TranscriptTextUsageDuration < OpenAI::Internal::Type::BaseModel # @!method initialize(seconds:, type: :duration) # Usage statistics for models billed by audio input duration. # - # @param seconds [Float] Duration of the input audio in seconds. + # @param seconds [Float] + # Duration of the input audio in seconds. # - # @param type [Symbol, :duration] The type of the usage object. Always `duration` for this variant. + # @param type [Symbol, :duration] + # The type of the usage object. Always `duration` for this variant. end # @!method self.variants diff --git a/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb b/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb index 81f5de553..48ff49112 100644 --- a/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb +++ b/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb @@ -50,24 +50,31 @@ class ConversationItemInputAudioTranscriptionDeltaEvent < OpenAI::Internal::Type ) # @!method initialize(event_id:, item_id:, content_index: nil, delta: nil, logprobs: nil, type: :"conversation.item.input_audio_transcription.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionDeltaEvent} - # for more details. - # # Returned when the text value of an input audio transcription content part is # updated with incremental transcription results. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item containing the audio that is being transcribed. + # @param item_id [String] + # The ID of the item containing the audio that is being transcribed. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param delta [String] The text delta. + # @param delta [String] + # The text delta. # - # @param logprobs [Array, nil] The log probabilities of the transcription. These can be enabled by configuratin + # @param logprobs [Array, nil] + # The log probabilities of the transcription. These can be enabled by + # configurating the session with + # `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the + # array corresponds a log probability of which token would be selected for this + # chunk of transcription. This can help to identify if it was possible there were + # multiple valid options for a given chunk of transcription. # - # @param type [Symbol, :"conversation.item.input_audio_transcription.delta"] The event type, must be `conversation.item.input_audio_transcription.delta`. + # @param type [Symbol, :"conversation.item.input_audio_transcription.delta"] + # The event type, must be `conversation.item.input_audio_transcription.delta`. end end end diff --git a/lib/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rb b/lib/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rb index 426bcb68d..eaf3026ea 100644 --- a/lib/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rb +++ b/lib/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rb @@ -35,23 +35,24 @@ class ConversationItemInputAudioTranscriptionFailedEvent < OpenAI::Internal::Typ required :type, const: :"conversation.item.input_audio_transcription.failed" # @!method initialize(content_index:, error:, event_id:, item_id:, type: :"conversation.item.input_audio_transcription.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionFailedEvent} - # for more details. - # # Returned when input audio transcription is configured, and a transcription # request for a user message failed. These events are separate from other `error` # events so that the client can identify the related Item. # - # @param content_index [Integer] The index of the content part containing the audio. + # @param content_index [Integer] + # The index of the content part containing the audio. # - # @param error [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionFailedEvent::Error] Details of the transcription error. + # @param error [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionFailedEvent::Error] + # Details of the transcription error. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the user message item. + # @param item_id [String] + # The ID of the user message item. # - # @param type [Symbol, :"conversation.item.input_audio_transcription.failed"] The event type, must be + # @param type [Symbol, :"conversation.item.input_audio_transcription.failed"] + # The event type, must be `conversation.item.input_audio_transcription.failed`. # @see OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionFailedEvent#error class Error < OpenAI::Internal::Type::BaseModel @@ -82,13 +83,17 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code: nil, message: nil, param: nil, type: nil) # Details of the transcription error. # - # @param code [String] Error code, if any. + # @param code [String] + # Error code, if any. # - # @param message [String] A human-readable error message. + # @param message [String] + # A human-readable error message. # - # @param param [String] Parameter related to the error, if any. + # @param param [String] + # Parameter related to the error, if any. # - # @param type [String] The type of error. + # @param type [String] + # The type of error. end end end diff --git a/lib/openai/models/realtime/conversation_item_input_audio_transcription_segment.rb b/lib/openai/models/realtime/conversation_item_input_audio_transcription_segment.rb index c9efd7003..40e7e77d5 100644 --- a/lib/openai/models/realtime/conversation_item_input_audio_transcription_segment.rb +++ b/lib/openai/models/realtime/conversation_item_input_audio_transcription_segment.rb @@ -61,23 +61,32 @@ class ConversationItemInputAudioTranscriptionSegment < OpenAI::Internal::Type::B # @!method initialize(id:, content_index:, end_:, event_id:, item_id:, speaker:, start:, text:, type: :"conversation.item.input_audio_transcription.segment") # Returned when an input audio transcription segment is identified for an item. # - # @param id [String] The segment identifier. + # @param id [String] + # The segment identifier. # - # @param content_index [Integer] The index of the input audio content part within the item. + # @param content_index [Integer] + # The index of the input audio content part within the item. # - # @param end_ [Float] End time of the segment in seconds. + # @param end_ [Float] + # End time of the segment in seconds. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item containing the input audio content. + # @param item_id [String] + # The ID of the item containing the input audio content. # - # @param speaker [String] The detected speaker label for this segment. + # @param speaker [String] + # The detected speaker label for this segment. # - # @param start [Float] Start time of the segment in seconds. + # @param start [Float] + # Start time of the segment in seconds. # - # @param text [String] The text for this segment. + # @param text [String] + # The text for this segment. # - # @param type [Symbol, :"conversation.item.input_audio_transcription.segment"] The event type, must be `conversation.item.input_audio_transcription.segment`. + # @param type [Symbol, :"conversation.item.input_audio_transcription.segment"] + # The event type, must be `conversation.item.input_audio_transcription.segment`. end end end diff --git a/lib/openai/models/realtime/conversation_item_retrieve_event.rb b/lib/openai/models/realtime/conversation_item_retrieve_event.rb index cd5b282ea..69030a3b0 100644 --- a/lib/openai/models/realtime/conversation_item_retrieve_event.rb +++ b/lib/openai/models/realtime/conversation_item_retrieve_event.rb @@ -29,11 +29,14 @@ class ConversationItemRetrieveEvent < OpenAI::Internal::Type::BaseModel # with a `conversation.item.retrieved` event, unless the item does not exist in # the conversation history, in which case the server will respond with an error. # - # @param item_id [String] The ID of the item to retrieve. + # @param item_id [String] + # The ID of the item to retrieve. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"conversation.item.retrieve"] The event type, must be `conversation.item.retrieve`. + # @param type [Symbol, :"conversation.item.retrieve"] + # The event type, must be `conversation.item.retrieve`. end end end diff --git a/lib/openai/models/realtime/conversation_item_truncate_event.rb b/lib/openai/models/realtime/conversation_item_truncate_event.rb index 78cb368e9..77f541a53 100644 --- a/lib/openai/models/realtime/conversation_item_truncate_event.rb +++ b/lib/openai/models/realtime/conversation_item_truncate_event.rb @@ -38,9 +38,6 @@ class ConversationItemTruncateEvent < OpenAI::Internal::Type::BaseModel optional :event_id, String # @!method initialize(audio_end_ms:, content_index:, item_id:, event_id: nil, type: :"conversation.item.truncate") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemTruncateEvent} for more details. - # # Send this event to truncate a previous assistant message’s audio. The server # will produce audio faster than realtime, so this event is useful when the user # interrupts to truncate audio that has already been sent to the client but not @@ -53,15 +50,23 @@ class ConversationItemTruncateEvent < OpenAI::Internal::Type::BaseModel # If successful, the server will respond with a `conversation.item.truncated` # event. # - # @param audio_end_ms [Integer] Inclusive duration up to which audio is truncated, in milliseconds. If + # @param audio_end_ms [Integer] + # Inclusive duration up to which audio is truncated, in milliseconds. If the + # audio_end_ms is greater than the actual audio duration, the server will respond + # with an error. # - # @param content_index [Integer] The index of the content part to truncate. Set this to `0`. + # @param content_index [Integer] + # The index of the content part to truncate. Set this to `0`. # - # @param item_id [String] The ID of the assistant message item to truncate. Only assistant message + # @param item_id [String] + # The ID of the assistant message item to truncate. Only assistant message items + # can be truncated. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"conversation.item.truncate"] The event type, must be `conversation.item.truncate`. + # @param type [Symbol, :"conversation.item.truncate"] + # The event type, must be `conversation.item.truncate`. end end end diff --git a/lib/openai/models/realtime/conversation_item_truncated_event.rb b/lib/openai/models/realtime/conversation_item_truncated_event.rb index 70b391c39..6c07e2868 100644 --- a/lib/openai/models/realtime/conversation_item_truncated_event.rb +++ b/lib/openai/models/realtime/conversation_item_truncated_event.rb @@ -35,9 +35,6 @@ class ConversationItemTruncatedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"conversation.item.truncated" # @!method initialize(audio_end_ms:, content_index:, event_id:, item_id:, type: :"conversation.item.truncated") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemTruncatedEvent} for more details. - # # Returned when an earlier assistant audio message item is truncated by the client # with a `conversation.item.truncate` event. This event is used to synchronize the # server's understanding of the audio with the client's playback. @@ -45,15 +42,20 @@ class ConversationItemTruncatedEvent < OpenAI::Internal::Type::BaseModel # This action will truncate the audio and remove the server-side text transcript # to ensure there is no text in the context that hasn't been heard by the user. # - # @param audio_end_ms [Integer] The duration up to which the audio was truncated, in milliseconds. + # @param audio_end_ms [Integer] + # The duration up to which the audio was truncated, in milliseconds. # - # @param content_index [Integer] The index of the content part that was truncated. + # @param content_index [Integer] + # The index of the content part that was truncated. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the assistant message item that was truncated. + # @param item_id [String] + # The ID of the assistant message item that was truncated. # - # @param type [Symbol, :"conversation.item.truncated"] The event type, must be `conversation.item.truncated`. + # @param type [Symbol, :"conversation.item.truncated"] + # The event type, must be `conversation.item.truncated`. end end end diff --git a/lib/openai/models/realtime/conversation_item_with_reference.rb b/lib/openai/models/realtime/conversation_item_with_reference.rb index af2fc8991..640883989 100644 --- a/lib/openai/models/realtime/conversation_item_with_reference.rb +++ b/lib/openai/models/realtime/conversation_item_with_reference.rb @@ -83,32 +83,52 @@ class ConversationItemWithReference < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Type } # @!method initialize(id: nil, arguments: nil, call_id: nil, content: nil, name: nil, object: nil, output: nil, role: nil, status: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemWithReference} for more details. - # # The item to add to the conversation. # - # @param id [String] For an item of type (`message` | `function_call` | `function_call_output`) + # @param id [String] + # For an item of type (`message` | `function_call` | `function_call_output`) this + # field allows the client to assign the unique ID of the item. It is not required + # because the server will generate one if not provided. # - # @param arguments [String] The arguments of the function call (for `function_call` items). + # For an item of type `item_reference`, this field is required and is a reference + # to any item that has previously existed in the conversation. # - # @param call_id [String] The ID of the function call (for `function_call` and + # @param arguments [String] + # The arguments of the function call (for `function_call` items). # - # @param content [Array] The content of the message, applicable for `message` items. + # @param call_id [String] + # The ID of the function call (for `function_call` and `function_call_output` + # items). If passed on a `function_call_output` item, the server will check that a + # `function_call` item with the same ID exists in the conversation history. # - # @param name [String] The name of the function being called (for `function_call` items). + # @param content [Array] + # The content of the message, applicable for `message` items. # - # @param object [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Object] Identifier for the API object being returned - always `realtime.item`. + # - Message items of role `system` support only `input_text` content + # - Message items of role `user` support `input_text` and `input_audio` content + # - Message items of role `assistant` support `text` content. # - # @param output [String] The output of the function call (for `function_call_output` items). + # @param name [String] + # The name of the function being called (for `function_call` items). # - # @param role [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Role] The role of the message sender (`user`, `assistant`, `system`), only + # @param object [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Object] + # Identifier for the API object being returned - always `realtime.item`. # - # @param status [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Status] The status of the item (`completed`, `incomplete`, `in_progress`). These have no + # @param output [String] + # The output of the function call (for `function_call_output` items). # - # @param type [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Type] The type of the item (`message`, `function_call`, `function_call_output`, - # `item\_ - + # @param role [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Role] + # The role of the message sender (`user`, `assistant`, `system`), only applicable + # for `message` items. + # + # @param status [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Status] + # The status of the item (`completed`, `incomplete`, `in_progress`). These have no + # effect on the conversation, but are accepted for consistency with the + # `conversation.item.created` event. + # + # @param type [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Type] + # The type of the item (`message`, `function_call`, `function_call_output`, + # `item_reference`). class Content < OpenAI::Internal::Type::BaseModel # @!attribute id # ID of a previous conversation item to reference (for `item_reference` content @@ -143,19 +163,22 @@ class Content < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Content::Type } # @!method initialize(id: nil, audio: nil, text: nil, transcript: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ConversationItemWithReference::Content} for more - # details. - # - # @param id [String] ID of a previous conversation item to reference (for `item_reference` + # @param id [String] + # ID of a previous conversation item to reference (for `item_reference` content + # types in `response.create` events). These can reference both client and server + # created items. # - # @param audio [String] Base64-encoded audio bytes, used for `input_audio` content type. + # @param audio [String] + # Base64-encoded audio bytes, used for `input_audio` content type. # - # @param text [String] The text content, used for `input_text` and `text` content types. + # @param text [String] + # The text content, used for `input_text` and `text` content types. # - # @param transcript [String] The transcript of the audio, used for `input_audio` content type. + # @param transcript [String] + # The transcript of the audio, used for `input_audio` content type. # - # @param type [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Content::Type] The content type (`input_text`, `input_audio`, `item_reference`, `text`). + # @param type [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Content::Type] + # The content type (`input_text`, `input_audio`, `item_reference`, `text`). # The content type (`input_text`, `input_audio`, `item_reference`, `text`). # diff --git a/lib/openai/models/realtime/input_audio_buffer_append_event.rb b/lib/openai/models/realtime/input_audio_buffer_append_event.rb index 968d313e2..b371cc256 100644 --- a/lib/openai/models/realtime/input_audio_buffer_append_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_append_event.rb @@ -24,9 +24,6 @@ class InputAudioBufferAppendEvent < OpenAI::Internal::Type::BaseModel optional :event_id, String # @!method initialize(audio:, event_id: nil, type: :"input_audio_buffer.append") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferAppendEvent} for more details. - # # Send this event to append audio bytes to the input audio buffer. The audio # buffer is temporary storage you can write to and later commit. A "commit" will # create a new user message item in the conversation history from the buffer @@ -43,11 +40,15 @@ class InputAudioBufferAppendEvent < OpenAI::Internal::Type::BaseModel # to be more responsive. Unlike most other client events, the server will not send # a confirmation response to this event. # - # @param audio [String] Base64-encoded audio bytes. This must be in the format specified by the + # @param audio [String] + # Base64-encoded audio bytes. This must be in the format specified by the + # `input_audio_format` field in the session configuration. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"input_audio_buffer.append"] The event type, must be `input_audio_buffer.append`. + # @param type [Symbol, :"input_audio_buffer.append"] + # The event type, must be `input_audio_buffer.append`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_clear_event.rb b/lib/openai/models/realtime/input_audio_buffer_clear_event.rb index 6a50afc0f..c9c9ad6b2 100644 --- a/lib/openai/models/realtime/input_audio_buffer_clear_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_clear_event.rb @@ -20,9 +20,11 @@ class InputAudioBufferClearEvent < OpenAI::Internal::Type::BaseModel # Send this event to clear the audio bytes in the buffer. The server will respond # with an `input_audio_buffer.cleared` event. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"input_audio_buffer.clear"] The event type, must be `input_audio_buffer.clear`. + # @param type [Symbol, :"input_audio_buffer.clear"] + # The event type, must be `input_audio_buffer.clear`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_cleared_event.rb b/lib/openai/models/realtime/input_audio_buffer_cleared_event.rb index 53bb04ea8..4ac8c90f7 100644 --- a/lib/openai/models/realtime/input_audio_buffer_cleared_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_cleared_event.rb @@ -20,9 +20,11 @@ class InputAudioBufferClearedEvent < OpenAI::Internal::Type::BaseModel # Returned when the input audio buffer is cleared by the client with a # `input_audio_buffer.clear` event. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param type [Symbol, :"input_audio_buffer.cleared"] The event type, must be `input_audio_buffer.cleared`. + # @param type [Symbol, :"input_audio_buffer.cleared"] + # The event type, must be `input_audio_buffer.cleared`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_commit_event.rb b/lib/openai/models/realtime/input_audio_buffer_commit_event.rb index 4e691844f..9f694050d 100644 --- a/lib/openai/models/realtime/input_audio_buffer_commit_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_commit_event.rb @@ -26,9 +26,11 @@ class InputAudioBufferCommitEvent < OpenAI::Internal::Type::BaseModel # enabled in session configuration), but it will not create a response from the # model. The server will respond with an `input_audio_buffer.committed` event. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"input_audio_buffer.commit"] The event type, must be `input_audio_buffer.commit`. + # @param type [Symbol, :"input_audio_buffer.commit"] + # The event type, must be `input_audio_buffer.commit`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_committed_event.rb b/lib/openai/models/realtime/input_audio_buffer_committed_event.rb index 3049a5267..4a00937de 100644 --- a/lib/openai/models/realtime/input_audio_buffer_committed_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_committed_event.rb @@ -30,21 +30,23 @@ class InputAudioBufferCommittedEvent < OpenAI::Internal::Type::BaseModel optional :previous_item_id, String, nil?: true # @!method initialize(event_id:, item_id:, previous_item_id: nil, type: :"input_audio_buffer.committed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferCommittedEvent} for more details. - # # Returned when an input audio buffer is committed, either by the client or # automatically in server VAD mode. The `item_id` property is the ID of the user # message item that will be created, thus a `conversation.item.created` event will # also be sent to the client. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the user message item that will be created. + # @param item_id [String] + # The ID of the user message item that will be created. # - # @param previous_item_id [String, nil] The ID of the preceding item after which the new item will be inserted. + # @param previous_item_id [String, nil] + # The ID of the preceding item after which the new item will be inserted. Can be + # `null` if the item has no predecessor. # - # @param type [Symbol, :"input_audio_buffer.committed"] The event type, must be `input_audio_buffer.committed`. + # @param type [Symbol, :"input_audio_buffer.committed"] + # The event type, must be `input_audio_buffer.committed`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rb b/lib/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rb index deac69d6f..59ee685ee 100644 --- a/lib/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rb @@ -23,20 +23,19 @@ class InputAudioBufferDtmfEventReceivedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"input_audio_buffer.dtmf_event_received" # @!method initialize(event:, received_at:, type: :"input_audio_buffer.dtmf_event_received") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferDtmfEventReceivedEvent} for more - # details. - # # **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message # that represents a telephone keypad press (0–9, \*, #, A–D). The `event` property # is the keypad that the user press. The `received_at` is the UTC Unix Timestamp # that the server received the event. # - # @param event [String] The telephone keypad that was pressed by the user. + # @param event [String] + # The telephone keypad that was pressed by the user. # - # @param received_at [Integer] UTC Unix Timestamp when DTMF Event was received by server. + # @param received_at [Integer] + # UTC Unix Timestamp when DTMF Event was received by server. # - # @param type [Symbol, :"input_audio_buffer.dtmf_event_received"] The event type, must be `input_audio_buffer.dtmf_event_received`. + # @param type [Symbol, :"input_audio_buffer.dtmf_event_received"] + # The event type, must be `input_audio_buffer.dtmf_event_received`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_speech_started_event.rb b/lib/openai/models/realtime/input_audio_buffer_speech_started_event.rb index 7e8cbf1dc..dc7732a71 100644 --- a/lib/openai/models/realtime/input_audio_buffer_speech_started_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_speech_started_event.rb @@ -32,9 +32,6 @@ class InputAudioBufferSpeechStartedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"input_audio_buffer.speech_started" # @!method initialize(audio_start_ms:, event_id:, item_id:, type: :"input_audio_buffer.speech_started") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferSpeechStartedEvent} for more details. - # # Sent by the server when in `server_vad` mode to indicate that speech has been # detected in the audio buffer. This can happen any time audio is added to the # buffer (unless speech is already detected). The client may want to use this @@ -46,13 +43,20 @@ class InputAudioBufferSpeechStartedEvent < OpenAI::Internal::Type::BaseModel # `input_audio_buffer.speech_stopped` event (unless the client manually commits # the audio buffer during VAD activation). # - # @param audio_start_ms [Integer] Milliseconds from the start of all audio written to the buffer during the + # @param audio_start_ms [Integer] + # Milliseconds from the start of all audio written to the buffer during the + # session when speech was first detected. This will correspond to the beginning of + # audio sent to the model, and thus includes the `prefix_padding_ms` configured in + # the Session. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the user message item that will be created when speech stops. + # @param item_id [String] + # The ID of the user message item that will be created when speech stops. # - # @param type [Symbol, :"input_audio_buffer.speech_started"] The event type, must be `input_audio_buffer.speech_started`. + # @param type [Symbol, :"input_audio_buffer.speech_started"] + # The event type, must be `input_audio_buffer.speech_started`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb b/lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb index cb10526e3..7f8b8cafb 100644 --- a/lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb +++ b/lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb @@ -31,20 +31,23 @@ class InputAudioBufferSpeechStoppedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"input_audio_buffer.speech_stopped" # @!method initialize(audio_end_ms:, event_id:, item_id:, type: :"input_audio_buffer.speech_stopped") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferSpeechStoppedEvent} for more details. - # # Returned in `server_vad` mode when the server detects the end of speech in the # audio buffer. The server will also send an `conversation.item.created` event # with the user message item that is created from the audio buffer. # - # @param audio_end_ms [Integer] Milliseconds since the session started when speech stopped. This will + # @param audio_end_ms [Integer] + # Milliseconds since the session started when speech stopped. This will correspond + # to the end of audio sent to the model, and thus includes the + # `min_silence_duration_ms` configured in the Session. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the user message item that will be created. + # @param item_id [String] + # The ID of the user message item that will be created. # - # @param type [Symbol, :"input_audio_buffer.speech_stopped"] The event type, must be `input_audio_buffer.speech_stopped`. + # @param type [Symbol, :"input_audio_buffer.speech_stopped"] + # The event type, must be `input_audio_buffer.speech_stopped`. end end end diff --git a/lib/openai/models/realtime/input_audio_buffer_timeout_triggered.rb b/lib/openai/models/realtime/input_audio_buffer_timeout_triggered.rb index 2d9af6ddf..c0c0aa121 100644 --- a/lib/openai/models/realtime/input_audio_buffer_timeout_triggered.rb +++ b/lib/openai/models/realtime/input_audio_buffer_timeout_triggered.rb @@ -37,9 +37,6 @@ class InputAudioBufferTimeoutTriggered < OpenAI::Internal::Type::BaseModel required :type, const: :"input_audio_buffer.timeout_triggered" # @!method initialize(audio_end_ms:, audio_start_ms:, event_id:, item_id:, type: :"input_audio_buffer.timeout_triggered") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::InputAudioBufferTimeoutTriggered} for more details. - # # Returned when the Server VAD timeout is triggered for the input audio buffer. # This is configured with `idle_timeout_ms` in the `turn_detection` settings of # the session, and it indicates that there hasn't been any speech detected for the @@ -57,15 +54,22 @@ class InputAudioBufferTimeoutTriggered < OpenAI::Internal::Type::BaseModel # by the model, so the model may respond with something relevant to the # conversation or a prompt to continue speaking. # - # @param audio_end_ms [Integer] Millisecond offset of audio written to the input audio buffer at the time the ti + # @param audio_end_ms [Integer] + # Millisecond offset of audio written to the input audio buffer at the time the + # timeout was triggered. # - # @param audio_start_ms [Integer] Millisecond offset of audio written to the input audio buffer that was after the + # @param audio_start_ms [Integer] + # Millisecond offset of audio written to the input audio buffer that was after the + # playback time of the last model response. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item associated with this segment. + # @param item_id [String] + # The ID of the item associated with this segment. # - # @param type [Symbol, :"input_audio_buffer.timeout_triggered"] The event type, must be `input_audio_buffer.timeout_triggered`. + # @param type [Symbol, :"input_audio_buffer.timeout_triggered"] + # The event type, must be `input_audio_buffer.timeout_triggered`. end end end diff --git a/lib/openai/models/realtime/log_prob_properties.rb b/lib/openai/models/realtime/log_prob_properties.rb index edfae457b..9a0ad07c1 100644 --- a/lib/openai/models/realtime/log_prob_properties.rb +++ b/lib/openai/models/realtime/log_prob_properties.rb @@ -23,16 +23,16 @@ class LogProbProperties < OpenAI::Internal::Type::BaseModel required :logprob, Float # @!method initialize(token:, bytes:, logprob:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::LogProbProperties} for more details. - # # A log probability object. # - # @param token [String] The token that was used to generate the log probability. + # @param token [String] + # The token that was used to generate the log probability. # - # @param bytes [Array] The bytes that were used to generate the log probability. + # @param bytes [Array] + # The bytes that were used to generate the log probability. # - # @param logprob [Float] The log probability of the token. + # @param logprob [Float] + # The log probability of the token. end end end diff --git a/lib/openai/models/realtime/mcp_list_tools_completed.rb b/lib/openai/models/realtime/mcp_list_tools_completed.rb index faca4b6f4..cbe90f017 100644 --- a/lib/openai/models/realtime/mcp_list_tools_completed.rb +++ b/lib/openai/models/realtime/mcp_list_tools_completed.rb @@ -25,11 +25,14 @@ class McpListToolsCompleted < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, type: :"mcp_list_tools.completed") # Returned when listing MCP tools has completed for an item. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP list tools item. + # @param item_id [String] + # The ID of the MCP list tools item. # - # @param type [Symbol, :"mcp_list_tools.completed"] The event type, must be `mcp_list_tools.completed`. + # @param type [Symbol, :"mcp_list_tools.completed"] + # The event type, must be `mcp_list_tools.completed`. end end end diff --git a/lib/openai/models/realtime/mcp_list_tools_failed.rb b/lib/openai/models/realtime/mcp_list_tools_failed.rb index 292fb9d38..949f0f1e9 100644 --- a/lib/openai/models/realtime/mcp_list_tools_failed.rb +++ b/lib/openai/models/realtime/mcp_list_tools_failed.rb @@ -25,11 +25,14 @@ class McpListToolsFailed < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, type: :"mcp_list_tools.failed") # Returned when listing MCP tools has failed for an item. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP list tools item. + # @param item_id [String] + # The ID of the MCP list tools item. # - # @param type [Symbol, :"mcp_list_tools.failed"] The event type, must be `mcp_list_tools.failed`. + # @param type [Symbol, :"mcp_list_tools.failed"] + # The event type, must be `mcp_list_tools.failed`. end end end diff --git a/lib/openai/models/realtime/mcp_list_tools_in_progress.rb b/lib/openai/models/realtime/mcp_list_tools_in_progress.rb index c447ef84b..0eda87eed 100644 --- a/lib/openai/models/realtime/mcp_list_tools_in_progress.rb +++ b/lib/openai/models/realtime/mcp_list_tools_in_progress.rb @@ -25,11 +25,14 @@ class McpListToolsInProgress < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, type: :"mcp_list_tools.in_progress") # Returned when listing MCP tools is in progress for an item. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP list tools item. + # @param item_id [String] + # The ID of the MCP list tools item. # - # @param type [Symbol, :"mcp_list_tools.in_progress"] The event type, must be `mcp_list_tools.in_progress`. + # @param type [Symbol, :"mcp_list_tools.in_progress"] + # The event type, must be `mcp_list_tools.in_progress`. end end end diff --git a/lib/openai/models/realtime/output_audio_buffer_clear_event.rb b/lib/openai/models/realtime/output_audio_buffer_clear_event.rb index 9896d94ca..4bd1aa601 100644 --- a/lib/openai/models/realtime/output_audio_buffer_clear_event.rb +++ b/lib/openai/models/realtime/output_audio_buffer_clear_event.rb @@ -21,11 +21,13 @@ class OutputAudioBufferClearEvent < OpenAI::Internal::Type::BaseModel # trigger the server to stop generating audio and emit a # `output_audio_buffer.cleared` event. This event should be preceded by a # `response.cancel` client event to stop the generation of the current response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). # - # @param event_id [String] The unique ID of the client event used for error handling. + # @param event_id [String] + # The unique ID of the client event used for error handling. # - # @param type [Symbol, :"output_audio_buffer.clear"] The event type, must be `output_audio_buffer.clear`. + # @param type [Symbol, :"output_audio_buffer.clear"] + # The event type, must be `output_audio_buffer.clear`. end end end diff --git a/lib/openai/models/realtime/rate_limits_updated_event.rb b/lib/openai/models/realtime/rate_limits_updated_event.rb index e9029bce2..889073696 100644 --- a/lib/openai/models/realtime/rate_limits_updated_event.rb +++ b/lib/openai/models/realtime/rate_limits_updated_event.rb @@ -31,12 +31,14 @@ class RateLimitsUpdatedEvent < OpenAI::Internal::Type::BaseModel # rate limits shown here reflect that reservation, which is then adjusted # accordingly once the Response is completed. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param rate_limits [Array] List of rate limit information. + # @param rate_limits [Array] + # List of rate limit information. # - # @param type [Symbol, :"rate_limits.updated"] The event type, must be `rate_limits.updated`. - + # @param type [Symbol, :"rate_limits.updated"] + # The event type, must be `rate_limits.updated`. class RateLimit < OpenAI::Internal::Type::BaseModel # @!attribute limit # The maximum allowed value for the rate limit. @@ -63,16 +65,17 @@ class RateLimit < OpenAI::Internal::Type::BaseModel optional :reset_seconds, Float # @!method initialize(limit: nil, name: nil, remaining: nil, reset_seconds: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit} for more details. - # - # @param limit [Integer] The maximum allowed value for the rate limit. + # @param limit [Integer] + # The maximum allowed value for the rate limit. # - # @param name [Symbol, OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit::Name] The name of the rate limit (`requests`, `tokens`). + # @param name [Symbol, OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit::Name] + # The name of the rate limit (`requests`, `tokens`). # - # @param remaining [Integer] The remaining value before the limit is reached. + # @param remaining [Integer] + # The remaining value before the limit is reached. # - # @param reset_seconds [Float] Seconds until the rate limit resets. + # @param reset_seconds [Float] + # Seconds until the rate limit resets. # The name of the rate limit (`requests`, `tokens`). # diff --git a/lib/openai/models/realtime/realtime_audio_config_input.rb b/lib/openai/models/realtime/realtime_audio_config_input.rb index d3c670fce..9addefdf1 100644 --- a/lib/openai/models/realtime/realtime_audio_config_input.rb +++ b/lib/openai/models/realtime/realtime_audio_config_input.rb @@ -25,7 +25,7 @@ class RealtimeAudioConfigInput < OpenAI::Internal::Type::BaseModel # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -55,16 +55,43 @@ class RealtimeAudioConfigInput < OpenAI::Internal::Type::BaseModel optional :turn_detection, union: -> { OpenAI::Realtime::RealtimeAudioInputTurnDetection }, nil?: true # @!method initialize(format_: nil, noise_reduction: nil, transcription: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeAudioConfigInput} for more details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the input audio. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the input audio. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeAudioConfigInput::NoiseReduction] + # Configuration for input audio noise reduction. This can be set to `null` to turn + # off. Noise reduction filters audio added to the input audio buffer before it is + # sent to VAD and the model. Filtering the audio can improve VAD and turn + # detection accuracy (reducing false positives) and model performance by improving + # perception of the input audio. # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeAudioConfigInput::NoiseReduction] Configuration for input audio noise reduction. This can be set to `null` to turn + # @param transcription [OpenAI::Models::Realtime::AudioTranscription] + # Configuration for input audio transcription, defaults to off and can be set to + # `null` to turn off once on. Input audio transcription is not native to the + # model, since the model consumes audio directly. Transcription runs + # asynchronously through + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) + # and should be treated as guidance of input audio content rather than precisely + # what the model heard. The client can optionally set the language and prompt for + # transcription, these offer additional guidance to the transcription service. # - # @param transcription [OpenAI::Models::Realtime::AudioTranscription] Configuration for input audio transcription, defaults to off and can be set to ` + # @param turn_detection [OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::SemanticVad, nil] + # Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # set to `null` to turn off, in which case the client must manually trigger model + # response. # - # @param turn_detection [OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::SemanticVad, nil] Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # Server VAD means that the model will detect the start and end of speech based on + # audio volume and respond at the end of user speech. + # + # Semantic VAD is more advanced and uses a turn detection model (in conjunction + # with VAD) to semantically estimate whether the user has finished speaking, then + # dynamically sets a timeout based on this probability. For example, if user audio + # trails off with "uhhm", the model will score a low probability of turn end and + # wait longer for the user to continue speaking. This can be useful for more + # natural conversations, but may have a higher latency. + # + # For `gpt-realtime-whisper` transcription sessions, turn detection must be set to + # `null`; VAD is not supported. # @see OpenAI::Models::Realtime::RealtimeAudioConfigInput#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -77,17 +104,16 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeAudioConfigInput::NoiseReduction} for more - # details. - # # Configuration for input audio noise reduction. This can be set to `null` to turn # off. Noise reduction filters audio added to the input audio buffer before it is # sent to VAD and the model. Filtering the audio can improve VAD and turn # detection accuracy (reducing false positives) and model performance by improving # perception of the input audio. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end end end diff --git a/lib/openai/models/realtime/realtime_audio_config_output.rb b/lib/openai/models/realtime/realtime_audio_config_output.rb index 534ffc0ee..83fbf631e 100644 --- a/lib/openai/models/realtime/realtime_audio_config_output.rb +++ b/lib/openai/models/realtime/realtime_audio_config_output.rb @@ -34,14 +34,25 @@ class RealtimeAudioConfigOutput < OpenAI::Internal::Type::BaseModel optional :voice, union: -> { OpenAI::Realtime::RealtimeAudioConfigOutput::Voice } # @!method initialize(format_: nil, speed: nil, voice: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeAudioConfigOutput} for more details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the output audio. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio. + # @param speed [Float] + # The speed of the model's spoken response as a multiple of the original speed. + # 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. + # This value can only be changed in between model turns, not while a response is + # in progress. # - # @param speed [Float] The speed of the model's spoken response as a multiple of the original speed. + # This parameter is a post-processing adjustment to the audio after it is + # generated, it's also possible to prompt the model to speak faster or slower. # - # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice::ID, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice] The voice the model uses to respond. Supported built-in voices are + # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice::ID, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice] + # The voice the model uses to respond. Supported built-in voices are `alloy`, + # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and + # `cedar`. You may also provide a custom voice object with an `id`, for example + # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the + # model has responded with audio at least once. We recommend `marin` and `cedar` + # for best quality. # The voice the model uses to respond. Supported built-in voices are `alloy`, # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and @@ -89,7 +100,8 @@ class ID < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Custom voice reference. # - # @param id [String] The custom voice ID, e.g. `voice_1234`. + # @param id [String] + # The custom voice ID, e.g. `voice_1234`. end # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_audio_formats.rb b/lib/openai/models/realtime/realtime_audio_formats.rb index 471b63e2f..6a527c9ad 100644 --- a/lib/openai/models/realtime/realtime_audio_formats.rb +++ b/lib/openai/models/realtime/realtime_audio_formats.rb @@ -34,9 +34,11 @@ class AudioPCM < OpenAI::Internal::Type::BaseModel # @!method initialize(rate: nil, type: nil) # The PCM audio format. Only a 24kHz sample rate is supported. # - # @param rate [Integer, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM::Rate] The sample rate of the audio. Always `24000`. + # @param rate [Integer, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM::Rate] + # The sample rate of the audio. Always `24000`. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM::Type] The audio format. Always `audio/pcm`. + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM::Type] + # The audio format. Always `audio/pcm`. # The sample rate of the audio. Always `24000`. # @@ -73,7 +75,8 @@ class AudioPCMU < OpenAI::Internal::Type::BaseModel # @!method initialize(type: nil) # The G.711 μ-law format. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU::Type] The audio format. Always `audio/pcmu`. + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU::Type] + # The audio format. Always `audio/pcmu`. # The audio format. Always `audio/pcmu`. # @@ -98,7 +101,8 @@ class AudioPCMA < OpenAI::Internal::Type::BaseModel # @!method initialize(type: nil) # The G.711 A-law format. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA::Type] The audio format. Always `audio/pcma`. + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA::Type] + # The audio format. Always `audio/pcma`. # The audio format. Always `audio/pcma`. # diff --git a/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb b/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb index 66b444a09..9c22d6862 100644 --- a/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +++ b/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb @@ -101,26 +101,56 @@ class ServerVad < OpenAI::Internal::Type::BaseModel optional :threshold, Float # @!method initialize(create_response: nil, idle_timeout_ms: nil, interrupt_response: nil, prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: :server_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::ServerVad} for more - # details. - # # Server-side voice activity detection (VAD) which flips on when user speech is # detected and off after a period of silence. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs - # - # @param idle_timeout_ms [Integer, nil] Optional timeout after which a model response will be triggered automatically. T - # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt (cancel) any ongoing response with out - # - # @param prefix_padding_ms [Integer] Used only for `server_vad` mode. Amount of audio to include before the VAD detec - # - # @param silence_duration_ms [Integer] Used only for `server_vad` mode. Duration of silence to detect speech stop (in m - # - # @param threshold [Float] Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this - # - # @param type [Symbol, :server_vad] Type of turn detection, `server_vad` to turn on simple Server VAD. + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. If `interrupt_response` is set to `false` this may fail to create a + # response if the model is already responding. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param idle_timeout_ms [Integer, nil] + # Optional timeout after which a model response will be triggered automatically. + # This is useful for situations in which a long pause from the user is unexpected, + # such as a phone call. The model will effectively prompt the user to continue the + # conversation based on the current context. + # + # The timeout value will be applied after the last model response's audio has + # finished playing, i.e. it's set to the `response.done` time plus audio playback + # duration. + # + # An `input_audio_buffer.timeout_triggered` event (plus events associated with the + # Response) will be emitted when the timeout is reached. Idle timeout is currently + # only supported for `server_vad` mode. + # + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt (cancel) any ongoing response with + # output to the default conversation (i.e. `conversation` of `auto`) when a VAD + # start event occurs. If `true` then the response will be cancelled, otherwise it + # will continue until complete. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param prefix_padding_ms [Integer] + # Used only for `server_vad` mode. Amount of audio to include before the VAD + # detected speech (in milliseconds). Defaults to 300ms. + # + # @param silence_duration_ms [Integer] + # Used only for `server_vad` mode. Duration of silence to detect speech stop (in + # milliseconds). Defaults to 500ms. With shorter values the model will respond + # more quickly, but may jump in on short pauses from the user. + # + # @param threshold [Float] + # Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this + # defaults to 0.5. A higher threshold will require louder audio to activate the + # model, and thus might perform better in noisy environments. + # + # @param type [Symbol, :server_vad] + # Type of turn detection, `server_vad` to turn on simple Server VAD. end class SemanticVad < OpenAI::Internal::Type::BaseModel @@ -158,20 +188,26 @@ class SemanticVad < OpenAI::Internal::Type::BaseModel optional :interrupt_response, OpenAI::Internal::Type::Boolean # @!method initialize(create_response: nil, eagerness: nil, interrupt_response: nil, type: :semantic_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::SemanticVad} for - # more details. - # # Server-side semantic turn detection which uses a model to determine when the # user has finished speaking. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. # - # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::SemanticVad::Eagerness] Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeAudioInputTurnDetection::SemanticVad::Eagerness] + # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # will wait longer for the user to continue speaking, `high` will respond more + # quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, + # and `high` have max timeouts of 8s, 4s, and 2s respectively. # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt any ongoing response with output to th + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt any ongoing response with output to + # the default conversation (i.e. `conversation` of `auto`) when a VAD start event + # occurs. # - # @param type [Symbol, :semantic_vad] Type of turn detection, `semantic_vad` to turn on Semantic VAD. + # @param type [Symbol, :semantic_vad] + # Type of turn detection, `semantic_vad` to turn on Semantic VAD. # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` # will wait longer for the user to continue speaking, `high` will respond more diff --git a/lib/openai/models/realtime/realtime_client_event.rb b/lib/openai/models/realtime/realtime_client_event.rb index 53470536a..99d43046c 100644 --- a/lib/openai/models/realtime/realtime_client_event.rb +++ b/lib/openai/models/realtime/realtime_client_event.rb @@ -66,7 +66,7 @@ module RealtimeClientEvent # stop generating audio and emit a `output_audio_buffer.cleared` event. This # event should be preceded by a `response.cancel` client event to stop the # generation of the current response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). variant :"output_audio_buffer.clear", -> { OpenAI::Realtime::OutputAudioBufferClearEvent } # Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically. diff --git a/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb b/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb index 9781f4cfd..ec0ae9fa6 100644 --- a/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb +++ b/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb @@ -46,24 +46,27 @@ class RealtimeConversationItemAssistantMessage < OpenAI::Internal::Type::BaseMod optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Status } # @!method initialize(content:, id: nil, object: nil, status: nil, role: :assistant, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage} for more - # details. - # # An assistant message item in a Realtime conversation. # - # @param content [Array] The content of the message. + # @param content [Array] + # The content of the message. # - # @param id [String] The unique ID of the item. This may be provided by the client or generated by th + # @param id [String] + # The unique ID of the item. This may be provided by the client or generated by + # the server. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Object] Identifier for the API object being returned - always `realtime.item`. Optional + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Object] + # Identifier for the API object being returned - always `realtime.item`. Optional + # when creating a new item. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Status] The status of the item. Has no effect on the conversation. + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Status] + # The status of the item. Has no effect on the conversation. # - # @param role [Symbol, :assistant] The role of the message sender. Always `assistant`. + # @param role [Symbol, :assistant] + # The role of the message sender. Always `assistant`. # - # @param type [Symbol, :message] The type of the item. Always `message`. - + # @param type [Symbol, :message] + # The type of the item. Always `message`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute audio # Base64-encoded audio bytes, these will be parsed as the format specified in the @@ -94,17 +97,21 @@ class Content < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemAssistantMessage::Content::Type } # @!method initialize(audio: nil, text: nil, transcript: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Content} - # for more details. - # - # @param audio [String] Base64-encoded audio bytes, these will be parsed as the format specified in the + # @param audio [String] + # Base64-encoded audio bytes, these will be parsed as the format specified in the + # session output audio type configuration. This defaults to PCM 16-bit 24kHz mono + # if not specified. # - # @param text [String] The text content. + # @param text [String] + # The text content. # - # @param transcript [String] The transcript of the audio content, this will always be present if the output t + # @param transcript [String] + # The transcript of the audio content, this will always be present if the output + # type is `audio`. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Content::Type] The content type, `output_text` or `output_audio` depending on the session `outp + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage::Content::Type] + # The content type, `output_text` or `output_audio` depending on the session + # `output_modalities` configuration. # The content type, `output_text` or `output_audio` depending on the session # `output_modalities` configuration. diff --git a/lib/openai/models/realtime/realtime_conversation_item_function_call.rb b/lib/openai/models/realtime/realtime_conversation_item_function_call.rb index a014e36d2..acafdc96e 100644 --- a/lib/openai/models/realtime/realtime_conversation_item_function_call.rb +++ b/lib/openai/models/realtime/realtime_conversation_item_function_call.rb @@ -51,25 +51,32 @@ class RealtimeConversationItemFunctionCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCall::Status } # @!method initialize(arguments:, name:, id: nil, call_id: nil, object: nil, status: nil, type: :function_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall} for more - # details. - # # A function call item in a Realtime conversation. # - # @param arguments [String] The arguments of the function call. This is a JSON-encoded string representing t + # @param arguments [String] + # The arguments of the function call. This is a JSON-encoded string representing + # the arguments passed to the function, for example + # `{"arg1": "value1", "arg2": 42}`. # - # @param name [String] The name of the function being called. + # @param name [String] + # The name of the function being called. # - # @param id [String] The unique ID of the item. This may be provided by the client or generated by th + # @param id [String] + # The unique ID of the item. This may be provided by the client or generated by + # the server. # - # @param call_id [String] The ID of the function call. + # @param call_id [String] + # The ID of the function call. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::Object] Identifier for the API object being returned - always `realtime.item`. Optional + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::Object] + # Identifier for the API object being returned - always `realtime.item`. Optional + # when creating a new item. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::Status] The status of the item. Has no effect on the conversation. + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall::Status] + # The status of the item. Has no effect on the conversation. # - # @param type [Symbol, :function_call] The type of the item. Always `function_call`. + # @param type [Symbol, :function_call] + # The type of the item. Always `function_call`. # Identifier for the API object being returned - always `realtime.item`. Optional # when creating a new item. diff --git a/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb b/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb index 927d04316..0a96a0226 100644 --- a/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb +++ b/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb @@ -44,23 +44,28 @@ class RealtimeConversationItemFunctionCallOutput < OpenAI::Internal::Type::BaseM optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCallOutput::Status } # @!method initialize(call_id:, output:, id: nil, object: nil, status: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput} for more - # details. - # # A function call output item in a Realtime conversation. # - # @param call_id [String] The ID of the function call this output is for. + # @param call_id [String] + # The ID of the function call this output is for. # - # @param output [String] The output of the function call, this is free text and can contain any informati + # @param output [String] + # The output of the function call, this is free text and can contain any + # information or simply be empty. # - # @param id [String] The unique ID of the item. This may be provided by the client or generated by th + # @param id [String] + # The unique ID of the item. This may be provided by the client or generated by + # the server. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Object] Identifier for the API object being returned - always `realtime.item`. Optional + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Object] + # Identifier for the API object being returned - always `realtime.item`. Optional + # when creating a new item. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Status] The status of the item. Has no effect on the conversation. + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Status] + # The status of the item. Has no effect on the conversation. # - # @param type [Symbol, :function_call_output] The type of the item. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the item. Always `function_call_output`. # Identifier for the API object being returned - always `realtime.item`. Optional # when creating a new item. diff --git a/lib/openai/models/realtime/realtime_conversation_item_system_message.rb b/lib/openai/models/realtime/realtime_conversation_item_system_message.rb index 2522e6854..59f512779 100644 --- a/lib/openai/models/realtime/realtime_conversation_item_system_message.rb +++ b/lib/openai/models/realtime/realtime_conversation_item_system_message.rb @@ -46,10 +46,6 @@ class RealtimeConversationItemSystemMessage < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Status } # @!method initialize(content:, id: nil, object: nil, status: nil, role: :system, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage} for more - # details. - # # A system message in a Realtime conversation can be used to provide additional # context or instructions to the model. This is similar but distinct from the # instruction prompt provided at the start of a conversation, as system messages @@ -57,18 +53,25 @@ class RealtimeConversationItemSystemMessage < OpenAI::Internal::Type::BaseModel # conversation's behavior, use instructions, but for smaller updates (e.g. "the # user is now asking about a different topic"), use system messages. # - # @param content [Array] The content of the message. + # @param content [Array] + # The content of the message. # - # @param id [String] The unique ID of the item. This may be provided by the client or generated by th + # @param id [String] + # The unique ID of the item. This may be provided by the client or generated by + # the server. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Object] Identifier for the API object being returned - always `realtime.item`. Optional + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Object] + # Identifier for the API object being returned - always `realtime.item`. Optional + # when creating a new item. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Status] The status of the item. Has no effect on the conversation. + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Status] + # The status of the item. Has no effect on the conversation. # - # @param role [Symbol, :system] The role of the message sender. Always `system`. + # @param role [Symbol, :system] + # The role of the message sender. Always `system`. # - # @param type [Symbol, :message] The type of the item. Always `message`. - + # @param type [Symbol, :message] + # The type of the item. Always `message`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute text # The text content. @@ -83,9 +86,11 @@ class Content < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Content::Type } # @!method initialize(text: nil, type: nil) - # @param text [String] The text content. + # @param text [String] + # The text content. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::Type] The content type. Always `input_text` for system messages. + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content::Type] + # The content type. Always `input_text` for system messages. # The content type. Always `input_text` for system messages. # diff --git a/lib/openai/models/realtime/realtime_conversation_item_user_message.rb b/lib/openai/models/realtime/realtime_conversation_item_user_message.rb index 60d970ab3..0687c0ff4 100644 --- a/lib/openai/models/realtime/realtime_conversation_item_user_message.rb +++ b/lib/openai/models/realtime/realtime_conversation_item_user_message.rb @@ -46,24 +46,27 @@ class RealtimeConversationItemUserMessage < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Status } # @!method initialize(content:, id: nil, object: nil, status: nil, role: :user, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemUserMessage} for more - # details. - # # A user message item in a Realtime conversation. # - # @param content [Array] The content of the message. + # @param content [Array] + # The content of the message. # - # @param id [String] The unique ID of the item. This may be provided by the client or generated by th + # @param id [String] + # The unique ID of the item. This may be provided by the client or generated by + # the server. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Object] Identifier for the API object being returned - always `realtime.item`. Optional + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Object] + # Identifier for the API object being returned - always `realtime.item`. Optional + # when creating a new item. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Status] The status of the item. Has no effect on the conversation. + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Status] + # The status of the item. Has no effect on the conversation. # - # @param role [Symbol, :user] The role of the message sender. Always `user`. + # @param role [Symbol, :user] + # The role of the message sender. Always `user`. # - # @param type [Symbol, :message] The type of the item. Always `message`. - + # @param type [Symbol, :message] + # The type of the item. Always `message`. class Content < OpenAI::Internal::Type::BaseModel # @!attribute audio # Base64-encoded audio bytes (for `input_audio`), these will be parsed as the @@ -108,21 +111,29 @@ class Content < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Content::Type } # @!method initialize(audio: nil, detail: nil, image_url: nil, text: nil, transcript: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content} for - # more details. - # - # @param audio [String] Base64-encoded audio bytes (for `input_audio`), these will be parsed as the form + # @param audio [String] + # Base64-encoded audio bytes (for `input_audio`), these will be parsed as the + # format specified in the session input audio type configuration. This defaults to + # PCM 16-bit 24kHz mono if not specified. # - # @param detail [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Detail] The detail level of the image (for `input_image`). `auto` will default to `high` + # @param detail [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Detail] + # The detail level of the image (for `input_image`). `auto` will default to + # `high`. # - # @param image_url [String] Base64-encoded image bytes (for `input_image`) as a data URI. For example `data: + # @param image_url [String] + # Base64-encoded image bytes (for `input_image`) as a data URI. For example + # `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG + # and JPEG. # - # @param text [String] The text content (for `input_text`). + # @param text [String] + # The text content (for `input_text`). # - # @param transcript [String] Transcript of the audio (for `input_audio`). This is not sent to the model, but + # @param transcript [String] + # Transcript of the audio (for `input_audio`). This is not sent to the model, but + # will be attached to the message item for reference. # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Type] The content type (`input_text`, `input_audio`, or `input_image`). + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Type] + # The content type (`input_text`, `input_audio`, or `input_image`). # The detail level of the image (for `input_image`). `auto` will default to # `high`. diff --git a/lib/openai/models/realtime/realtime_error.rb b/lib/openai/models/realtime/realtime_error.rb index a24bac3a6..db5aa7167 100644 --- a/lib/openai/models/realtime/realtime_error.rb +++ b/lib/openai/models/realtime/realtime_error.rb @@ -35,20 +35,22 @@ class RealtimeError < OpenAI::Internal::Type::BaseModel optional :param, String, nil?: true # @!method initialize(message:, type:, code: nil, event_id: nil, param: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeError} for more details. - # # Details of the error. # - # @param message [String] A human-readable error message. + # @param message [String] + # A human-readable error message. # - # @param type [String] The type of error (e.g., "invalid_request_error", "server_error"). + # @param type [String] + # The type of error (e.g., "invalid_request_error", "server_error"). # - # @param code [String, nil] Error code, if any. + # @param code [String, nil] + # Error code, if any. # - # @param event_id [String, nil] The event_id of the client event that caused the error, if applicable. + # @param event_id [String, nil] + # The event_id of the client event that caused the error, if applicable. # - # @param param [String, nil] Parameter related to the error, if any. + # @param param [String, nil] + # Parameter related to the error, if any. end end end diff --git a/lib/openai/models/realtime/realtime_error_event.rb b/lib/openai/models/realtime/realtime_error_event.rb index a85f8c5e0..e6bb075c8 100644 --- a/lib/openai/models/realtime/realtime_error_event.rb +++ b/lib/openai/models/realtime/realtime_error_event.rb @@ -27,11 +27,14 @@ class RealtimeErrorEvent < OpenAI::Internal::Type::BaseModel # problem. Most errors are recoverable and the session will stay open, we # recommend to implementors to monitor and log error messages by default. # - # @param error [OpenAI::Models::Realtime::RealtimeError] Details of the error. + # @param error [OpenAI::Models::Realtime::RealtimeError] + # Details of the error. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param type [Symbol, :error] The event type, must be `error`. + # @param type [Symbol, :error] + # The event type, must be `error`. end end end diff --git a/lib/openai/models/realtime/realtime_function_tool.rb b/lib/openai/models/realtime/realtime_function_tool.rb index ae178fcd9..d46730e54 100644 --- a/lib/openai/models/realtime/realtime_function_tool.rb +++ b/lib/openai/models/realtime/realtime_function_tool.rb @@ -30,16 +30,18 @@ class RealtimeFunctionTool < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::RealtimeFunctionTool::Type } # @!method initialize(description: nil, name: nil, parameters: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeFunctionTool} for more details. + # @param description [String] + # The description of the function, including guidance on when and how to call it, + # and guidance about what to tell the user when calling (if anything). # - # @param description [String] The description of the function, including guidance on when and how + # @param name [String] + # The name of the function. # - # @param name [String] The name of the function. + # @param parameters [Object] + # Parameters of the function in JSON Schema. # - # @param parameters [Object] Parameters of the function in JSON Schema. - # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeFunctionTool::Type] The type of the tool, i.e. `function`. + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeFunctionTool::Type] + # The type of the tool, i.e. `function`. # The type of the tool, i.e. `function`. # diff --git a/lib/openai/models/realtime/realtime_mcp_approval_request.rb b/lib/openai/models/realtime/realtime_mcp_approval_request.rb index 00f11a44e..b8fe43ed5 100644 --- a/lib/openai/models/realtime/realtime_mcp_approval_request.rb +++ b/lib/openai/models/realtime/realtime_mcp_approval_request.rb @@ -37,15 +37,20 @@ class RealtimeMcpApprovalRequest < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, arguments:, name:, server_label:, type: :mcp_approval_request) # A Realtime item requesting human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. end end end diff --git a/lib/openai/models/realtime/realtime_mcp_approval_response.rb b/lib/openai/models/realtime/realtime_mcp_approval_response.rb index 62fc76e01..9246cd762 100644 --- a/lib/openai/models/realtime/realtime_mcp_approval_response.rb +++ b/lib/openai/models/realtime/realtime_mcp_approval_response.rb @@ -37,15 +37,20 @@ class RealtimeMcpApprovalResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, approval_request_id:, approve:, reason: nil, type: :mcp_approval_response) # A Realtime item responding to an MCP approval request. # - # @param id [String] The unique ID of the approval response. + # @param id [String] + # The unique ID of the approval response. # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. end end end diff --git a/lib/openai/models/realtime/realtime_mcp_list_tools.rb b/lib/openai/models/realtime/realtime_mcp_list_tools.rb index 1fcbb7ec1..623fdb3bf 100644 --- a/lib/openai/models/realtime/realtime_mcp_list_tools.rb +++ b/lib/openai/models/realtime/realtime_mcp_list_tools.rb @@ -31,14 +31,17 @@ class RealtimeMcpListTools < OpenAI::Internal::Type::BaseModel # @!method initialize(server_label:, tools:, id: nil, type: :mcp_list_tools) # A Realtime item listing tools available on an MCP server. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -65,18 +68,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeMcpListTools::Tool} for more details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end end end diff --git a/lib/openai/models/realtime/realtime_mcp_tool_call.rb b/lib/openai/models/realtime/realtime_mcp_tool_call.rb index 0f68f77f5..0d66bb776 100644 --- a/lib/openai/models/realtime/realtime_mcp_tool_call.rb +++ b/lib/openai/models/realtime/realtime_mcp_tool_call.rb @@ -55,21 +55,29 @@ class RealtimeMcpToolCall < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_call) # A Realtime item representing an invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param approval_request_id [String, nil] The ID of an associated approval request, if any. + # @param approval_request_id [String, nil] + # The ID of an associated approval request, if any. # - # @param error [OpenAI::Models::Realtime::RealtimeMcpProtocolError, OpenAI::Models::Realtime::RealtimeMcpToolExecutionError, OpenAI::Models::Realtime::RealtimeMcphttpError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Realtime::RealtimeMcpProtocolError, OpenAI::Models::Realtime::RealtimeMcpToolExecutionError, OpenAI::Models::Realtime::RealtimeMcphttpError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # The error from the tool call, if any. # diff --git a/lib/openai/models/realtime/realtime_reasoning.rb b/lib/openai/models/realtime/realtime_reasoning.rb index ae7530f01..618388024 100644 --- a/lib/openai/models/realtime/realtime_reasoning.rb +++ b/lib/openai/models/realtime/realtime_reasoning.rb @@ -12,12 +12,11 @@ class RealtimeReasoning < OpenAI::Internal::Type::BaseModel optional :effort, enum: -> { OpenAI::Realtime::RealtimeReasoningEffort } # @!method initialize(effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeReasoning} for more details. - # # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. # - # @param effort [Symbol, OpenAI::Models::Realtime::RealtimeReasoningEffort] Constrains effort on reasoning for reasoning-capable Realtime models such as + # @param effort [Symbol, OpenAI::Models::Realtime::RealtimeReasoningEffort] + # Constrains effort on reasoning for reasoning-capable Realtime models such as + # `gpt-realtime-2`. end end end diff --git a/lib/openai/models/realtime/realtime_response.rb b/lib/openai/models/realtime/realtime_response.rb index 444a20406..e061b56fd 100644 --- a/lib/openai/models/realtime/realtime_response.rb +++ b/lib/openai/models/realtime/realtime_response.rb @@ -92,32 +92,58 @@ class RealtimeResponse < OpenAI::Internal::Type::BaseModel optional :usage, -> { OpenAI::Realtime::RealtimeResponseUsage } # @!method initialize(id: nil, audio: nil, conversation_id: nil, max_output_tokens: nil, metadata: nil, object: nil, output: nil, output_modalities: nil, status: nil, status_details: nil, usage: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponse} for more details. - # # The response resource. # - # @param id [String] The unique ID of the response, will look like `resp_1234`. + # @param id [String] + # The unique ID of the response, will look like `resp_1234`. + # + # @param audio [OpenAI::Models::Realtime::RealtimeResponse::Audio] + # Configuration for audio output. # - # @param audio [OpenAI::Models::Realtime::RealtimeResponse::Audio] Configuration for audio output. + # @param conversation_id [String] + # Which conversation the response is added to, determined by the `conversation` + # field in the `response.create` event. If `auto`, the response will be added to + # the default conversation and the value of `conversation_id` will be an id like + # `conv_1234`. If `none`, the response will not be added to any conversation and + # the value of `conversation_id` will be `null`. If responses are being triggered + # automatically by VAD the response will be added to the default conversation # - # @param conversation_id [String] Which conversation the response is added to, determined by the `conversation` + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls, that was used in this response. # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Object] The object type, must be `realtime.response`. + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Object] + # The object type, must be `realtime.response`. # - # @param output [Array] The list of output items generated by the response. + # @param output [Array] + # The list of output items generated by the response. # - # @param output_modalities [Array] The set of modalities the model used to respond, currently the only possible val + # @param output_modalities [Array] + # The set of modalities the model used to respond, currently the only possible + # values are `[\"audio\"]`, `[\"text\"]`. Audio output always include a text + # transcript. Setting the output to mode `text` will disable audio output from the + # model. # - # @param status [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Status] The final status of the response (`completed`, `cancelled`, `failed`, or + # @param status [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Status] + # The final status of the response (`completed`, `cancelled`, `failed`, or + # `incomplete`, `in_progress`). # - # @param status_details [OpenAI::Models::Realtime::RealtimeResponseStatus] Additional details about the status. + # @param status_details [OpenAI::Models::Realtime::RealtimeResponseStatus] + # Additional details about the status. # - # @param usage [OpenAI::Models::Realtime::RealtimeResponseUsage] Usage statistics for the Response, this will correspond to billing. A + # @param usage [OpenAI::Models::Realtime::RealtimeResponseUsage] + # Usage statistics for the Response, this will correspond to billing. A Realtime + # API session will maintain a conversation context and append new Items to the + # Conversation, thus output from previous turns (text and audio tokens) will + # become the input for later turns. # @see OpenAI::Models::Realtime::RealtimeResponse#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -149,12 +175,14 @@ class Output < OpenAI::Internal::Type::BaseModel optional :voice, union: -> { OpenAI::Realtime::RealtimeResponse::Audio::Output::Voice } # @!method initialize(format_: nil, voice: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponse::Audio::Output} for more details. - # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the output audio. # - # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice] The voice the model uses to respond. Voice cannot be changed during the + # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice] + # The voice the model uses to respond. Voice cannot be changed during the session + # once the model has responded with audio at least once. Current voice options are + # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, + # and `cedar`. We recommend `marin` and `cedar` for best quality. # The voice the model uses to respond. Voice cannot be changed during the session # once the model has responded with audio at least once. Current voice options are diff --git a/lib/openai/models/realtime/realtime_response_create_audio_output.rb b/lib/openai/models/realtime/realtime_response_create_audio_output.rb index 023ce5f2d..82fd09c04 100644 --- a/lib/openai/models/realtime/realtime_response_create_audio_output.rb +++ b/lib/openai/models/realtime/realtime_response_create_audio_output.rb @@ -34,13 +34,16 @@ class Output < OpenAI::Internal::Type::BaseModel optional :voice, union: -> { OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice } # @!method initialize(format_: nil, voice: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output} for more - # details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the output audio. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio. - # - # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ID, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice] The voice the model uses to respond. Supported built-in voices are + # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ID, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice] + # The voice the model uses to respond. Supported built-in voices are `alloy`, + # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and + # `cedar`. You may also provide a custom voice object with an `id`, for example + # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the + # model has responded with audio at least once. We recommend `marin` and `cedar` + # for best quality. # The voice the model uses to respond. Supported built-in voices are `alloy`, # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and @@ -88,7 +91,8 @@ class ID < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Custom voice reference. # - # @param id [String] The custom voice ID, e.g. `voice_1234`. + # @param id [String] + # The custom voice ID, e.g. `voice_1234`. end # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb b/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb index a37c1e2ef..4ec2b2aee 100644 --- a/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +++ b/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb @@ -50,7 +50,7 @@ class RealtimeResponseCreateMcpTool < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -110,37 +110,64 @@ class RealtimeResponseCreateMcpTool < OpenAI::Internal::Type::BaseModel optional :tunnel_id, String # @!method initialize(server_label:, allowed_callers: nil, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool} for more details. - # # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - # @param server_label [String] A label for this MCP server, used to identify it in tool calls. + # @param server_label [String] + # A label for this MCP server, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object. + # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::AllowedTools::McpToolFilter, nil] + # List of allowed tool names or a filter object. # - # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either + # @param authorization [String] + # An OAuth access token that can be used with a remote MCP server, either with a + # custom MCP server URL or a service connector. Your application must handle the + # OAuth authorization flow and provide the token here. # - # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of + # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::ConnectorID] + # Identifier for service connectors, like those available in ChatGPT. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about + # service connectors + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # - # @param defer_loading [Boolean] Whether this MCP tool is deferred and discovered via tool search. + # Currently supported `connector_id` values are: # - # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication + # - Dropbox: `connector_dropbox` + # - Gmail: `connector_gmail` + # - Google Calendar: `connector_googlecalendar` + # - Google Drive: `connector_googledrive` + # - Microsoft Teams: `connector_microsoftteams` + # - Outlook Calendar: `connector_outlookcalendar` + # - Outlook Email: `connector_outlookemail` + # - SharePoint: `connector_sharepoint` # - # @param require_approval [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval. + # @param defer_loading [Boolean] + # Whether this MCP tool is deferred and discovered via tool search. # - # @param server_description [String] Optional description of the MCP server, used to provide more context. + # @param headers [Hash{Symbol=>String}, nil] + # Optional HTTP headers to send to the MCP server. Use for authentication or other + # purposes. # - # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or + # @param require_approval [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalSetting, nil] + # Specify which of the MCP server's tools require approval. # - # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # @param server_description [String] + # Optional description of the MCP server, used to provide more context. # - # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`. - + # @param server_url [String] + # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` + # must be provided. + # + # @param tunnel_id [String] + # The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. + # + # @param type [Symbol, :mcp] + # The type of the MCP tool. Always `mcp`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -180,15 +207,16 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::AllowedTools::McpToolFilter} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @!method self.variants @@ -201,7 +229,7 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -267,16 +295,14 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(always: nil, never: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter} - # for more details. - # # Specify which of the MCP server's tools require approval. Can be `always`, # `never`, or a filter object associated with tools that require approval. # - # @param always [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed. + # @param always [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Always] + # A filter object to specify which tools are allowed. # - # @param never [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed. + # @param never [OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Never] + # A filter object to specify which tools are allowed. # @see OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter#always class Always < OpenAI::Internal::Type::BaseModel @@ -296,15 +322,16 @@ class Always < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Always} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @see OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter#never @@ -325,15 +352,16 @@ class Never < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool::RequireApproval::McpToolApprovalFilter::Never} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end end diff --git a/lib/openai/models/realtime/realtime_response_create_params.rb b/lib/openai/models/realtime/realtime_response_create_params.rb index acc8e3d91..0ec5ee427 100644 --- a/lib/openai/models/realtime/realtime_response_create_params.rb +++ b/lib/openai/models/realtime/realtime_response_create_params.rb @@ -84,7 +84,7 @@ class RealtimeResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -112,34 +112,72 @@ class RealtimeResponseCreateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(audio: nil, conversation: nil, input: nil, instructions: nil, max_output_tokens: nil, metadata: nil, output_modalities: nil, parallel_tool_calls: nil, prompt: nil, reasoning: nil, tool_choice: nil, tools: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseCreateParams} for more details. - # # Create a new Realtime response with these parameters # - # @param audio [OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput] Configuration for audio input and output. + # @param audio [OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput] + # Configuration for audio input and output. + # + # @param conversation [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateParams::Conversation] + # Controls which conversation the response is added to. Currently supports `auto` + # and `none`, with `auto` as the default value. The `auto` value means that the + # contents of the response will be added to the default conversation. Set this to + # `none` to create an out-of-band response which will not add items to default + # conversation. # - # @param conversation [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateParams::Conversation] Controls which conversation the response is added to. Currently supports + # @param input [Array] + # Input items to include in the prompt for the model. Using this field creates a + # new context for this Response instead of using the default conversation. An + # empty array `[]` will clear the context for this Response. Note that this can + # include references to items that previously appeared in the session using their + # id. # - # @param input [Array] Input items to include in the prompt for the model. Using this field + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. Note that the server sets default + # instructions which will be used if this field is not set and are visible in the + # `session.created` event at the start of the session. # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model calls. + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param output_modalities [Array] The set of modalities the model used to respond, currently the only possible val + # @param output_modalities [Array] + # The set of modalities the model used to respond, currently the only possible + # values are `[\"audio\"]`, `[\"text\"]`. Audio output always include a text + # transcript. Setting the output to mode `text` will disable audio output from the + # model. # - # @param parallel_tool_calls [Boolean] Whether the model may call multiple tools in parallel. Only supported by + # @param parallel_tool_calls [Boolean] + # Whether the model may call multiple tools in parallel. Only supported by + # reasoning Realtime models such as `gpt-realtime-2`. # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # - # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. + # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] + # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model chooses tools. Provide one of the string modes or force a specific + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] + # How the model chooses tools. Provide one of the string modes or force a specific + # function/MCP tool. # - # @param tools [Array] Tools available to the model. + # @param tools [Array] + # Tools available to the model. # Controls which conversation the response is added to. Currently supports `auto` # and `none`, with `auto` as the default value. The `auto` value means that the @@ -227,14 +265,14 @@ module ToolChoice # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module Tool extend OpenAI::Internal::Type::Union variant -> { OpenAI::Realtime::RealtimeFunctionTool } # Give the model access to additional tools via remote Model Context Protocol - # (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). variant -> { OpenAI::Realtime::RealtimeResponseCreateMcpTool } # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_response_status.rb b/lib/openai/models/realtime/realtime_response_status.rb index 47b5e5bf9..c4f90addc 100644 --- a/lib/openai/models/realtime/realtime_response_status.rb +++ b/lib/openai/models/realtime/realtime_response_status.rb @@ -29,16 +29,22 @@ class RealtimeResponseStatus < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::RealtimeResponseStatus::Type } # @!method initialize(error: nil, reason: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseStatus} for more details. - # # Additional details about the status. # - # @param error [OpenAI::Models::Realtime::RealtimeResponseStatus::Error] A description of the error that caused the response to fail, + # @param error [OpenAI::Models::Realtime::RealtimeResponseStatus::Error] + # A description of the error that caused the response to fail, populated when the + # `status` is `failed`. # - # @param reason [Symbol, OpenAI::Models::Realtime::RealtimeResponseStatus::Reason] The reason the Response did not complete. For a `cancelled` Response, one of `t + # @param reason [Symbol, OpenAI::Models::Realtime::RealtimeResponseStatus::Reason] + # The reason the Response did not complete. For a `cancelled` Response, one of + # `turn_detected` (the server VAD detected a new start of speech) or + # `client_cancelled` (the client sent a cancel event). For an `incomplete` + # Response, one of `max_output_tokens` or `content_filter` (the server-side safety + # filter activated and cut off the response). # - # @param type [Symbol, OpenAI::Models::Realtime::RealtimeResponseStatus::Type] The type of error that caused the response to fail, corresponding + # @param type [Symbol, OpenAI::Models::Realtime::RealtimeResponseStatus::Type] + # The type of error that caused the response to fail, corresponding with the + # `status` field (`completed`, `cancelled`, `incomplete`, `failed`). # @see OpenAI::Models::Realtime::RealtimeResponseStatus#error class Error < OpenAI::Internal::Type::BaseModel @@ -58,9 +64,11 @@ class Error < OpenAI::Internal::Type::BaseModel # A description of the error that caused the response to fail, populated when the # `status` is `failed`. # - # @param code [String] Error code, if any. + # @param code [String] + # Error code, if any. # - # @param type [String] The type of error. + # @param type [String] + # The type of error. end # The reason the Response did not complete. For a `cancelled` Response, one of diff --git a/lib/openai/models/realtime/realtime_response_usage.rb b/lib/openai/models/realtime/realtime_response_usage.rb index 993b1f0e5..f44bd7565 100644 --- a/lib/openai/models/realtime/realtime_response_usage.rb +++ b/lib/openai/models/realtime/realtime_response_usage.rb @@ -41,23 +41,31 @@ class RealtimeResponseUsage < OpenAI::Internal::Type::BaseModel optional :total_tokens, Integer # @!method initialize(input_token_details: nil, input_tokens: nil, output_token_details: nil, output_tokens: nil, total_tokens: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeResponseUsage} for more details. - # # Usage statistics for the Response, this will correspond to billing. A Realtime # API session will maintain a conversation context and append new Items to the # Conversation, thus output from previous turns (text and audio tokens) will # become the input for later turns. # - # @param input_token_details [OpenAI::Models::Realtime::RealtimeResponseUsageInputTokenDetails] Details about the input tokens used in the Response. Cached tokens are tokens fr + # @param input_token_details [OpenAI::Models::Realtime::RealtimeResponseUsageInputTokenDetails] + # Details about the input tokens used in the Response. Cached tokens are tokens + # from previous turns in the conversation that are included as context for the + # current response. Cached tokens here are counted as a subset of input tokens, + # meaning input tokens will include cached and uncached tokens. # - # @param input_tokens [Integer] The number of input tokens used in the Response, including text and + # @param input_tokens [Integer] + # The number of input tokens used in the Response, including text and audio + # tokens. # - # @param output_token_details [OpenAI::Models::Realtime::RealtimeResponseUsageOutputTokenDetails] Details about the output tokens used in the Response. + # @param output_token_details [OpenAI::Models::Realtime::RealtimeResponseUsageOutputTokenDetails] + # Details about the output tokens used in the Response. # - # @param output_tokens [Integer] The number of output tokens sent in the Response, including text and + # @param output_tokens [Integer] + # The number of output tokens sent in the Response, including text and audio + # tokens. # - # @param total_tokens [Integer] The total number of tokens in the Response including input and output + # @param total_tokens [Integer] + # The total number of tokens in the Response including input and output text and + # audio tokens. end end end diff --git a/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb b/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb index 450e5b3c0..ce72fe928 100644 --- a/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb +++ b/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb @@ -43,15 +43,20 @@ class RealtimeResponseUsageInputTokenDetails < OpenAI::Internal::Type::BaseModel # current response. Cached tokens here are counted as a subset of input tokens, # meaning input tokens will include cached and uncached tokens. # - # @param audio_tokens [Integer] The number of audio tokens used as input for the Response. + # @param audio_tokens [Integer] + # The number of audio tokens used as input for the Response. # - # @param cached_tokens [Integer] The number of cached tokens used as input for the Response. + # @param cached_tokens [Integer] + # The number of cached tokens used as input for the Response. # - # @param cached_tokens_details [OpenAI::Models::Realtime::RealtimeResponseUsageInputTokenDetails::CachedTokensDetails] Details about the cached tokens used as input for the Response. + # @param cached_tokens_details [OpenAI::Models::Realtime::RealtimeResponseUsageInputTokenDetails::CachedTokensDetails] + # Details about the cached tokens used as input for the Response. # - # @param image_tokens [Integer] The number of image tokens used as input for the Response. + # @param image_tokens [Integer] + # The number of image tokens used as input for the Response. # - # @param text_tokens [Integer] The number of text tokens used as input for the Response. + # @param text_tokens [Integer] + # The number of text tokens used as input for the Response. # @see OpenAI::Models::Realtime::RealtimeResponseUsageInputTokenDetails#cached_tokens_details class CachedTokensDetails < OpenAI::Internal::Type::BaseModel @@ -76,11 +81,14 @@ class CachedTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(audio_tokens: nil, image_tokens: nil, text_tokens: nil) # Details about the cached tokens used as input for the Response. # - # @param audio_tokens [Integer] The number of cached audio tokens used as input for the Response. + # @param audio_tokens [Integer] + # The number of cached audio tokens used as input for the Response. # - # @param image_tokens [Integer] The number of cached image tokens used as input for the Response. + # @param image_tokens [Integer] + # The number of cached image tokens used as input for the Response. # - # @param text_tokens [Integer] The number of cached text tokens used as input for the Response. + # @param text_tokens [Integer] + # The number of cached text tokens used as input for the Response. end end end diff --git a/lib/openai/models/realtime/realtime_response_usage_output_token_details.rb b/lib/openai/models/realtime/realtime_response_usage_output_token_details.rb index 059cdf546..035581ca9 100644 --- a/lib/openai/models/realtime/realtime_response_usage_output_token_details.rb +++ b/lib/openai/models/realtime/realtime_response_usage_output_token_details.rb @@ -19,9 +19,11 @@ class RealtimeResponseUsageOutputTokenDetails < OpenAI::Internal::Type::BaseMode # @!method initialize(audio_tokens: nil, text_tokens: nil) # Details about the output tokens used in the Response. # - # @param audio_tokens [Integer] The number of audio tokens used in the Response. + # @param audio_tokens [Integer] + # The number of audio tokens used in the Response. # - # @param text_tokens [Integer] The number of text tokens used in the Response. + # @param text_tokens [Integer] + # The number of text tokens used in the Response. end end end diff --git a/lib/openai/models/realtime/realtime_server_event.rb b/lib/openai/models/realtime/realtime_server_event.rb index 8c52d9930..70a94fae5 100644 --- a/lib/openai/models/realtime/realtime_server_event.rb +++ b/lib/openai/models/realtime/realtime_server_event.rb @@ -201,7 +201,7 @@ module RealtimeServerEvent # **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is # emitted after an audio content part has been added (`response.content_part.added`) # to the response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). variant( :"output_audio_buffer.started", -> { OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferStarted } @@ -210,7 +210,7 @@ module RealtimeServerEvent # **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server, # and no more audio is forthcoming. This event is emitted after the full response # data has been sent to the client (`response.done`). - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). variant( :"output_audio_buffer.stopped", -> { OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferStopped } @@ -220,7 +220,7 @@ module RealtimeServerEvent # mode when the user has interrupted (`input_audio_buffer.speech_started`), # or when the client has emitted the `output_audio_buffer.clear` event to manually # cut off the current audio response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). variant( :"output_audio_buffer.cleared", -> { OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferCleared } @@ -310,11 +310,14 @@ class ConversationItemRetrieved < OpenAI::Internal::Type::BaseModel # data after noise cancellation and VAD. It includes the full content of the Item, # including audio data. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param type [Symbol, :"conversation.item.retrieved"] The event type, must be `conversation.item.retrieved`. + # @param type [Symbol, :"conversation.item.retrieved"] + # The event type, must be `conversation.item.retrieved`. end class OutputAudioBufferStarted < OpenAI::Internal::Type::BaseModel @@ -340,13 +343,16 @@ class OutputAudioBufferStarted < OpenAI::Internal::Type::BaseModel # **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the # client. This event is emitted after an audio content part has been added # (`response.content_part.added`) to the response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param response_id [String] The unique ID of the response that produced the audio. + # @param response_id [String] + # The unique ID of the response that produced the audio. # - # @param type [Symbol, :"output_audio_buffer.started"] The event type, must be `output_audio_buffer.started`. + # @param type [Symbol, :"output_audio_buffer.started"] + # The event type, must be `output_audio_buffer.started`. end class OutputAudioBufferStopped < OpenAI::Internal::Type::BaseModel @@ -372,13 +378,16 @@ class OutputAudioBufferStopped < OpenAI::Internal::Type::BaseModel # **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely # drained on the server, and no more audio is forthcoming. This event is emitted # after the full response data has been sent to the client (`response.done`). - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param response_id [String] The unique ID of the response that produced the audio. + # @param response_id [String] + # The unique ID of the response that produced the audio. # - # @param type [Symbol, :"output_audio_buffer.stopped"] The event type, must be `output_audio_buffer.stopped`. + # @param type [Symbol, :"output_audio_buffer.stopped"] + # The event type, must be `output_audio_buffer.stopped`. end class OutputAudioBufferCleared < OpenAI::Internal::Type::BaseModel @@ -406,13 +415,16 @@ class OutputAudioBufferCleared < OpenAI::Internal::Type::BaseModel # (`input_audio_buffer.speech_started`), or when the client has emitted the # `output_audio_buffer.clear` event to manually cut off the current audio # response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param response_id [String] The unique ID of the response that produced the audio. + # @param response_id [String] + # The unique ID of the response that produced the audio. # - # @param type [Symbol, :"output_audio_buffer.cleared"] The event type, must be `output_audio_buffer.cleared`. + # @param type [Symbol, :"output_audio_buffer.cleared"] + # The event type, must be `output_audio_buffer.cleared`. end # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_session.rb b/lib/openai/models/realtime/realtime_session.rb index 2f5439886..0ff093818 100644 --- a/lib/openai/models/realtime/realtime_session.rb +++ b/lib/openai/models/realtime/realtime_session.rb @@ -52,7 +52,7 @@ class RealtimeSession < OpenAI::Internal::Type::BaseModel # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -118,7 +118,7 @@ class RealtimeSession < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -191,51 +191,123 @@ class RealtimeSession < OpenAI::Internal::Type::BaseModel optional :voice, union: -> { OpenAI::Realtime::RealtimeSession::Voice } # @!method initialize(id: nil, expires_at: nil, include: nil, input_audio_format: nil, input_audio_noise_reduction: nil, input_audio_transcription: nil, instructions: nil, max_response_output_tokens: nil, modalities: nil, model: nil, object: nil, output_audio_format: nil, prompt: nil, speed: nil, temperature: nil, tool_choice: nil, tools: nil, tracing: nil, turn_detection: nil, voice: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSession} for more details. - # # Realtime session object for the beta interface. # - # @param id [String] Unique identifier for the session that looks like `sess_1234567890abcdef`. - # - # @param expires_at [Integer] Expiration timestamp for the session, in seconds since epoch. - # - # @param include [Array, nil] Additional fields to include in server outputs. - # - # @param input_audio_format [Symbol, OpenAI::Models::Realtime::RealtimeSession::InputAudioFormat] The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - # - # @param input_audio_noise_reduction [OpenAI::Models::Realtime::RealtimeSession::InputAudioNoiseReduction] Configuration for input audio noise reduction. This can be set to `null` to turn - # - # @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription, nil] Configuration for input audio transcription, defaults to off and can be set to ` - # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model - # - # @param max_response_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, - # - # @param modalities [Array] The set of modalities the model can respond with. To disable audio, - # - # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSession::Model] The Realtime model used for this session. - # - # @param object [Symbol, OpenAI::Models::Realtime::RealtimeSession::Object] The object type. Always `realtime.session`. - # - # @param output_audio_format [Symbol, OpenAI::Models::Realtime::RealtimeSession::OutputAudioFormat] The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param speed [Float] The speed of the model's spoken response. 1.0 is the default speed. 0.25 is - # - # @param temperature [Float] Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a te - # - # @param tool_choice [String] How the model chooses tools. Options are `auto`, `none`, `required`, or - # - # @param tools [Array] Tools (functions) available to the model. - # - # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeSession::Tracing::TracingConfiguration, nil] Configuration options for tracing. Set to null to disable tracing. Once - # - # @param turn_detection [OpenAI::Models::Realtime::RealtimeSession::TurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeSession::TurnDetection::SemanticVad, nil] Configuration for turn detection, ether Server VAD or Semantic VAD. This can be - # - # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeSession::Voice] The voice the model uses to respond. Voice cannot be changed during the - + # @param id [String] + # Unique identifier for the session that looks like `sess_1234567890abcdef`. + # + # @param expires_at [Integer] + # Expiration timestamp for the session, in seconds since epoch. + # + # @param include [Array, nil] + # Additional fields to include in server outputs. + # + # - `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param input_audio_format [Symbol, OpenAI::Models::Realtime::RealtimeSession::InputAudioFormat] + # The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For + # `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel + # (mono), and little-endian byte order. + # + # @param input_audio_noise_reduction [OpenAI::Models::Realtime::RealtimeSession::InputAudioNoiseReduction] + # Configuration for input audio noise reduction. This can be set to `null` to turn + # off. Noise reduction filters audio added to the input audio buffer before it is + # sent to VAD and the model. Filtering the audio can improve VAD and turn + # detection accuracy (reducing false positives) and model performance by improving + # perception of the input audio. + # + # @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription, nil] + # Configuration for input audio transcription, defaults to off and can be set to + # `null` to turn off once on. Input audio transcription is not native to the + # model, since the model consumes audio directly. Transcription runs + # asynchronously through + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) + # and should be treated as guidance of input audio content rather than precisely + # what the model heard. The client can optionally set the language and prompt for + # transcription, these offer additional guidance to the transcription service. + # + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. + # + # Note that the server sets default instructions which will be used if this field + # is not set and are visible in the `session.created` event at the start of the + # session. + # + # @param max_response_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. + # + # @param modalities [Array] + # The set of modalities the model can respond with. To disable audio, set this to + # ["text"]. + # + # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSession::Model] + # The Realtime model used for this session. + # + # @param object [Symbol, OpenAI::Models::Realtime::RealtimeSession::Object] + # The object type. Always `realtime.session`. + # + # @param output_audio_format [Symbol, OpenAI::Models::Realtime::RealtimeSession::OutputAudioFormat] + # The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + # For `pcm16`, output audio is sampled at a rate of 24kHz. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param speed [Float] + # The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the + # minimum speed. 1.5 is the maximum speed. This value can only be changed in + # between model turns, not while a response is in progress. + # + # @param temperature [Float] + # Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a + # temperature of 0.8 is highly recommended for best performance. + # + # @param tool_choice [String] + # How the model chooses tools. Options are `auto`, `none`, `required`, or specify + # a function. + # + # @param tools [Array] + # Tools (functions) available to the model. + # + # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeSession::Tracing::TracingConfiguration, nil] + # Configuration options for tracing. Set to null to disable tracing. Once tracing + # is enabled for a session, the configuration cannot be modified. + # + # `auto` will create a trace for the session with default values for the workflow + # name, group id, and metadata. + # + # @param turn_detection [OpenAI::Models::Realtime::RealtimeSession::TurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeSession::TurnDetection::SemanticVad, nil] + # Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # set to `null` to turn off, in which case the client must manually trigger model + # response. + # + # Server VAD means that the model will detect the start and end of speech based on + # audio volume and respond at the end of user speech. + # + # Semantic VAD is more advanced and uses a turn detection model (in conjunction + # with VAD) to semantically estimate whether the user has finished speaking, then + # dynamically sets a timeout based on this probability. For example, if user audio + # trails off with "uhhm", the model will score a low probability of turn end and + # wait longer for the user to continue speaking. This can be useful for more + # natural conversations, but may have a higher latency. + # + # For `gpt-realtime-whisper` transcription sessions, turn detection must be set to + # `null`; VAD is not supported. + # + # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeSession::Voice] + # The voice the model uses to respond. Voice cannot be changed during the session + # once the model has responded with audio at least once. Current voice options are + # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`. module Include extend OpenAI::Internal::Type::Enum @@ -272,17 +344,16 @@ class InputAudioNoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSession::InputAudioNoiseReduction} for more - # details. - # # Configuration for input audio noise reduction. This can be set to `null` to turn # off. Noise reduction filters audio added to the input audio buffer before it is # sent to VAD and the model. Filtering the audio can improve VAD and turn # detection accuracy (reducing false positives) and model performance by improving # perception of the input audio. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # Maximum number of output tokens for a single assistant response, inclusive of @@ -448,17 +519,19 @@ class TracingConfiguration < OpenAI::Internal::Type::BaseModel optional :workflow_name, String # @!method initialize(group_id: nil, metadata: nil, workflow_name: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSession::Tracing::TracingConfiguration} for - # more details. - # # Granular configuration for tracing. # - # @param group_id [String] The group id to attach to this trace to enable filtering and + # @param group_id [String] + # The group id to attach to this trace to enable filtering and grouping in the + # traces dashboard. # - # @param metadata [Object] The arbitrary metadata to attach to this trace to enable + # @param metadata [Object] + # The arbitrary metadata to attach to this trace to enable filtering in the traces + # dashboard. # - # @param workflow_name [String] The name of the workflow to attach to this trace. This is used to + # @param workflow_name [String] + # The name of the workflow to attach to this trace. This is used to name the trace + # in the traces dashboard. end # @!method self.variants @@ -565,26 +638,56 @@ class ServerVad < OpenAI::Internal::Type::BaseModel optional :threshold, Float # @!method initialize(create_response: nil, idle_timeout_ms: nil, interrupt_response: nil, prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: :server_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSession::TurnDetection::ServerVad} for more - # details. - # # Server-side voice activity detection (VAD) which flips on when user speech is # detected and off after a period of silence. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs - # - # @param idle_timeout_ms [Integer, nil] Optional timeout after which a model response will be triggered automatically. T - # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt (cancel) any ongoing response with out - # - # @param prefix_padding_ms [Integer] Used only for `server_vad` mode. Amount of audio to include before the VAD detec - # - # @param silence_duration_ms [Integer] Used only for `server_vad` mode. Duration of silence to detect speech stop (in m - # - # @param threshold [Float] Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this - # - # @param type [Symbol, :server_vad] Type of turn detection, `server_vad` to turn on simple Server VAD. + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. If `interrupt_response` is set to `false` this may fail to create a + # response if the model is already responding. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param idle_timeout_ms [Integer, nil] + # Optional timeout after which a model response will be triggered automatically. + # This is useful for situations in which a long pause from the user is unexpected, + # such as a phone call. The model will effectively prompt the user to continue the + # conversation based on the current context. + # + # The timeout value will be applied after the last model response's audio has + # finished playing, i.e. it's set to the `response.done` time plus audio playback + # duration. + # + # An `input_audio_buffer.timeout_triggered` event (plus events associated with the + # Response) will be emitted when the timeout is reached. Idle timeout is currently + # only supported for `server_vad` mode. + # + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt (cancel) any ongoing response with + # output to the default conversation (i.e. `conversation` of `auto`) when a VAD + # start event occurs. If `true` then the response will be cancelled, otherwise it + # will continue until complete. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param prefix_padding_ms [Integer] + # Used only for `server_vad` mode. Amount of audio to include before the VAD + # detected speech (in milliseconds). Defaults to 300ms. + # + # @param silence_duration_ms [Integer] + # Used only for `server_vad` mode. Duration of silence to detect speech stop (in + # milliseconds). Defaults to 500ms. With shorter values the model will respond + # more quickly, but may jump in on short pauses from the user. + # + # @param threshold [Float] + # Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this + # defaults to 0.5. A higher threshold will require louder audio to activate the + # model, and thus might perform better in noisy environments. + # + # @param type [Symbol, :server_vad] + # Type of turn detection, `server_vad` to turn on simple Server VAD. end class SemanticVad < OpenAI::Internal::Type::BaseModel @@ -619,20 +722,26 @@ class SemanticVad < OpenAI::Internal::Type::BaseModel optional :interrupt_response, OpenAI::Internal::Type::Boolean # @!method initialize(create_response: nil, eagerness: nil, interrupt_response: nil, type: :semantic_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSession::TurnDetection::SemanticVad} for more - # details. - # # Server-side semantic turn detection which uses a model to determine when the # user has finished speaking. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. # - # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeSession::TurnDetection::SemanticVad::Eagerness] Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeSession::TurnDetection::SemanticVad::Eagerness] + # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # will wait longer for the user to continue speaking, `high` will respond more + # quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, + # and `high` have max timeouts of 8s, 4s, and 2s respectively. # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt any ongoing response with output to th + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt any ongoing response with output to + # the default conversation (i.e. `conversation` of `auto`) when a VAD start event + # occurs. # - # @param type [Symbol, :semantic_vad] Type of turn detection, `semantic_vad` to turn on Semantic VAD. + # @param type [Symbol, :semantic_vad] + # Type of turn detection, `semantic_vad` to turn on Semantic VAD. # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` # will wait longer for the user to continue speaking, `high` will respond more diff --git a/lib/openai/models/realtime/realtime_session_create_request.rb b/lib/openai/models/realtime/realtime_session_create_request.rb index d7df2c777..577013d5c 100644 --- a/lib/openai/models/realtime/realtime_session_create_request.rb +++ b/lib/openai/models/realtime/realtime_session_create_request.rb @@ -79,7 +79,7 @@ class RealtimeSessionCreateRequest < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -139,39 +139,93 @@ class RealtimeSessionCreateRequest < OpenAI::Internal::Type::BaseModel optional :truncation, union: -> { OpenAI::Realtime::RealtimeTruncation } # @!method initialize(audio: nil, include: nil, instructions: nil, max_output_tokens: nil, model: nil, output_modalities: nil, parallel_tool_calls: nil, prompt: nil, reasoning: nil, tool_choice: nil, tools: nil, tracing: nil, truncation: nil, type: :realtime) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateRequest} for more details. - # # Realtime session object configuration. # - # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] Configuration for input and output audio. - # - # @param include [Array] Additional fields to include in server outputs. - # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model calls. - # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, - # - # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] The Realtime model used for this session. - # - # @param output_modalities [Array] The set of modalities the model can respond with. It defaults to `["audio"]`, in - # - # @param parallel_tool_calls [Boolean] Whether the model may call multiple tools in parallel. Only supported by - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model chooses tools. Provide one of the string modes or force a specific - # - # @param tools [Array] Tools available to the model. - # - # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] Realtime API can write session traces to the [Traces Dashboard](https://platform - # - # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] When the number of tokens in a conversation exceeds the model's input token limi - # - # @param type [Symbol, :realtime] The type of session to create. Always `realtime` for the Realtime API. - + # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] + # Configuration for input and output audio. + # + # @param include [Array] + # Additional fields to include in server outputs. + # + # `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. + # + # Note that the server sets default instructions which will be used if this field + # is not set and are visible in the `session.created` event at the start of the + # session. + # + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. + # + # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] + # The Realtime model used for this session. + # + # @param output_modalities [Array] + # The set of modalities the model can respond with. It defaults to `["audio"]`, + # indicating that the model will respond with audio plus a transcript. `["text"]` + # can be used to make the model respond with text only. It is not possible to + # request both `text` and `audio` at the same time. + # + # @param parallel_tool_calls [Boolean] + # Whether the model may call multiple tools in parallel. Only supported by + # reasoning Realtime models such as `gpt-realtime-2`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] + # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] + # How the model chooses tools. Provide one of the string modes or force a specific + # function/MCP tool. + # + # @param tools [Array] + # Tools available to the model. + # + # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] + # Realtime API can write session traces to the + # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to + # disable tracing. Once tracing is enabled for a session, the configuration cannot + # be modified. + # + # `auto` will create a trace for the session with default values for the workflow + # name, group id, and metadata. + # + # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] + # When the number of tokens in a conversation exceeds the model's input token + # limit, the conversation be truncated, meaning messages (starting from the + # oldest) will not be included in the model's context. A 32k context model with + # 4,096 max output tokens can only include 28,224 tokens in the context before + # truncation occurs. + # + # Clients can configure truncation behavior to truncate with a lower max token + # limit, which is an effective way to control token usage and cost. + # + # Truncation will reduce the number of cached tokens on the next turn (busting the + # cache), since messages are dropped from the beginning of the context. However, + # clients can also configure truncation to retain messages up to a fraction of the + # maximum context size, which will reduce the need for future truncations and thus + # improve the cache rate. + # + # Truncation can be disabled entirely, which means the server will never truncate + # but would instead return an error if the conversation exceeds the model's input + # token limit. + # + # @param type [Symbol, :realtime] + # The type of session to create. Always `realtime` for the Realtime API. module Include extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/realtime/realtime_session_create_response.rb b/lib/openai/models/realtime/realtime_session_create_response.rb index 3e43d18a4..0c13476e2 100644 --- a/lib/openai/models/realtime/realtime_session_create_response.rb +++ b/lib/openai/models/realtime/realtime_session_create_response.rb @@ -93,7 +93,7 @@ class RealtimeSessionCreateResponse < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -156,42 +156,98 @@ class RealtimeSessionCreateResponse < OpenAI::Internal::Type::BaseModel optional :truncation, union: -> { OpenAI::Realtime::RealtimeTruncation } # @!method initialize(id:, audio: nil, expires_at: nil, include: nil, instructions: nil, max_output_tokens: nil, model: nil, output_modalities: nil, prompt: nil, reasoning: nil, tool_choice: nil, tools: nil, tracing: nil, truncation: nil, object: :"realtime.session", type: :realtime) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse} for more details. - # # A Realtime session configuration object. # - # @param id [String] Unique identifier for the session that looks like `sess_1234567890abcdef`. + # @param id [String] + # Unique identifier for the session that looks like `sess_1234567890abcdef`. + # + # @param audio [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio] + # Configuration for input and output audio. + # + # @param expires_at [Integer] + # Expiration timestamp for the session, in seconds since epoch. + # + # @param include [Array] + # Additional fields to include in server outputs. + # + # `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. + # + # Note that the server sets default instructions which will be used if this field + # is not set and are visible in the `session.created` event at the start of the + # session. # - # @param audio [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio] Configuration for input and output audio. + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. # - # @param expires_at [Integer] Expiration timestamp for the session, in seconds since epoch. + # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Model] + # The Realtime model used for this session. # - # @param include [Array] Additional fields to include in server outputs. + # @param output_modalities [Array] + # The set of modalities the model can respond with. It defaults to `["audio"]`, + # indicating that the model will respond with audio plus a transcript. `["text"]` + # can be used to make the model respond with text only. It is not possible to + # request both `text` and `audio` at the same time. # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model calls. + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, + # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] + # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. # - # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Model] The Realtime model used for this session. + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] + # How the model chooses tools. Provide one of the string modes or force a specific + # function/MCP tool. # - # @param output_modalities [Array] The set of modalities the model can respond with. It defaults to `["audio"]`, in + # @param tools [Array] + # Tools available to the model. # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. + # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tracing::TracingConfiguration, nil] + # Realtime API can write session traces to the + # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to + # disable tracing. Once tracing is enabled for a session, the configuration cannot + # be modified. # - # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. + # `auto` will create a trace for the session with default values for the workflow + # name, group id, and metadata. # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model chooses tools. Provide one of the string modes or force a specific + # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] + # When the number of tokens in a conversation exceeds the model's input token + # limit, the conversation be truncated, meaning messages (starting from the + # oldest) will not be included in the model's context. A 32k context model with + # 4,096 max output tokens can only include 28,224 tokens in the context before + # truncation occurs. # - # @param tools [Array] Tools available to the model. + # Clients can configure truncation behavior to truncate with a lower max token + # limit, which is an effective way to control token usage and cost. # - # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tracing::TracingConfiguration, nil] Realtime API can write session traces to the [Traces Dashboard](https://platform + # Truncation will reduce the number of cached tokens on the next turn (busting the + # cache), since messages are dropped from the beginning of the context. However, + # clients can also configure truncation to retain messages up to a fraction of the + # maximum context size, which will reduce the need for future truncations and thus + # improve the cache rate. # - # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] When the number of tokens in a conversation exceeds the model's input token limi + # Truncation can be disabled entirely, which means the server will never truncate + # but would instead return an error if the conversation exceeds the model's input + # token limit. # - # @param object [Symbol, :"realtime.session"] The object type. Always `realtime.session`. + # @param object [Symbol, :"realtime.session"] + # The object type. Always `realtime.session`. # - # @param type [Symbol, :realtime] The type of session to create. Always `realtime` for the Realtime API. + # @param type [Symbol, :realtime] + # The type of session to create. Always `realtime` for the Realtime API. # @see OpenAI::Models::Realtime::RealtimeSessionCreateResponse#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -265,17 +321,35 @@ class Input < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil, noise_reduction: nil, transcription: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input} for more - # details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the input audio. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the input audio. - # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::NoiseReduction] Configuration for input audio noise reduction. This can be set to `null` to turn + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::NoiseReduction] + # Configuration for input audio noise reduction. This can be set to `null` to turn + # off. Noise reduction filters audio added to the input audio buffer before it is + # sent to VAD and the model. Filtering the audio can improve VAD and turn + # detection accuracy (reducing false positives) and model performance by improving + # perception of the input audio. # # @param transcription [OpenAI::Models::Realtime::AudioTranscription] # - # @param turn_detection [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::SemanticVad, nil] Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # @param turn_detection [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::SemanticVad, nil] + # Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # set to `null` to turn off, in which case the client must manually trigger model + # response. + # + # Server VAD means that the model will detect the start and end of speech based on + # audio volume and respond at the end of user speech. + # + # Semantic VAD is more advanced and uses a turn detection model (in conjunction + # with VAD) to semantically estimate whether the user has finished speaking, then + # dynamically sets a timeout based on this probability. For example, if user audio + # trails off with "uhhm", the model will score a low probability of turn end and + # wait longer for the user to continue speaking. This can be useful for more + # natural conversations, but may have a higher latency. + # + # For `gpt-realtime-whisper` transcription sessions, turn detection must be set to + # `null`; VAD is not supported. # @see OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -288,17 +362,16 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::NoiseReduction} - # for more details. - # # Configuration for input audio noise reduction. This can be set to `null` to turn # off. Noise reduction filters audio added to the input audio buffer before it is # sent to VAD and the model. Filtering the audio can improve VAD and turn # detection accuracy (reducing false positives) and model performance by improving # perception of the input audio. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # Configuration for turn detection, ether Server VAD or Semantic VAD. This can be @@ -407,26 +480,56 @@ class ServerVad < OpenAI::Internal::Type::BaseModel optional :threshold, Float # @!method initialize(create_response: nil, idle_timeout_ms: nil, interrupt_response: nil, prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: :server_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::ServerVad} - # for more details. - # # Server-side voice activity detection (VAD) which flips on when user speech is # detected and off after a period of silence. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. If `interrupt_response` is set to `false` this may fail to create a + # response if the model is already responding. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. # - # @param idle_timeout_ms [Integer, nil] Optional timeout after which a model response will be triggered automatically. T + # @param idle_timeout_ms [Integer, nil] + # Optional timeout after which a model response will be triggered automatically. + # This is useful for situations in which a long pause from the user is unexpected, + # such as a phone call. The model will effectively prompt the user to continue the + # conversation based on the current context. # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt (cancel) any ongoing response with out + # The timeout value will be applied after the last model response's audio has + # finished playing, i.e. it's set to the `response.done` time plus audio playback + # duration. # - # @param prefix_padding_ms [Integer] Used only for `server_vad` mode. Amount of audio to include before the VAD detec + # An `input_audio_buffer.timeout_triggered` event (plus events associated with the + # Response) will be emitted when the timeout is reached. Idle timeout is currently + # only supported for `server_vad` mode. # - # @param silence_duration_ms [Integer] Used only for `server_vad` mode. Duration of silence to detect speech stop (in m + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt (cancel) any ongoing response with + # output to the default conversation (i.e. `conversation` of `auto`) when a VAD + # start event occurs. If `true` then the response will be cancelled, otherwise it + # will continue until complete. # - # @param threshold [Float] Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. # - # @param type [Symbol, :server_vad] Type of turn detection, `server_vad` to turn on simple Server VAD. + # @param prefix_padding_ms [Integer] + # Used only for `server_vad` mode. Amount of audio to include before the VAD + # detected speech (in milliseconds). Defaults to 300ms. + # + # @param silence_duration_ms [Integer] + # Used only for `server_vad` mode. Duration of silence to detect speech stop (in + # milliseconds). Defaults to 500ms. With shorter values the model will respond + # more quickly, but may jump in on short pauses from the user. + # + # @param threshold [Float] + # Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this + # defaults to 0.5. A higher threshold will require louder audio to activate the + # model, and thus might perform better in noisy environments. + # + # @param type [Symbol, :server_vad] + # Type of turn detection, `server_vad` to turn on simple Server VAD. end class SemanticVad < OpenAI::Internal::Type::BaseModel @@ -466,20 +569,26 @@ class SemanticVad < OpenAI::Internal::Type::BaseModel optional :interrupt_response, OpenAI::Internal::Type::Boolean # @!method initialize(create_response: nil, eagerness: nil, interrupt_response: nil, type: :semantic_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::SemanticVad} - # for more details. - # # Server-side semantic turn detection which uses a model to determine when the # user has finished speaking. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. # - # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::SemanticVad::Eagerness] Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Input::TurnDetection::SemanticVad::Eagerness] + # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # will wait longer for the user to continue speaking, `high` will respond more + # quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, + # and `high` have max timeouts of 8s, 4s, and 2s respectively. # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt any ongoing response with output to th + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt any ongoing response with output to + # the default conversation (i.e. `conversation` of `auto`) when a VAD start event + # occurs. # - # @param type [Symbol, :semantic_vad] Type of turn detection, `semantic_vad` to turn on Semantic VAD. + # @param type [Symbol, :semantic_vad] + # Type of turn detection, `semantic_vad` to turn on Semantic VAD. # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` # will wait longer for the user to continue speaking, `high` will respond more @@ -535,15 +644,23 @@ class Output < OpenAI::Internal::Type::BaseModel optional :voice, union: -> { OpenAI::Realtime::RealtimeSessionCreateResponse::Audio::Output::Voice } # @!method initialize(format_: nil, speed: nil, voice: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Output} for - # more details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The format of the output audio. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio. + # @param speed [Float] + # The speed of the model's spoken response as a multiple of the original speed. + # 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. + # This value can only be changed in between model turns, not while a response is + # in progress. # - # @param speed [Float] The speed of the model's spoken response as a multiple of the original speed. + # This parameter is a post-processing adjustment to the audio after it is + # generated, it's also possible to prompt the model to speak faster or slower. # - # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Output::Voice] The voice the model uses to respond. Voice cannot be changed during the + # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Audio::Output::Voice] + # The voice the model uses to respond. Voice cannot be changed during the session + # once the model has responded with audio at least once. Current voice options are + # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, + # and `cedar`. We recommend `marin` and `cedar` for best quality. # The voice the model uses to respond. Voice cannot be changed during the session # once the model has responded with audio at least once. Current voice options are @@ -785,14 +902,14 @@ module ToolChoice # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module Tool extend OpenAI::Internal::Type::Union variant -> { OpenAI::Realtime::RealtimeFunctionTool } # Give the model access to additional tools via remote Model Context Protocol - # (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). variant -> { OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool } class McpTool < OpenAI::Internal::Type::BaseModel @@ -846,7 +963,7 @@ class McpTool < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -911,38 +1028,64 @@ class McpTool < OpenAI::Internal::Type::BaseModel optional :tunnel_id, String # @!method initialize(server_label:, allowed_callers: nil, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool} for - # more details. - # # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - # @param server_label [String] A label for this MCP server, used to identify it in tool calls. + # @param server_label [String] + # A label for this MCP server, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object. + # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedTools::McpToolFilter, nil] + # List of allowed tool names or a filter object. # - # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either + # @param authorization [String] + # An OAuth access token that can be used with a remote MCP server, either with a + # custom MCP server URL or a service connector. Your application must handle the + # OAuth authorization flow and provide the token here. # - # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of + # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::ConnectorID] + # Identifier for service connectors, like those available in ChatGPT. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about + # service connectors + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # - # @param defer_loading [Boolean] Whether this MCP tool is deferred and discovered via tool search. + # Currently supported `connector_id` values are: # - # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication + # - Dropbox: `connector_dropbox` + # - Gmail: `connector_gmail` + # - Google Calendar: `connector_googlecalendar` + # - Google Drive: `connector_googledrive` + # - Microsoft Teams: `connector_microsoftteams` + # - Outlook Calendar: `connector_outlookcalendar` + # - Outlook Email: `connector_outlookemail` + # - SharePoint: `connector_sharepoint` # - # @param require_approval [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval. + # @param defer_loading [Boolean] + # Whether this MCP tool is deferred and discovered via tool search. # - # @param server_description [String] Optional description of the MCP server, used to provide more context. + # @param headers [Hash{Symbol=>String}, nil] + # Optional HTTP headers to send to the MCP server. Use for authentication or other + # purposes. # - # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or + # @param require_approval [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalSetting, nil] + # Specify which of the MCP server's tools require approval. # - # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # @param server_description [String] + # Optional description of the MCP server, used to provide more context. # - # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`. - + # @param server_url [String] + # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` + # must be provided. + # + # @param tunnel_id [String] + # The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. + # + # @param type [Symbol, :mcp] + # The type of the MCP tool. Always `mcp`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -988,15 +1131,16 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedTools::McpToolFilter} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @!method self.variants @@ -1009,7 +1153,7 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -1087,16 +1231,14 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(always: nil, never: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter} - # for more details. - # # Specify which of the MCP server's tools require approval. Can be `always`, # `never`, or a filter object associated with tools that require approval. # - # @param always [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed. + # @param always [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Always] + # A filter object to specify which tools are allowed. # - # @param never [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed. + # @param never [OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Never] + # A filter object to specify which tools are allowed. # @see OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter#always class Always < OpenAI::Internal::Type::BaseModel @@ -1116,15 +1258,16 @@ class Always < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Always} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @see OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter#never @@ -1145,15 +1288,16 @@ class Never < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter::Never} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end end @@ -1220,17 +1364,19 @@ class TracingConfiguration < OpenAI::Internal::Type::BaseModel optional :workflow_name, String # @!method initialize(group_id: nil, metadata: nil, workflow_name: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tracing::TracingConfiguration} - # for more details. - # # Granular configuration for tracing. # - # @param group_id [String] The group id to attach to this trace to enable filtering and + # @param group_id [String] + # The group id to attach to this trace to enable filtering and grouping in the + # Traces Dashboard. # - # @param metadata [Object] The arbitrary metadata to attach to this trace to enable + # @param metadata [Object] + # The arbitrary metadata to attach to this trace to enable filtering in the Traces + # Dashboard. # - # @param workflow_name [String] The name of the workflow to attach to this trace. This is used to + # @param workflow_name [String] + # The name of the workflow to attach to this trace. This is used to name the trace + # in the Traces Dashboard. end # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_tools_config_union.rb b/lib/openai/models/realtime/realtime_tools_config_union.rb index 70f500154..0d3c85346 100644 --- a/lib/openai/models/realtime/realtime_tools_config_union.rb +++ b/lib/openai/models/realtime/realtime_tools_config_union.rb @@ -5,7 +5,7 @@ module Models module Realtime # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module RealtimeToolsConfigUnion extend OpenAI::Internal::Type::Union @@ -14,7 +14,7 @@ module RealtimeToolsConfigUnion variant :function, -> { OpenAI::Realtime::RealtimeFunctionTool } # Give the model access to additional tools via remote Model Context Protocol - # (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). variant :mcp, -> { OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp } class Mcp < OpenAI::Internal::Type::BaseModel @@ -64,7 +64,7 @@ class Mcp < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -124,37 +124,64 @@ class Mcp < OpenAI::Internal::Type::BaseModel optional :tunnel_id, String # @!method initialize(server_label:, allowed_callers: nil, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp} for more details. - # # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - # @param server_label [String] A label for this MCP server, used to identify it in tool calls. + # @param server_label [String] + # A label for this MCP server, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object. + # @param allowed_tools [Array, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::AllowedTools::McpToolFilter, nil] + # List of allowed tool names or a filter object. # - # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either + # @param authorization [String] + # An OAuth access token that can be used with a remote MCP server, either with a + # custom MCP server URL or a service connector. Your application must handle the + # OAuth authorization flow and provide the token here. # - # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of + # @param connector_id [Symbol, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::ConnectorID] + # Identifier for service connectors, like those available in ChatGPT. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about + # service connectors + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # - # @param defer_loading [Boolean] Whether this MCP tool is deferred and discovered via tool search. + # Currently supported `connector_id` values are: # - # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication + # - Dropbox: `connector_dropbox` + # - Gmail: `connector_gmail` + # - Google Calendar: `connector_googlecalendar` + # - Google Drive: `connector_googledrive` + # - Microsoft Teams: `connector_microsoftteams` + # - Outlook Calendar: `connector_outlookcalendar` + # - Outlook Email: `connector_outlookemail` + # - SharePoint: `connector_sharepoint` # - # @param require_approval [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval. + # @param defer_loading [Boolean] + # Whether this MCP tool is deferred and discovered via tool search. # - # @param server_description [String] Optional description of the MCP server, used to provide more context. + # @param headers [Hash{Symbol=>String}, nil] + # Optional HTTP headers to send to the MCP server. Use for authentication or other + # purposes. # - # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or + # @param require_approval [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalSetting, nil] + # Specify which of the MCP server's tools require approval. # - # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # @param server_description [String] + # Optional description of the MCP server, used to provide more context. # - # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`. - + # @param server_url [String] + # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` + # must be provided. + # + # @param tunnel_id [String] + # The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. + # + # @param type [Symbol, :mcp] + # The type of the MCP tool. Always `mcp`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -194,15 +221,16 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::AllowedTools::McpToolFilter} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @!method self.variants @@ -215,7 +243,7 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -283,16 +311,14 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(always: nil, never: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter} - # for more details. - # # Specify which of the MCP server's tools require approval. Can be `always`, # `never`, or a filter object associated with tools that require approval. # - # @param always [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed. + # @param always [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Always] + # A filter object to specify which tools are allowed. # - # @param never [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed. + # @param never [OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Never] + # A filter object to specify which tools are allowed. # @see OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter#always class Always < OpenAI::Internal::Type::BaseModel @@ -312,15 +338,16 @@ class Always < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Always} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @see OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter#never @@ -341,15 +368,16 @@ class Never < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter::Never} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end end diff --git a/lib/openai/models/realtime/realtime_tracing_config.rb b/lib/openai/models/realtime/realtime_tracing_config.rb index e3bab4dfb..b4cb24294 100644 --- a/lib/openai/models/realtime/realtime_tracing_config.rb +++ b/lib/openai/models/realtime/realtime_tracing_config.rb @@ -42,17 +42,19 @@ class TracingConfiguration < OpenAI::Internal::Type::BaseModel optional :workflow_name, String # @!method initialize(group_id: nil, metadata: nil, workflow_name: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration} for more - # details. - # # Granular configuration for tracing. # - # @param group_id [String] The group id to attach to this trace to enable filtering and + # @param group_id [String] + # The group id to attach to this trace to enable filtering and grouping in the + # Traces Dashboard. # - # @param metadata [Object] The arbitrary metadata to attach to this trace to enable + # @param metadata [Object] + # The arbitrary metadata to attach to this trace to enable filtering in the Traces + # Dashboard. # - # @param workflow_name [String] The name of the workflow to attach to this trace. This is used to + # @param workflow_name [String] + # The name of the workflow to attach to this trace. This is used to name the trace + # in the Traces Dashboard. end # @!method self.variants diff --git a/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb b/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb index a0e9033fd..b9917de01 100644 --- a/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +++ b/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb @@ -25,7 +25,7 @@ class RealtimeTranscriptionSessionAudioInput < OpenAI::Internal::Type::BaseModel # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -59,17 +59,43 @@ class RealtimeTranscriptionSessionAudioInput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil, noise_reduction: nil, transcription: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInput} for more - # details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The PCM audio format. Only a 24kHz sample rate is supported. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The PCM audio format. Only a 24kHz sample rate is supported. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInput::NoiseReduction] + # Configuration for input audio noise reduction. This can be set to `null` to turn + # off. Noise reduction filters audio added to the input audio buffer before it is + # sent to VAD and the model. Filtering the audio can improve VAD and turn + # detection accuracy (reducing false positives) and model performance by improving + # perception of the input audio. # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInput::NoiseReduction] Configuration for input audio noise reduction. This can be set to `null` to turn + # @param transcription [OpenAI::Models::Realtime::AudioTranscription] + # Configuration for input audio transcription, defaults to off and can be set to + # `null` to turn off once on. Input audio transcription is not native to the + # model, since the model consumes audio directly. Transcription runs + # asynchronously through + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) + # and should be treated as guidance of input audio content rather than precisely + # what the model heard. The client can optionally set the language and prompt for + # transcription, these offer additional guidance to the transcription service. # - # @param transcription [OpenAI::Models::Realtime::AudioTranscription] Configuration for input audio transcription, defaults to off and can be set to ` + # @param turn_detection [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad, nil] + # Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # set to `null` to turn off, in which case the client must manually trigger model + # response. # - # @param turn_detection [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::ServerVad, OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad, nil] Configuration for turn detection, ether Server VAD or Semantic VAD. This can be + # Server VAD means that the model will detect the start and end of speech based on + # audio volume and respond at the end of user speech. + # + # Semantic VAD is more advanced and uses a turn detection model (in conjunction + # with VAD) to semantically estimate whether the user has finished speaking, then + # dynamically sets a timeout based on this probability. For example, if user audio + # trails off with "uhhm", the model will score a low probability of turn end and + # wait longer for the user to continue speaking. This can be useful for more + # natural conversations, but may have a higher latency. + # + # For `gpt-realtime-whisper` transcription sessions, turn detection must be set to + # `null`; VAD is not supported. # @see OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInput#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -82,17 +108,16 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInput::NoiseReduction} - # for more details. - # # Configuration for input audio noise reduction. This can be set to `null` to turn # off. Noise reduction filters audio added to the input audio buffer before it is # sent to VAD and the model. Filtering the audio can improve VAD and turn # detection accuracy (reducing false positives) and model performance by improving # perception of the input audio. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end end end diff --git a/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb b/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb index 5f721a302..c93cad49b 100644 --- a/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +++ b/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb @@ -107,26 +107,56 @@ class ServerVad < OpenAI::Internal::Type::BaseModel optional :threshold, Float # @!method initialize(create_response: nil, idle_timeout_ms: nil, interrupt_response: nil, prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: :server_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::ServerVad} - # for more details. - # # Server-side voice activity detection (VAD) which flips on when user speech is # detected and off after a period of silence. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs - # - # @param idle_timeout_ms [Integer, nil] Optional timeout after which a model response will be triggered automatically. T - # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt (cancel) any ongoing response with out - # - # @param prefix_padding_ms [Integer] Used only for `server_vad` mode. Amount of audio to include before the VAD detec - # - # @param silence_duration_ms [Integer] Used only for `server_vad` mode. Duration of silence to detect speech stop (in m - # - # @param threshold [Float] Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this - # - # @param type [Symbol, :server_vad] Type of turn detection, `server_vad` to turn on simple Server VAD. + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. If `interrupt_response` is set to `false` this may fail to create a + # response if the model is already responding. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param idle_timeout_ms [Integer, nil] + # Optional timeout after which a model response will be triggered automatically. + # This is useful for situations in which a long pause from the user is unexpected, + # such as a phone call. The model will effectively prompt the user to continue the + # conversation based on the current context. + # + # The timeout value will be applied after the last model response's audio has + # finished playing, i.e. it's set to the `response.done` time plus audio playback + # duration. + # + # An `input_audio_buffer.timeout_triggered` event (plus events associated with the + # Response) will be emitted when the timeout is reached. Idle timeout is currently + # only supported for `server_vad` mode. + # + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt (cancel) any ongoing response with + # output to the default conversation (i.e. `conversation` of `auto`) when a VAD + # start event occurs. If `true` then the response will be cancelled, otherwise it + # will continue until complete. + # + # If both `create_response` and `interrupt_response` are set to `false`, the model + # will never respond automatically but VAD events will still be emitted. + # + # @param prefix_padding_ms [Integer] + # Used only for `server_vad` mode. Amount of audio to include before the VAD + # detected speech (in milliseconds). Defaults to 300ms. + # + # @param silence_duration_ms [Integer] + # Used only for `server_vad` mode. Duration of silence to detect speech stop (in + # milliseconds). Defaults to 500ms. With shorter values the model will respond + # more quickly, but may jump in on short pauses from the user. + # + # @param threshold [Float] + # Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this + # defaults to 0.5. A higher threshold will require louder audio to activate the + # model, and thus might perform better in noisy environments. + # + # @param type [Symbol, :server_vad] + # Type of turn detection, `server_vad` to turn on simple Server VAD. end class SemanticVad < OpenAI::Internal::Type::BaseModel @@ -164,20 +194,26 @@ class SemanticVad < OpenAI::Internal::Type::BaseModel optional :interrupt_response, OpenAI::Internal::Type::Boolean # @!method initialize(create_response: nil, eagerness: nil, interrupt_response: nil, type: :semantic_vad) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad} - # for more details. - # # Server-side semantic turn detection which uses a model to determine when the # user has finished speaking. # - # @param create_response [Boolean] Whether or not to automatically generate a response when a VAD stop event occurs + # @param create_response [Boolean] + # Whether or not to automatically generate a response when a VAD stop event + # occurs. # - # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::Eagerness] Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # @param eagerness [Symbol, OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::Eagerness] + # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` + # will wait longer for the user to continue speaking, `high` will respond more + # quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, + # and `high` have max timeouts of 8s, 4s, and 2s respectively. # - # @param interrupt_response [Boolean] Whether or not to automatically interrupt any ongoing response with output to th + # @param interrupt_response [Boolean] + # Whether or not to automatically interrupt any ongoing response with output to + # the default conversation (i.e. `conversation` of `auto`) when a VAD start event + # occurs. # - # @param type [Symbol, :semantic_vad] Type of turn detection, `semantic_vad` to turn on Semantic VAD. + # @param type [Symbol, :semantic_vad] + # Type of turn detection, `semantic_vad` to turn on Semantic VAD. # Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` # will wait longer for the user to continue speaking, `high` will respond more diff --git a/lib/openai/models/realtime/realtime_transcription_session_create_request.rb b/lib/openai/models/realtime/realtime_transcription_session_create_request.rb index 93c62595d..a9522aa15 100644 --- a/lib/openai/models/realtime/realtime_transcription_session_create_request.rb +++ b/lib/openai/models/realtime/realtime_transcription_session_create_request.rb @@ -32,18 +32,20 @@ class RealtimeTranscriptionSessionCreateRequest < OpenAI::Internal::Type::BaseMo ) # @!method initialize(audio: nil, include: nil, type: :transcription) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest} for more - # details. - # # Realtime transcription session object configuration. # - # @param audio [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudio] Configuration for input and output audio. + # @param audio [OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudio] + # Configuration for input and output audio. # - # @param include [Array] Additional fields to include in server outputs. + # @param include [Array] + # Additional fields to include in server outputs. # - # @param type [Symbol, :transcription] The type of session to create. Always `transcription` for transcription sessions - + # `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param type [Symbol, :transcription] + # The type of session to create. Always `transcription` for transcription + # sessions. module Include extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/realtime/realtime_transcription_session_create_response.rb b/lib/openai/models/realtime/realtime_transcription_session_create_response.rb index 05f2c8061..fbe15edee 100644 --- a/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +++ b/lib/openai/models/realtime/realtime_transcription_session_create_response.rb @@ -49,23 +49,28 @@ class RealtimeTranscriptionSessionCreateResponse < OpenAI::Internal::Type::BaseM ) # @!method initialize(id:, object:, audio: nil, expires_at: nil, include: nil, type: :transcription) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse} for more - # details. - # # A Realtime transcription session configuration object. # - # @param id [String] Unique identifier for the session that looks like `sess_1234567890abcdef`. + # @param id [String] + # Unique identifier for the session that looks like `sess_1234567890abcdef`. + # + # @param object [String] + # The object type. Always `realtime.transcription_session`. # - # @param object [String] The object type. Always `realtime.transcription_session`. + # @param audio [OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio] + # Configuration for input audio for the session. # - # @param audio [OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio] Configuration for input audio for the session. + # @param expires_at [Integer] + # Expiration timestamp for the session, in seconds since epoch. # - # @param expires_at [Integer] Expiration timestamp for the session, in seconds since epoch. + # @param include [Array] + # Additional fields to include in server outputs. # - # @param include [Array] Additional fields to include in server outputs. + # - `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. # - # @param type [Symbol, :transcription] The type of session. Always `transcription` for transcription sessions. + # @param type [Symbol, :transcription] + # The type of session. Always `transcription` for transcription sessions. # @see OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -117,17 +122,19 @@ class Input < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil, noise_reduction: nil, transcription: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio::Input} - # for more details. + # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] + # The PCM audio format. Only a 24kHz sample rate is supported. # - # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The PCM audio format. Only a 24kHz sample rate is supported. - # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio::Input::NoiseReduction] Configuration for input audio noise reduction. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio::Input::NoiseReduction] + # Configuration for input audio noise reduction. # # @param transcription [OpenAI::Models::Realtime::AudioTranscription] # - # @param turn_detection [OpenAI::Models::Realtime::RealtimeTranscriptionSessionTurnDetection, nil] Configuration for turn detection. Can be set to `null` to turn off. Server + # @param turn_detection [OpenAI::Models::Realtime::RealtimeTranscriptionSessionTurnDetection, nil] + # Configuration for turn detection. Can be set to `null` to turn off. Server VAD + # means that the model will detect the start and end of speech based on audio + # volume and respond at the end of user speech. For `gpt-realtime-whisper`, this + # must be `null`; VAD is not supported. # @see OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio::Input#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -140,13 +147,12 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateResponse::Audio::Input::NoiseReduction} - # for more details. - # # Configuration for input audio noise reduction. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end end end diff --git a/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb b/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb index 2dd54610b..01216abca 100644 --- a/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +++ b/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb @@ -34,22 +34,27 @@ class RealtimeTranscriptionSessionTurnDetection < OpenAI::Internal::Type::BaseMo optional :type, String # @!method initialize(prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranscriptionSessionTurnDetection} for more - # details. - # # Configuration for turn detection. Can be set to `null` to turn off. Server VAD # means that the model will detect the start and end of speech based on audio # volume and respond at the end of user speech. For `gpt-realtime-whisper`, this # must be `null`; VAD is not supported. # - # @param prefix_padding_ms [Integer] Amount of audio to include before the VAD detected speech (in + # @param prefix_padding_ms [Integer] + # Amount of audio to include before the VAD detected speech (in milliseconds). + # Defaults to 300ms. # - # @param silence_duration_ms [Integer] Duration of silence to detect speech stop (in milliseconds). Defaults + # @param silence_duration_ms [Integer] + # Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. + # With shorter values the model will respond more quickly, but may jump in on + # short pauses from the user. # - # @param threshold [Float] Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A + # @param threshold [Float] + # Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher + # threshold will require louder audio to activate the model, and thus might + # perform better in noisy environments. # - # @param type [String] Type of turn detection, only `server_vad` is currently supported. + # @param type [String] + # Type of turn detection, only `server_vad` is currently supported. end end diff --git a/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb b/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb index 7aa8007b3..9ebde065f 100644 --- a/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb +++ b/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb @@ -24,15 +24,17 @@ class RealtimeTranslationClientSecretCreateRequest < OpenAI::Internal::Type::Bas ) # @!method initialize(session:, expires_after: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest} for - # more details. - # # Create a translation session and client secret for the Realtime API. # - # @param session [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest] Realtime translation session configuration. Translation sessions stream source + # @param session [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest] + # Realtime translation session configuration. Translation sessions stream source + # audio in and translated audio plus transcript deltas out continuously. # - # @param expires_after [OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter] Configuration for the client secret expiration. Expiration refers to the time af + # @param expires_after [OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter] + # Configuration for the client secret expiration. Expiration refers to the time + # after which a client secret will no longer be valid for creating sessions. The + # session itself may continue after that time once started. A secret can be used + # to create multiple sessions until it expires. # @see OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest#expires_after class ExpiresAfter < OpenAI::Internal::Type::BaseModel @@ -56,18 +58,20 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel optional :seconds, Integer # @!method initialize(anchor: nil, seconds: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter} - # for more details. - # # Configuration for the client secret expiration. Expiration refers to the time # after which a client secret will no longer be valid for creating sessions. The # session itself may continue after that time once started. A secret can be used # to create multiple sessions until it expires. # - # @param anchor [Symbol, OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter::Anchor] The anchor point for the client secret expiration, meaning that `seconds` will b + # @param anchor [Symbol, OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter::Anchor] + # The anchor point for the client secret expiration, meaning that `seconds` will + # be added to the `created_at` time of the client secret to produce an expiration + # timestamp. Only `created_at` is currently supported. # - # @param seconds [Integer] The number of seconds from the anchor point to the expiration. Select a value be + # @param seconds [Integer] + # The number of seconds from the anchor point to the expiration. Select a value + # between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if + # not specified. # The anchor point for the client secret expiration, meaning that `seconds` will # be added to the `created_at` time of the client secret to produce an expiration diff --git a/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb b/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb index 64223f788..5d2d86de6 100644 --- a/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb +++ b/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb @@ -24,18 +24,18 @@ class RealtimeTranslationClientSecretCreateResponse < OpenAI::Internal::Type::Ba required :value, String # @!method initialize(expires_at:, session:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateResponse} for - # more details. - # # Response from creating a translation session and client secret for the Realtime # API. # - # @param expires_at [Integer] Expiration timestamp for the client secret, in seconds since epoch. + # @param expires_at [Integer] + # Expiration timestamp for the client secret, in seconds since epoch. # - # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] A Realtime translation session. Translation sessions continuously translate inpu + # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] + # A Realtime translation session. Translation sessions continuously translate + # input audio into the configured output language. # - # @param value [String] The generated client secret value. + # @param value [String] + # The generated client secret value. end end end diff --git a/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb b/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb index 7cd7d3fb1..f5741adee 100644 --- a/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb +++ b/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb @@ -40,11 +40,14 @@ class RealtimeTranslationInputAudioBufferAppendEvent < OpenAI::Internal::Type::B # audio and later resumes, model time treats the resumed audio as contiguous with # the previous audio rather than as a real-world pause. # - # @param audio [String] Base64-encoded 24 kHz PCM16 mono audio bytes. + # @param audio [String] + # Base64-encoded 24 kHz PCM16 mono audio bytes. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"session.input_audio_buffer.append"] The event type, must be `session.input_audio_buffer.append`. + # @param type [Symbol, :"session.input_audio_buffer.append"] + # The event type, must be `session.input_audio_buffer.append`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb b/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb index d005e56d3..c5bd42b2b 100644 --- a/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb +++ b/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb @@ -32,23 +32,26 @@ class RealtimeTranslationInputTranscriptDeltaEvent < OpenAI::Internal::Type::Bas optional :elapsed_ms, Integer, nil?: true # @!method initialize(delta:, event_id:, elapsed_ms: nil, type: :"session.input_transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationInputTranscriptDeltaEvent} for - # more details. - # # Returned when optional source-language transcript text is available. This event # is emitted only when `audio.input.transcription` is configured. # # Transcript deltas are append-only text fragments. Clients should not insert # unconditional spaces between deltas. # - # @param delta [String] Append-only source-language transcript text. + # @param delta [String] + # Append-only source-language transcript text. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param elapsed_ms [Integer, nil] Timing metadata for stream alignment, derived from the translation frame + # @param elapsed_ms [Integer, nil] + # Timing metadata for stream alignment, derived from the translation frame when + # available. It advances in 200 ms increments, but multiple transcript deltas may + # share the same `elapsed_ms`. Treat it as alignment metadata, not a unique + # transcript-delta identifier. # - # @param type [Symbol, :"session.input_transcript.delta"] The event type, must be `session.input_transcript.delta`. + # @param type [Symbol, :"session.input_transcript.delta"] + # The event type, must be `session.input_transcript.delta`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb b/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb index dbc63dfa6..fd43fe033 100644 --- a/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb +++ b/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb @@ -53,27 +53,32 @@ class RealtimeTranslationOutputAudioDeltaEvent < OpenAI::Internal::Type::BaseMod optional :sample_rate, Integer # @!method initialize(delta:, event_id:, channels: nil, elapsed_ms: nil, format_: nil, sample_rate: nil, type: :"session.output_audio.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent} for more - # details. - # # Returned when translated output audio is available. The `delta` contains a PCM16 # audio chunk whose length can vary. Clients should decode and queue the complete # delta instead of assuming a fixed byte or sample count. # - # @param delta [String] Base64-encoded translated audio data. + # @param delta [String] + # Base64-encoded translated audio data. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param channels [Integer] Number of audio channels. + # @param channels [Integer] + # Number of audio channels. # - # @param elapsed_ms [Integer, nil] Timing metadata for stream alignment, derived from the translation frame + # @param elapsed_ms [Integer, nil] + # Timing metadata for stream alignment, derived from the translation frame when + # available. Treat `elapsed_ms` as alignment metadata, not a unique event + # identifier. # - # @param format_ [Symbol, OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::Format] Audio encoding for `delta`. + # @param format_ [Symbol, OpenAI::Models::Realtime::RealtimeTranslationOutputAudioDeltaEvent::Format] + # Audio encoding for `delta`. # - # @param sample_rate [Integer] Sample rate of the audio delta. + # @param sample_rate [Integer] + # Sample rate of the audio delta. # - # @param type [Symbol, :"session.output_audio.delta"] The event type, must be `session.output_audio.delta`. + # @param type [Symbol, :"session.output_audio.delta"] + # The event type, must be `session.output_audio.delta`. # Audio encoding for `delta`. # diff --git a/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb b/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb index ad26de0d8..5ca2f5b7f 100644 --- a/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb +++ b/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb @@ -32,22 +32,25 @@ class RealtimeTranslationOutputTranscriptDeltaEvent < OpenAI::Internal::Type::Ba optional :elapsed_ms, Integer, nil?: true # @!method initialize(delta:, event_id:, elapsed_ms: nil, type: :"session.output_transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationOutputTranscriptDeltaEvent} for - # more details. - # # Returned when translated transcript text is available. # # Transcript deltas are append-only text fragments. Clients should not insert # unconditional spaces between deltas. # - # @param delta [String] Append-only transcript text for the translated output audio. + # @param delta [String] + # Append-only transcript text for the translated output audio. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param elapsed_ms [Integer, nil] Timing metadata for stream alignment, derived from the translation frame + # @param elapsed_ms [Integer, nil] + # Timing metadata for stream alignment, derived from the translation frame when + # available. It advances in 200 ms increments, but multiple transcript deltas may + # share the same `elapsed_ms`. Treat it as alignment metadata, not a unique + # transcript-delta identifier. # - # @param type [Symbol, :"session.output_transcript.delta"] The event type, must be `session.output_transcript.delta`. + # @param type [Symbol, :"session.output_transcript.delta"] + # The event type, must be `session.output_transcript.delta`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session.rb b/lib/openai/models/realtime/realtime_translation_session.rb index 4cbfca15a..3e4126721 100644 --- a/lib/openai/models/realtime/realtime_translation_session.rb +++ b/lib/openai/models/realtime/realtime_translation_session.rb @@ -36,21 +36,24 @@ class RealtimeTranslationSession < OpenAI::Internal::Type::BaseModel required :type, const: :translation # @!method initialize(id:, audio:, expires_at:, model:, type: :translation) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSession} for more details. - # # A Realtime translation session. Translation sessions continuously translate # input audio into the configured output language. # - # @param id [String] Unique identifier for the session that looks like `sess_1234567890abcdef`. + # @param id [String] + # Unique identifier for the session that looks like `sess_1234567890abcdef`. # - # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio] Configuration for translation input and output audio. + # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio] + # Configuration for translation input and output audio. # - # @param expires_at [Integer] Expiration timestamp for the session, in seconds since epoch. + # @param expires_at [Integer] + # Expiration timestamp for the session, in seconds since epoch. # - # @param model [String] The Realtime translation model used for this session. This field is set at + # @param model [String] + # The Realtime translation model used for this session. This field is set at + # session creation and cannot be changed with `session.update`. # - # @param type [Symbol, :translation] The session type. Always `translation` for Realtime translation sessions. + # @param type [Symbol, :translation] + # The session type. Always `translation` for Realtime translation sessions. # @see OpenAI::Models::Realtime::RealtimeTranslationSession#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -95,13 +98,13 @@ class Input < OpenAI::Internal::Type::BaseModel ) # @!method initialize(noise_reduction: nil, transcription: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input} for more - # details. - # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction, nil] Optional input noise reduction. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction, nil] + # Optional input noise reduction. # - # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits + # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::Transcription, nil] + # Optional source-language transcription. When configured, the server emits + # `session.input_transcript.delta` events. Translation itself still runs from the + # input audio stream. # @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -114,13 +117,12 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction} - # for more details. - # # Optional input noise reduction. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input#transcription @@ -136,7 +138,8 @@ class Transcription < OpenAI::Internal::Type::BaseModel # `session.input_transcript.delta` events. Translation itself still runs from the # input audio stream. # - # @param model [String] The transcription model used for source transcript deltas. + # @param model [String] + # The transcription model used for source transcript deltas. end end @@ -149,11 +152,8 @@ class Output < OpenAI::Internal::Type::BaseModel optional :language, String # @!method initialize(language: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Output} for more - # details. - # - # @param language [String] Target language for translated output audio and transcript deltas. + # @param language [String] + # Target language for translated output audio and transcript deltas. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_close_event.rb b/lib/openai/models/realtime/realtime_translation_session_close_event.rb index d73347bf2..84340e8be 100644 --- a/lib/openai/models/realtime/realtime_translation_session_close_event.rb +++ b/lib/openai/models/realtime/realtime_translation_session_close_event.rb @@ -21,9 +21,11 @@ class RealtimeTranslationSessionCloseEvent < OpenAI::Internal::Type::BaseModel # input audio and emits any remaining translated output before closing the # session. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"session.close"] The event type, must be `session.close`. + # @param type [Symbol, :"session.close"] + # The event type, must be `session.close`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_closed_event.rb b/lib/openai/models/realtime/realtime_translation_session_closed_event.rb index 9061cf851..24c2cf413 100644 --- a/lib/openai/models/realtime/realtime_translation_session_closed_event.rb +++ b/lib/openai/models/realtime/realtime_translation_session_closed_event.rb @@ -19,9 +19,11 @@ class RealtimeTranslationSessionClosedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, type: :"session.closed") # Returned when a realtime translation session is closed. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param type [Symbol, :"session.closed"] The event type, must be `session.closed`. + # @param type [Symbol, :"session.closed"] + # The event type, must be `session.closed`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_create_request.rb b/lib/openai/models/realtime/realtime_translation_session_create_request.rb index 496fe396f..335f89a0b 100644 --- a/lib/openai/models/realtime/realtime_translation_session_create_request.rb +++ b/lib/openai/models/realtime/realtime_translation_session_create_request.rb @@ -17,16 +17,14 @@ class RealtimeTranslationSessionCreateRequest < OpenAI::Internal::Type::BaseMode optional :audio, -> { OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio } # @!method initialize(model:, audio: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest} for more - # details. - # # Realtime translation session configuration. Translation sessions stream source # audio in and translated audio plus transcript deltas out continuously. # - # @param model [String] The Realtime translation model used for this session. + # @param model [String] + # The Realtime translation model used for this session. # - # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio] Configuration for translation input and output audio. + # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio] + # Configuration for translation input and output audio. # @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -75,13 +73,13 @@ class Input < OpenAI::Internal::Type::BaseModel ) # @!method initialize(noise_reduction: nil, transcription: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input} - # for more details. - # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction, nil] Optional input noise reduction. Set to `null` to disable it. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction, nil] + # Optional input noise reduction. Set to `null` to disable it. # - # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits + # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::Transcription, nil] + # Optional source-language transcription. When configured, the server emits + # `session.input_transcript.delta` events. Translation itself still runs from the + # input audio stream. # @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -94,13 +92,12 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction} - # for more details. - # # Optional input noise reduction. Set to `null` to disable it. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input#transcription @@ -116,7 +113,8 @@ class Transcription < OpenAI::Internal::Type::BaseModel # `session.input_transcript.delta` events. Translation itself still runs from the # input audio stream. # - # @param model [String] The transcription model to use for source transcript deltas. + # @param model [String] + # The transcription model to use for source transcript deltas. end end @@ -129,11 +127,8 @@ class Output < OpenAI::Internal::Type::BaseModel optional :language, String # @!method initialize(language: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Output} - # for more details. - # - # @param language [String] Target language for translated output audio and transcript deltas. + # @param language [String] + # Target language for translated output audio and transcript deltas. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_created_event.rb b/lib/openai/models/realtime/realtime_translation_session_created_event.rb index f6b3b6935..823f3efef 100644 --- a/lib/openai/models/realtime/realtime_translation_session_created_event.rb +++ b/lib/openai/models/realtime/realtime_translation_session_created_event.rb @@ -27,11 +27,14 @@ class RealtimeTranslationSessionCreatedEvent < OpenAI::Internal::Type::BaseModel # connection is established as the first server event. This event contains the # default translation session configuration. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] The translation session configuration. + # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] + # The translation session configuration. # - # @param type [Symbol, :"session.created"] The event type, must be `session.created`. + # @param type [Symbol, :"session.created"] + # The event type, must be `session.created`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_update_event.rb b/lib/openai/models/realtime/realtime_translation_session_update_event.rb index 0ca5525b0..02932fbee 100644 --- a/lib/openai/models/realtime/realtime_translation_session_update_event.rb +++ b/lib/openai/models/realtime/realtime_translation_session_update_event.rb @@ -24,19 +24,19 @@ class RealtimeTranslationSessionUpdateEvent < OpenAI::Internal::Type::BaseModel optional :event_id, String # @!method initialize(session:, event_id: nil, type: :"session.update") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateEvent} for more - # details. - # # Send this event to update the translation session configuration. Translation # sessions support updates to `audio.output.language`, # `audio.input.transcription`, and `audio.input.noise_reduction`. # - # @param session [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest] Translation session fields to update. The session `type` and `model` are set + # @param session [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest] + # Translation session fields to update. The session `type` and `model` are set at + # creation and cannot be changed with `session.update`. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"session.update"] The event type, must be `session.update`. + # @param type [Symbol, :"session.update"] + # The event type, must be `session.update`. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_update_request.rb b/lib/openai/models/realtime/realtime_translation_session_update_request.rb index f8abcc819..7f414a9ff 100644 --- a/lib/openai/models/realtime/realtime_translation_session_update_request.rb +++ b/lib/openai/models/realtime/realtime_translation_session_update_request.rb @@ -11,13 +11,10 @@ class RealtimeTranslationSessionUpdateRequest < OpenAI::Internal::Type::BaseMode optional :audio, -> { OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio } # @!method initialize(audio: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest} for more - # details. - # # Realtime translation session fields that can be updated with `session.update`. # - # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio] Configuration for translation input and output audio. + # @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio] + # Configuration for translation input and output audio. # @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest#audio class Audio < OpenAI::Internal::Type::BaseModel @@ -66,13 +63,13 @@ class Input < OpenAI::Internal::Type::BaseModel ) # @!method initialize(noise_reduction: nil, transcription: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input} - # for more details. - # - # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction, nil] Optional input noise reduction. Set to `null` to disable it. + # @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction, nil] + # Optional input noise reduction. Set to `null` to disable it. # - # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits + # @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::Transcription, nil] + # Optional source-language transcription. When configured, the server emits + # `session.input_transcript.delta` events. Translation itself still runs from the + # input audio stream. # @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input#noise_reduction class NoiseReduction < OpenAI::Internal::Type::BaseModel @@ -85,13 +82,12 @@ class NoiseReduction < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction} - # for more details. - # # Optional input noise reduction. Set to `null` to disable it. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input#transcription @@ -107,7 +103,8 @@ class Transcription < OpenAI::Internal::Type::BaseModel # `session.input_transcript.delta` events. Translation itself still runs from the # input audio stream. # - # @param model [String] The transcription model to use for source transcript deltas. + # @param model [String] + # The transcription model to use for source transcript deltas. end end @@ -120,11 +117,8 @@ class Output < OpenAI::Internal::Type::BaseModel optional :language, String # @!method initialize(language: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Output} - # for more details. - # - # @param language [String] Target language for translated output audio and transcript deltas. + # @param language [String] + # Target language for translated output audio and transcript deltas. end end end diff --git a/lib/openai/models/realtime/realtime_translation_session_updated_event.rb b/lib/openai/models/realtime/realtime_translation_session_updated_event.rb index 2b26248ae..53f825b41 100644 --- a/lib/openai/models/realtime/realtime_translation_session_updated_event.rb +++ b/lib/openai/models/realtime/realtime_translation_session_updated_event.rb @@ -26,11 +26,14 @@ class RealtimeTranslationSessionUpdatedEvent < OpenAI::Internal::Type::BaseModel # Returned when a translation session is updated with a `session.update` event, # unless there is an error. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] The translation session configuration. + # @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] + # The translation session configuration. # - # @param type [Symbol, :"session.updated"] The event type, must be `session.updated`. + # @param type [Symbol, :"session.updated"] + # The event type, must be `session.updated`. end end end diff --git a/lib/openai/models/realtime/realtime_truncation_retention_ratio.rb b/lib/openai/models/realtime/realtime_truncation_retention_ratio.rb index 86bf54999..cfa947154 100644 --- a/lib/openai/models/realtime/realtime_truncation_retention_ratio.rb +++ b/lib/openai/models/realtime/realtime_truncation_retention_ratio.rb @@ -27,18 +27,22 @@ class RealtimeTruncationRetentionRatio < OpenAI::Internal::Type::BaseModel optional :token_limits, -> { OpenAI::Realtime::RealtimeTruncationRetentionRatio::TokenLimits } # @!method initialize(retention_ratio:, token_limits: nil, type: :retention_ratio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio} for more details. - # # Retain a fraction of the conversation tokens when the conversation exceeds the # input token limit. This allows you to amortize truncations across multiple # turns, which can help improve cached token usage. # - # @param retention_ratio [Float] Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when + # @param retention_ratio [Float] + # Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when + # the conversation exceeds the input token limit. Setting this to `0.8` means that + # messages will be dropped until 80% of the maximum allowed tokens are used. This + # helps reduce the frequency of truncations and improve cache rates. # - # @param token_limits [OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio::TokenLimits] Optional custom token limits for this truncation strategy. If not provided, the + # @param token_limits [OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio::TokenLimits] + # Optional custom token limits for this truncation strategy. If not provided, the + # model's default token limits will be used. # - # @param type [Symbol, :retention_ratio] Use retention ratio truncation. + # @param type [Symbol, :retention_ratio] + # Use retention ratio truncation. # @see OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio#token_limits class TokenLimits < OpenAI::Internal::Type::BaseModel @@ -53,14 +57,15 @@ class TokenLimits < OpenAI::Internal::Type::BaseModel optional :post_instructions, Integer # @!method initialize(post_instructions: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio::TokenLimits} for - # more details. - # # Optional custom token limits for this truncation strategy. If not provided, the # model's default token limits will be used. # - # @param post_instructions [Integer] Maximum tokens allowed in the conversation after instructions (which including t + # @param post_instructions [Integer] + # Maximum tokens allowed in the conversation after instructions (which including + # tool definitions). For example, setting this to 5,000 would mean that truncation + # would occur when the conversation exceeds 5,000 tokens after instructions. This + # cannot be higher than the model's context window size minus the maximum output + # tokens. end end end diff --git a/lib/openai/models/realtime/response_audio_delta_event.rb b/lib/openai/models/realtime/response_audio_delta_event.rb index a22a49cdc..4d77d6154 100644 --- a/lib/openai/models/realtime/response_audio_delta_event.rb +++ b/lib/openai/models/realtime/response_audio_delta_event.rb @@ -49,19 +49,26 @@ class ResponseAudioDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(content_index:, delta:, event_id:, item_id:, output_index:, response_id:, type: :"response.output_audio.delta") # Returned when the model-generated audio is updated. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param delta [String] Base64-encoded audio data delta. + # @param delta [String] + # Base64-encoded audio data delta. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.output_audio.delta"] The event type, must be `response.output_audio.delta`. + # @param type [Symbol, :"response.output_audio.delta"] + # The event type, must be `response.output_audio.delta`. end end end diff --git a/lib/openai/models/realtime/response_audio_done_event.rb b/lib/openai/models/realtime/response_audio_done_event.rb index c00c43aab..8e533ab2c 100644 --- a/lib/openai/models/realtime/response_audio_done_event.rb +++ b/lib/openai/models/realtime/response_audio_done_event.rb @@ -44,17 +44,23 @@ class ResponseAudioDoneEvent < OpenAI::Internal::Type::BaseModel # Returned when the model-generated audio is done. Also emitted when a Response is # interrupted, incomplete, or cancelled. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.output_audio.done"] The event type, must be `response.output_audio.done`. + # @param type [Symbol, :"response.output_audio.done"] + # The event type, must be `response.output_audio.done`. end end end diff --git a/lib/openai/models/realtime/response_audio_transcript_delta_event.rb b/lib/openai/models/realtime/response_audio_transcript_delta_event.rb index 1e992dca9..7bae78b50 100644 --- a/lib/openai/models/realtime/response_audio_transcript_delta_event.rb +++ b/lib/openai/models/realtime/response_audio_transcript_delta_event.rb @@ -49,19 +49,26 @@ class ResponseAudioTranscriptDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(content_index:, delta:, event_id:, item_id:, output_index:, response_id:, type: :"response.output_audio_transcript.delta") # Returned when the model-generated transcription of audio output is updated. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param delta [String] The transcript delta. + # @param delta [String] + # The transcript delta. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.output_audio_transcript.delta"] The event type, must be `response.output_audio_transcript.delta`. + # @param type [Symbol, :"response.output_audio_transcript.delta"] + # The event type, must be `response.output_audio_transcript.delta`. end end end diff --git a/lib/openai/models/realtime/response_audio_transcript_done_event.rb b/lib/openai/models/realtime/response_audio_transcript_done_event.rb index ac27cad68..0dc0d6e04 100644 --- a/lib/openai/models/realtime/response_audio_transcript_done_event.rb +++ b/lib/openai/models/realtime/response_audio_transcript_done_event.rb @@ -51,19 +51,26 @@ class ResponseAudioTranscriptDoneEvent < OpenAI::Internal::Type::BaseModel # streaming. Also emitted when a Response is interrupted, incomplete, or # cancelled. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param transcript [String] The final transcript of the audio. + # @param transcript [String] + # The final transcript of the audio. # - # @param type [Symbol, :"response.output_audio_transcript.done"] The event type, must be `response.output_audio_transcript.done`. + # @param type [Symbol, :"response.output_audio_transcript.done"] + # The event type, must be `response.output_audio_transcript.done`. end end end diff --git a/lib/openai/models/realtime/response_cancel_event.rb b/lib/openai/models/realtime/response_cancel_event.rb index 9133324c6..1da812f39 100644 --- a/lib/openai/models/realtime/response_cancel_event.rb +++ b/lib/openai/models/realtime/response_cancel_event.rb @@ -24,20 +24,21 @@ class ResponseCancelEvent < OpenAI::Internal::Type::BaseModel optional :response_id, String # @!method initialize(event_id: nil, response_id: nil, type: :"response.cancel") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ResponseCancelEvent} for more details. - # # Send this event to cancel an in-progress response. The server will respond with # a `response.done` event with a status of `response.status=cancelled`. If there # is no response to cancel, the server will respond with an error. It's safe to # call `response.cancel` even if no response is in progress, an error will be # returned the session will remain unaffected. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param response_id [String] A specific response ID to cancel - if not provided, will cancel an + # @param response_id [String] + # A specific response ID to cancel - if not provided, will cancel an in-progress + # response in the default conversation. # - # @param type [Symbol, :"response.cancel"] The event type, must be `response.cancel`. + # @param type [Symbol, :"response.cancel"] + # The event type, must be `response.cancel`. end end end diff --git a/lib/openai/models/realtime/response_content_part_added_event.rb b/lib/openai/models/realtime/response_content_part_added_event.rb index 0a29d91c1..0f8944cc3 100644 --- a/lib/openai/models/realtime/response_content_part_added_event.rb +++ b/lib/openai/models/realtime/response_content_part_added_event.rb @@ -50,19 +50,26 @@ class ResponseContentPartAddedEvent < OpenAI::Internal::Type::BaseModel # Returned when a new content part is added to an assistant message item during # response generation. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item to which the content part was added. + # @param item_id [String] + # The ID of the item to which the content part was added. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param part [OpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part] The content part that was added. + # @param part [OpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part] + # The content part that was added. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.content_part.added"] The event type, must be `response.content_part.added`. + # @param type [Symbol, :"response.content_part.added"] + # The event type, must be `response.content_part.added`. # @see OpenAI::Models::Realtime::ResponseContentPartAddedEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -93,13 +100,17 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(audio: nil, text: nil, transcript: nil, type: nil) # The content part that was added. # - # @param audio [String] Base64-encoded audio data (if type is "audio"). + # @param audio [String] + # Base64-encoded audio data (if type is "audio"). # - # @param text [String] The text content (if type is "text"). + # @param text [String] + # The text content (if type is "text"). # - # @param transcript [String] The transcript of the audio (if type is "audio"). + # @param transcript [String] + # The transcript of the audio (if type is "audio"). # - # @param type [Symbol, OpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part::Type] The content type ("text", "audio"). + # @param type [Symbol, OpenAI::Models::Realtime::ResponseContentPartAddedEvent::Part::Type] + # The content type ("text", "audio"). # The content type ("text", "audio"). # diff --git a/lib/openai/models/realtime/response_content_part_done_event.rb b/lib/openai/models/realtime/response_content_part_done_event.rb index 6bac28e66..adda74b4f 100644 --- a/lib/openai/models/realtime/response_content_part_done_event.rb +++ b/lib/openai/models/realtime/response_content_part_done_event.rb @@ -50,19 +50,26 @@ class ResponseContentPartDoneEvent < OpenAI::Internal::Type::BaseModel # Returned when a content part is done streaming in an assistant message item. # Also emitted when a Response is interrupted, incomplete, or cancelled. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param part [OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part] The content part that is done. + # @param part [OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part] + # The content part that is done. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.content_part.done"] The event type, must be `response.content_part.done`. + # @param type [Symbol, :"response.content_part.done"] + # The event type, must be `response.content_part.done`. # @see OpenAI::Models::Realtime::ResponseContentPartDoneEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -93,13 +100,17 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(audio: nil, text: nil, transcript: nil, type: nil) # The content part that is done. # - # @param audio [String] Base64-encoded audio data (if type is "audio"). + # @param audio [String] + # Base64-encoded audio data (if type is "audio"). # - # @param text [String] The text content (if type is "text"). + # @param text [String] + # The text content (if type is "text"). # - # @param transcript [String] The transcript of the audio (if type is "audio"). + # @param transcript [String] + # The transcript of the audio (if type is "audio"). # - # @param type [Symbol, OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::Type] The content type ("text", "audio"). + # @param type [Symbol, OpenAI::Models::Realtime::ResponseContentPartDoneEvent::Part::Type] + # The content type ("text", "audio"). # The content type ("text", "audio"). # diff --git a/lib/openai/models/realtime/response_create_event.rb b/lib/openai/models/realtime/response_create_event.rb index e61f68469..49d752be4 100644 --- a/lib/openai/models/realtime/response_create_event.rb +++ b/lib/openai/models/realtime/response_create_event.rb @@ -50,11 +50,14 @@ class ResponseCreateEvent < OpenAI::Internal::Type::BaseModel # `input` field, which is an array accepting raw Items and references to existing # Items. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param response [OpenAI::Models::Realtime::RealtimeResponseCreateParams] Create a new Realtime response with these parameters + # @param response [OpenAI::Models::Realtime::RealtimeResponseCreateParams] + # Create a new Realtime response with these parameters # - # @param type [Symbol, :"response.create"] The event type, must be `response.create`. + # @param type [Symbol, :"response.create"] + # The event type, must be `response.create`. end end end diff --git a/lib/openai/models/realtime/response_created_event.rb b/lib/openai/models/realtime/response_created_event.rb index fdb39746c..fc1cff39c 100644 --- a/lib/openai/models/realtime/response_created_event.rb +++ b/lib/openai/models/realtime/response_created_event.rb @@ -26,11 +26,14 @@ class ResponseCreatedEvent < OpenAI::Internal::Type::BaseModel # Returned when a new Response is created. The first event of response creation, # where the response is in an initial state of `in_progress`. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param response [OpenAI::Models::Realtime::RealtimeResponse] The response resource. + # @param response [OpenAI::Models::Realtime::RealtimeResponse] + # The response resource. # - # @param type [Symbol, :"response.created"] The event type, must be `response.created`. + # @param type [Symbol, :"response.created"] + # The event type, must be `response.created`. end end end diff --git a/lib/openai/models/realtime/response_done_event.rb b/lib/openai/models/realtime/response_done_event.rb index 0de4f32a6..2579891df 100644 --- a/lib/openai/models/realtime/response_done_event.rb +++ b/lib/openai/models/realtime/response_done_event.rb @@ -34,11 +34,14 @@ class ResponseDoneEvent < OpenAI::Internal::Type::BaseModel # A response will contain all output items that were generated during the # response, excluding any audio content. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param response [OpenAI::Models::Realtime::RealtimeResponse] The response resource. + # @param response [OpenAI::Models::Realtime::RealtimeResponse] + # The response resource. # - # @param type [Symbol, :"response.done"] The event type, must be `response.done`. + # @param type [Symbol, :"response.done"] + # The event type, must be `response.done`. end end end diff --git a/lib/openai/models/realtime/response_function_call_arguments_delta_event.rb b/lib/openai/models/realtime/response_function_call_arguments_delta_event.rb index 27817360e..7afe78008 100644 --- a/lib/openai/models/realtime/response_function_call_arguments_delta_event.rb +++ b/lib/openai/models/realtime/response_function_call_arguments_delta_event.rb @@ -47,25 +47,28 @@ class ResponseFunctionCallArgumentsDeltaEvent < OpenAI::Internal::Type::BaseMode required :type, const: :"response.function_call_arguments.delta" # @!method initialize(call_id:, delta:, event_id:, item_id:, output_index:, response_id:, type: :"response.function_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ResponseFunctionCallArgumentsDeltaEvent} for more - # details. - # # Returned when the model-generated function call arguments are updated. # - # @param call_id [String] The ID of the function call. + # @param call_id [String] + # The ID of the function call. # - # @param delta [String] The arguments delta as a JSON string. + # @param delta [String] + # The arguments delta as a JSON string. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the function call item. + # @param item_id [String] + # The ID of the function call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.function_call_arguments.delta"] The event type, must be `response.function_call_arguments.delta`. + # @param type [Symbol, :"response.function_call_arguments.delta"] + # The event type, must be `response.function_call_arguments.delta`. end end end diff --git a/lib/openai/models/realtime/response_function_call_arguments_done_event.rb b/lib/openai/models/realtime/response_function_call_arguments_done_event.rb index b51d030d2..c080c1bcf 100644 --- a/lib/openai/models/realtime/response_function_call_arguments_done_event.rb +++ b/lib/openai/models/realtime/response_function_call_arguments_done_event.rb @@ -53,28 +53,32 @@ class ResponseFunctionCallArgumentsDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.function_call_arguments.done" # @!method initialize(arguments:, call_id:, event_id:, item_id:, name:, output_index:, response_id:, type: :"response.function_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ResponseFunctionCallArgumentsDoneEvent} for more - # details. - # # Returned when the model-generated function call arguments are done streaming. # Also emitted when a Response is interrupted, incomplete, or cancelled. # - # @param arguments [String] The final arguments as a JSON string. + # @param arguments [String] + # The final arguments as a JSON string. # - # @param call_id [String] The ID of the function call. + # @param call_id [String] + # The ID of the function call. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the function call item. + # @param item_id [String] + # The ID of the function call item. # - # @param name [String] The name of the function that was called. + # @param name [String] + # The name of the function that was called. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.function_call_arguments.done"] The event type, must be `response.function_call_arguments.done`. + # @param type [Symbol, :"response.function_call_arguments.done"] + # The event type, must be `response.function_call_arguments.done`. end end end diff --git a/lib/openai/models/realtime/response_mcp_call_arguments_delta.rb b/lib/openai/models/realtime/response_mcp_call_arguments_delta.rb index 3a24560df..9948069c4 100644 --- a/lib/openai/models/realtime/response_mcp_call_arguments_delta.rb +++ b/lib/openai/models/realtime/response_mcp_call_arguments_delta.rb @@ -49,19 +49,26 @@ class ResponseMcpCallArgumentsDelta < OpenAI::Internal::Type::BaseModel # @!method initialize(delta:, event_id:, item_id:, output_index:, response_id:, obfuscation: nil, type: :"response.mcp_call_arguments.delta") # Returned when MCP tool call arguments are updated during response generation. # - # @param delta [String] The JSON-encoded arguments delta. + # @param delta [String] + # The JSON-encoded arguments delta. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP tool call item. + # @param item_id [String] + # The ID of the MCP tool call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param obfuscation [String, nil] If present, indicates the delta text was obfuscated. + # @param obfuscation [String, nil] + # If present, indicates the delta text was obfuscated. # - # @param type [Symbol, :"response.mcp_call_arguments.delta"] The event type, must be `response.mcp_call_arguments.delta`. + # @param type [Symbol, :"response.mcp_call_arguments.delta"] + # The event type, must be `response.mcp_call_arguments.delta`. end end end diff --git a/lib/openai/models/realtime/response_mcp_call_arguments_done.rb b/lib/openai/models/realtime/response_mcp_call_arguments_done.rb index 814091bbb..24fff5747 100644 --- a/lib/openai/models/realtime/response_mcp_call_arguments_done.rb +++ b/lib/openai/models/realtime/response_mcp_call_arguments_done.rb @@ -43,17 +43,23 @@ class ResponseMcpCallArgumentsDone < OpenAI::Internal::Type::BaseModel # @!method initialize(arguments:, event_id:, item_id:, output_index:, response_id:, type: :"response.mcp_call_arguments.done") # Returned when MCP tool call arguments are finalized during response generation. # - # @param arguments [String] The final JSON-encoded arguments string. + # @param arguments [String] + # The final JSON-encoded arguments string. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP tool call item. + # @param item_id [String] + # The ID of the MCP tool call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.mcp_call_arguments.done"] The event type, must be `response.mcp_call_arguments.done`. + # @param type [Symbol, :"response.mcp_call_arguments.done"] + # The event type, must be `response.mcp_call_arguments.done`. end end end diff --git a/lib/openai/models/realtime/response_mcp_call_completed.rb b/lib/openai/models/realtime/response_mcp_call_completed.rb index 954936bb3..eb4d075bb 100644 --- a/lib/openai/models/realtime/response_mcp_call_completed.rb +++ b/lib/openai/models/realtime/response_mcp_call_completed.rb @@ -31,13 +31,17 @@ class ResponseMcpCallCompleted < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, output_index:, type: :"response.mcp_call.completed") # Returned when an MCP tool call has completed successfully. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP tool call item. + # @param item_id [String] + # The ID of the MCP tool call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param type [Symbol, :"response.mcp_call.completed"] The event type, must be `response.mcp_call.completed`. + # @param type [Symbol, :"response.mcp_call.completed"] + # The event type, must be `response.mcp_call.completed`. end end end diff --git a/lib/openai/models/realtime/response_mcp_call_failed.rb b/lib/openai/models/realtime/response_mcp_call_failed.rb index a6d1ea4d5..ea9d79e3e 100644 --- a/lib/openai/models/realtime/response_mcp_call_failed.rb +++ b/lib/openai/models/realtime/response_mcp_call_failed.rb @@ -31,13 +31,17 @@ class ResponseMcpCallFailed < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, output_index:, type: :"response.mcp_call.failed") # Returned when an MCP tool call has failed. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP tool call item. + # @param item_id [String] + # The ID of the MCP tool call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param type [Symbol, :"response.mcp_call.failed"] The event type, must be `response.mcp_call.failed`. + # @param type [Symbol, :"response.mcp_call.failed"] + # The event type, must be `response.mcp_call.failed`. end end end diff --git a/lib/openai/models/realtime/response_mcp_call_in_progress.rb b/lib/openai/models/realtime/response_mcp_call_in_progress.rb index 306b860eb..20f8e582a 100644 --- a/lib/openai/models/realtime/response_mcp_call_in_progress.rb +++ b/lib/openai/models/realtime/response_mcp_call_in_progress.rb @@ -31,13 +31,17 @@ class ResponseMcpCallInProgress < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item_id:, output_index:, type: :"response.mcp_call.in_progress") # Returned when an MCP tool call has started and is in progress. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the MCP tool call item. + # @param item_id [String] + # The ID of the MCP tool call item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param type [Symbol, :"response.mcp_call.in_progress"] The event type, must be `response.mcp_call.in_progress`. + # @param type [Symbol, :"response.mcp_call.in_progress"] + # The event type, must be `response.mcp_call.in_progress`. end end end diff --git a/lib/openai/models/realtime/response_output_item_added_event.rb b/lib/openai/models/realtime/response_output_item_added_event.rb index 447f5e097..46afe26d9 100644 --- a/lib/openai/models/realtime/response_output_item_added_event.rb +++ b/lib/openai/models/realtime/response_output_item_added_event.rb @@ -37,15 +37,20 @@ class ResponseOutputItemAddedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(event_id:, item:, output_index:, response_id:, type: :"response.output_item.added") # Returned when a new Item is created during Response generation. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param output_index [Integer] The index of the output item in the Response. + # @param output_index [Integer] + # The index of the output item in the Response. # - # @param response_id [String] The ID of the Response to which the item belongs. + # @param response_id [String] + # The ID of the Response to which the item belongs. # - # @param type [Symbol, :"response.output_item.added"] The event type, must be `response.output_item.added`. + # @param type [Symbol, :"response.output_item.added"] + # The event type, must be `response.output_item.added`. end end end diff --git a/lib/openai/models/realtime/response_output_item_done_event.rb b/lib/openai/models/realtime/response_output_item_done_event.rb index ef58e78a3..11bdd22a3 100644 --- a/lib/openai/models/realtime/response_output_item_done_event.rb +++ b/lib/openai/models/realtime/response_output_item_done_event.rb @@ -38,15 +38,20 @@ class ResponseOutputItemDoneEvent < OpenAI::Internal::Type::BaseModel # Returned when an Item is done streaming. Also emitted when a Response is # interrupted, incomplete, or cancelled. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] A single item within a Realtime conversation. + # @param item [OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest] + # A single item within a Realtime conversation. # - # @param output_index [Integer] The index of the output item in the Response. + # @param output_index [Integer] + # The index of the output item in the Response. # - # @param response_id [String] The ID of the Response to which the item belongs. + # @param response_id [String] + # The ID of the Response to which the item belongs. # - # @param type [Symbol, :"response.output_item.done"] The event type, must be `response.output_item.done`. + # @param type [Symbol, :"response.output_item.done"] + # The event type, must be `response.output_item.done`. end end end diff --git a/lib/openai/models/realtime/response_text_delta_event.rb b/lib/openai/models/realtime/response_text_delta_event.rb index c542bb95f..1589256a7 100644 --- a/lib/openai/models/realtime/response_text_delta_event.rb +++ b/lib/openai/models/realtime/response_text_delta_event.rb @@ -49,19 +49,26 @@ class ResponseTextDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(content_index:, delta:, event_id:, item_id:, output_index:, response_id:, type: :"response.output_text.delta") # Returned when the text value of an "output_text" content part is updated. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param delta [String] The text delta. + # @param delta [String] + # The text delta. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param type [Symbol, :"response.output_text.delta"] The event type, must be `response.output_text.delta`. + # @param type [Symbol, :"response.output_text.delta"] + # The event type, must be `response.output_text.delta`. end end end diff --git a/lib/openai/models/realtime/response_text_done_event.rb b/lib/openai/models/realtime/response_text_done_event.rb index 240d87d41..9b16285a9 100644 --- a/lib/openai/models/realtime/response_text_done_event.rb +++ b/lib/openai/models/realtime/response_text_done_event.rb @@ -50,19 +50,26 @@ class ResponseTextDoneEvent < OpenAI::Internal::Type::BaseModel # Returned when the text value of an "output_text" content part is done streaming. # Also emitted when a Response is interrupted, incomplete, or cancelled. # - # @param content_index [Integer] The index of the content part in the item's content array. + # @param content_index [Integer] + # The index of the content part in the item's content array. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item in the response. + # @param output_index [Integer] + # The index of the output item in the response. # - # @param response_id [String] The ID of the response. + # @param response_id [String] + # The ID of the response. # - # @param text [String] The final text content. + # @param text [String] + # The final text content. # - # @param type [Symbol, :"response.output_text.done"] The event type, must be `response.output_text.done`. + # @param type [Symbol, :"response.output_text.done"] + # The event type, must be `response.output_text.done`. end end end diff --git a/lib/openai/models/realtime/session_created_event.rb b/lib/openai/models/realtime/session_created_event.rb index ccefcc968..ca2b4f15b 100644 --- a/lib/openai/models/realtime/session_created_event.rb +++ b/lib/openai/models/realtime/session_created_event.rb @@ -27,11 +27,14 @@ class SessionCreatedEvent < OpenAI::Internal::Type::BaseModel # is established as the first server event. This event will contain the default # Session configuration. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] The session configuration. + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] + # The session configuration. # - # @param type [Symbol, :"session.created"] The event type, must be `session.created`. + # @param type [Symbol, :"session.created"] + # The event type, must be `session.created`. # The session configuration. # diff --git a/lib/openai/models/realtime/session_update_event.rb b/lib/openai/models/realtime/session_update_event.rb index 33c4baeaa..bfae8e52c 100644 --- a/lib/openai/models/realtime/session_update_event.rb +++ b/lib/openai/models/realtime/session_update_event.rb @@ -27,9 +27,6 @@ class SessionUpdateEvent < OpenAI::Internal::Type::BaseModel optional :event_id, String # @!method initialize(session:, event_id: nil, type: :"session.update") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::SessionUpdateEvent} for more details. - # # Send this event to update the session’s configuration. The client may send this # event at any time to update any field except for `voice` and `model`. `voice` # can be updated only if there have been no other audio outputs yet. @@ -40,11 +37,18 @@ class SessionUpdateEvent < OpenAI::Internal::Type::BaseModel # like `instructions`, pass an empty string. To clear a field like `tools`, pass # an empty array. To clear a field like `turn_detection`, pass `null`. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] Update the Realtime session. Choose either a realtime + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] + # Update the Realtime session. Choose either a realtime session or a transcription + # session. # - # @param event_id [String] Optional client-generated ID used to identify this event. This is an arbitrary s + # @param event_id [String] + # Optional client-generated ID used to identify this event. This is an arbitrary + # string that a client may assign. It will be passed back if there is an error + # with the event, but the corresponding `session.updated` event will not include + # it. # - # @param type [Symbol, :"session.update"] The event type, must be `session.update`. + # @param type [Symbol, :"session.update"] + # The event type, must be `session.update`. # Update the Realtime session. Choose either a realtime session or a transcription # session. diff --git a/lib/openai/models/realtime/session_updated_event.rb b/lib/openai/models/realtime/session_updated_event.rb index 6d4e0023e..712e9c2a5 100644 --- a/lib/openai/models/realtime/session_updated_event.rb +++ b/lib/openai/models/realtime/session_updated_event.rb @@ -26,11 +26,14 @@ class SessionUpdatedEvent < OpenAI::Internal::Type::BaseModel # Returned when a session is updated with a `session.update` event, unless there # is an error. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] The session configuration. + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] + # The session configuration. # - # @param type [Symbol, :"session.updated"] The event type, must be `session.updated`. + # @param type [Symbol, :"session.updated"] + # The event type, must be `session.updated`. # The session configuration. # diff --git a/lib/openai/models/realtime/transcription_session_update.rb b/lib/openai/models/realtime/transcription_session_update.rb index 7fb53c320..41d4fae24 100644 --- a/lib/openai/models/realtime/transcription_session_update.rb +++ b/lib/openai/models/realtime/transcription_session_update.rb @@ -25,11 +25,14 @@ class TranscriptionSessionUpdate < OpenAI::Internal::Type::BaseModel # @!method initialize(session:, event_id: nil, type: :"transcription_session.update") # Send this event to update a transcription session. # - # @param session [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session] Realtime transcription session object configuration. + # @param session [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session] + # Realtime transcription session object configuration. # - # @param event_id [String] Optional client-generated ID used to identify this event. + # @param event_id [String] + # Optional client-generated ID used to identify this event. # - # @param type [Symbol, :"transcription_session.update"] The event type, must be `transcription_session.update`. + # @param type [Symbol, :"transcription_session.update"] + # The event type, must be `transcription_session.update`. # @see OpenAI::Models::Realtime::TranscriptionSessionUpdate#session class Session < OpenAI::Internal::Type::BaseModel @@ -86,22 +89,33 @@ class Session < OpenAI::Internal::Type::BaseModel optional :turn_detection, -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::TurnDetection } # @!method initialize(include: nil, input_audio_format: nil, input_audio_noise_reduction: nil, input_audio_transcription: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session} for more - # details. - # # Realtime transcription session object configuration. # - # @param include [Array] The set of items to include in the transcription. Current available items are: + # @param include [Array] + # The set of items to include in the transcription. Current available items are: + # `item.input_audio_transcription.logprobs` # - # @param input_audio_format [Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::InputAudioFormat] The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + # @param input_audio_format [Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::InputAudioFormat] + # The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For + # `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel + # (mono), and little-endian byte order. # - # @param input_audio_noise_reduction [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction] Configuration for input audio noise reduction. This can be set to `null` to turn + # @param input_audio_noise_reduction [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction] + # Configuration for input audio noise reduction. This can be set to `null` to turn + # off. Noise reduction filters audio added to the input audio buffer before it is + # sent to VAD and the model. Filtering the audio can improve VAD and turn + # detection accuracy (reducing false positives) and model performance by improving + # perception of the input audio. # - # @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription] Configuration for input audio transcription. The client can optionally set the l + # @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription] + # Configuration for input audio transcription. The client can optionally set the + # language and prompt for transcription, these offer additional guidance to the + # transcription service. # - # @param turn_detection [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection] Configuration for turn detection. Can be set to `null` to turn off. Server VAD m - + # @param turn_detection [OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection] + # Configuration for turn detection. Can be set to `null` to turn off. Server VAD + # means that the model will detect the start and end of speech based on audio + # volume and respond at the end of user speech. module Include extend OpenAI::Internal::Type::Enum @@ -138,17 +152,16 @@ class InputAudioNoiseReduction < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::NoiseReductionType } # @!method initialize(type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction} - # for more details. - # # Configuration for input audio noise reduction. This can be set to `null` to turn # off. Noise reduction filters audio added to the input audio buffer before it is # sent to VAD and the model. Filtering the audio can improve VAD and turn # detection accuracy (reducing false positives) and model performance by improving # perception of the input audio. # - # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h + # @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] + # Type of noise reduction. `near_field` is for close-talking microphones such as + # headphones, `far_field` is for far-field microphones such as laptop or + # conference room microphones. end # @see OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session#turn_detection @@ -184,21 +197,27 @@ class TurnDetection < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::Type } # @!method initialize(prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection} - # for more details. - # # Configuration for turn detection. Can be set to `null` to turn off. Server VAD # means that the model will detect the start and end of speech based on audio # volume and respond at the end of user speech. # - # @param prefix_padding_ms [Integer] Amount of audio to include before the VAD detected speech (in + # @param prefix_padding_ms [Integer] + # Amount of audio to include before the VAD detected speech (in milliseconds). + # Defaults to 300ms. # - # @param silence_duration_ms [Integer] Duration of silence to detect speech stop (in milliseconds). Defaults + # @param silence_duration_ms [Integer] + # Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. + # With shorter values the model will respond more quickly, but may jump in on + # short pauses from the user. # - # @param threshold [Float] Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A + # @param threshold [Float] + # Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher + # threshold will require louder audio to activate the model, and thus might + # perform better in noisy environments. # - # @param type [Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::Type] Type of turn detection. Only `server_vad` is currently supported for transcripti + # @param type [Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::Type] + # Type of turn detection. Only `server_vad` is currently supported for + # transcription sessions. # Type of turn detection. Only `server_vad` is currently supported for # transcription sessions. diff --git a/lib/openai/models/realtime/transcription_session_updated_event.rb b/lib/openai/models/realtime/transcription_session_updated_event.rb index 5cd79dd38..00d93532e 100644 --- a/lib/openai/models/realtime/transcription_session_updated_event.rb +++ b/lib/openai/models/realtime/transcription_session_updated_event.rb @@ -27,17 +27,21 @@ class TranscriptionSessionUpdatedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"transcription_session.updated" # @!method initialize(event_id:, session:, type: :"transcription_session.updated") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent} for more details. - # # Returned when a transcription session is updated with a # `transcription_session.update` event, unless there is an error. # - # @param event_id [String] The unique ID of the server event. + # @param event_id [String] + # The unique ID of the server event. + # + # @param session [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session] + # A new Realtime transcription session configuration. # - # @param session [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session] A new Realtime transcription session configuration. + # When a session is created on the server via REST API, the session object also + # contains an ephemeral key. Default TTL for keys is 10 minutes. This property is + # not present when a session is updated via the WebSocket API. # - # @param type [Symbol, :"transcription_session.updated"] The event type, must be `transcription_session.updated`. + # @param type [Symbol, :"transcription_session.updated"] + # The event type, must be `transcription_session.updated`. # @see OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent#session class Session < OpenAI::Internal::Type::BaseModel @@ -85,25 +89,29 @@ class Session < OpenAI::Internal::Type::BaseModel ) # @!method initialize(client_secret:, input_audio_format: nil, input_audio_transcription: nil, modalities: nil, turn_detection: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session} for more - # details. - # # A new Realtime transcription session configuration. # # When a session is created on the server via REST API, the session object also # contains an ephemeral key. Default TTL for keys is 10 minutes. This property is # not present when a session is updated via the WebSocket API. # - # @param client_secret [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret] Ephemeral key returned by the API. Only present when the session is + # @param client_secret [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret] + # Ephemeral key returned by the API. Only present when the session is created on + # the server via REST API. # - # @param input_audio_format [String] The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + # @param input_audio_format [String] + # The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. # # @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription] # - # @param modalities [Array] The set of modalities the model can respond with. To disable audio, + # @param modalities [Array] + # The set of modalities the model can respond with. To disable audio, set this to + # ["text"]. # - # @param turn_detection [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection] Configuration for turn detection. Can be set to `null` to turn off. Server + # @param turn_detection [OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection] + # Configuration for turn detection. Can be set to `null` to turn off. Server VAD + # means that the model will detect the start and end of speech based on audio + # volume and respond at the end of user speech. # @see OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session#client_secret class ClientSecret < OpenAI::Internal::Type::BaseModel @@ -123,16 +131,17 @@ class ClientSecret < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(expires_at:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret} - # for more details. - # # Ephemeral key returned by the API. Only present when the session is created on # the server via REST API. # - # @param expires_at [Integer] Timestamp for when the token expires. Currently, all tokens expire + # @param expires_at [Integer] + # Timestamp for when the token expires. Currently, all tokens expire after one + # minute. # - # @param value [String] Ephemeral key usable in client environments to authenticate connections + # @param value [String] + # Ephemeral key usable in client environments to authenticate connections to the + # Realtime API. Use this in client-side environments rather than a standard API + # token, which should only be used server-side. end module Modality @@ -177,21 +186,26 @@ class TurnDetection < OpenAI::Internal::Type::BaseModel optional :type, String # @!method initialize(prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection} - # for more details. - # # Configuration for turn detection. Can be set to `null` to turn off. Server VAD # means that the model will detect the start and end of speech based on audio # volume and respond at the end of user speech. # - # @param prefix_padding_ms [Integer] Amount of audio to include before the VAD detected speech (in + # @param prefix_padding_ms [Integer] + # Amount of audio to include before the VAD detected speech (in milliseconds). + # Defaults to 300ms. # - # @param silence_duration_ms [Integer] Duration of silence to detect speech stop (in milliseconds). Defaults + # @param silence_duration_ms [Integer] + # Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. + # With shorter values the model will respond more quickly, but may jump in on + # short pauses from the user. # - # @param threshold [Float] Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A + # @param threshold [Float] + # Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher + # threshold will require louder audio to activate the model, and thus might + # perform better in noisy environments. # - # @param type [String] Type of turn detection, only `server_vad` is currently supported. + # @param type [String] + # Type of turn detection, only `server_vad` is currently supported. end end end diff --git a/lib/openai/models/reasoning.rb b/lib/openai/models/reasoning.rb index d0570161b..ede6e8c7f 100644 --- a/lib/openai/models/reasoning.rb +++ b/lib/openai/models/reasoning.rb @@ -19,7 +19,7 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. # # @return [Symbol, OpenAI::Models::ReasoningEffort, nil] @@ -57,21 +57,44 @@ class Reasoning < OpenAI::Internal::Type::BaseModel optional :summary, enum: -> { OpenAI::Reasoning::Summary }, nil?: true # @!method initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Reasoning} for more details. - # # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param context [Symbol, OpenAI::Models::Reasoning::Context, nil] + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # + # When returned on a response, this is the effective reasoning context mode used + # for the response. + # + # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param generate_summary [Symbol, OpenAI::Models::Reasoning::GenerateSummary, nil] + # **Deprecated:** use `summary` instead. # - # @param context [Symbol, OpenAI::Models::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns. + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported + # @param mode [String, Symbol, OpenAI::Models::Reasoning::Mode] + # Controls the reasoning execution mode for the request. # - # @param generate_summary [Symbol, OpenAI::Models::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead. + # When returned on a response, this is the effective execution mode. # - # @param mode [String, Symbol, OpenAI::Models::Reasoning::Mode] Controls the reasoning execution mode for the request. + # @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] + # A summary of the reasoning performed by the model. This can be useful for + # debugging and understanding the model's reasoning process. One of `auto`, + # `concise`, or `detailed`. # - # @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be + # `concise` is supported for `computer-use-preview` models and all reasoning + # models after `gpt-5`. # Controls which reasoning items are rendered back to the model on later turns. If # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` diff --git a/lib/openai/models/reasoning_effort.rb b/lib/openai/models/reasoning_effort.rb index f01381f2b..935b1fe14 100644 --- a/lib/openai/models/reasoning_effort.rb +++ b/lib/openai/models/reasoning_effort.rb @@ -6,7 +6,7 @@ module Models # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module ReasoningEffort extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/response_format_json_object.rb b/lib/openai/models/response_format_json_object.rb index 13a620f24..f8f7c9106 100644 --- a/lib/openai/models/response_format_json_object.rb +++ b/lib/openai/models/response_format_json_object.rb @@ -14,7 +14,8 @@ class ResponseFormatJSONObject < OpenAI::Internal::Type::BaseModel # `json_schema` is recommended for models that support it. Note that the model # will not generate JSON without a system or user message instructing it to do so. # - # @param type [Symbol, :json_object] The type of response format being defined. Always `json_object`. + # @param type [Symbol, :json_object] + # The type of response format being defined. Always `json_object`. end end end diff --git a/lib/openai/models/response_format_json_schema.rb b/lib/openai/models/response_format_json_schema.rb index 3efdeb9cd..11e444cac 100644 --- a/lib/openai/models/response_format_json_schema.rb +++ b/lib/openai/models/response_format_json_schema.rb @@ -16,16 +16,15 @@ class ResponseFormatJSONSchema < OpenAI::Internal::Type::BaseModel required :type, const: :json_schema # @!method initialize(json_schema:, type: :json_schema) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ResponseFormatJSONSchema} for more details. - # # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param json_schema [OpenAI::Models::ResponseFormatJSONSchema::JSONSchema] Structured Outputs configuration options, including a JSON Schema. + # @param json_schema [OpenAI::Models::ResponseFormatJSONSchema::JSONSchema] + # Structured Outputs configuration options, including a JSON Schema. # - # @param type [Symbol, :json_schema] The type of response format being defined. Always `json_schema`. + # @param type [Symbol, :json_schema] + # The type of response format being defined. Always `json_schema`. # @see OpenAI::Models::ResponseFormatJSONSchema#json_schema class JSONSchema < OpenAI::Internal::Type::BaseModel @@ -63,24 +62,32 @@ class JSONSchema < OpenAI::Internal::Type::BaseModel # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # @return [Boolean, nil] optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, description: nil, schema: nil, strict: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ResponseFormatJSONSchema::JSONSchema} for more details. - # # Structured Outputs configuration options, including a JSON Schema. # - # @param name [String] The name of the response format. Must be a-z, A-Z, 0-9, or contain + # @param name [String] + # The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + # and dashes, with a maximum length of 64. # - # @param description [String] A description of what the response format is for, used by the model to + # @param description [String] + # A description of what the response format is for, used by the model to determine + # how to respond in the format. # - # @param schema [Hash{Symbol=>Object}, OpenAI::StructuredOutput::JsonSchemaConverter] The schema for the response format, described as a JSON Schema object. + # @param schema [Hash{Symbol=>Object}, OpenAI::StructuredOutput::JsonSchemaConverter] + # The schema for the response format, described as a JSON Schema object. Learn how + # to build JSON schemas [here](https://json-schema.org/). # - # @param strict [Boolean, nil] Whether to enable strict schema adherence when generating the output. + # @param strict [Boolean, nil] + # Whether to enable strict schema adherence when generating the output. If set to + # true, the model will always follow the exact schema defined in the `schema` + # field. Only a subset of JSON Schema is supported when `strict` is `true`. To + # learn more, read the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). end end end diff --git a/lib/openai/models/response_format_text.rb b/lib/openai/models/response_format_text.rb index a7ac56b02..91e976a59 100644 --- a/lib/openai/models/response_format_text.rb +++ b/lib/openai/models/response_format_text.rb @@ -12,7 +12,8 @@ class ResponseFormatText < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :text) # Default response format. Used to generate text responses. # - # @param type [Symbol, :text] The type of response format being defined. Always `text`. + # @param type [Symbol, :text] + # The type of response format being defined. Always `text`. end end end diff --git a/lib/openai/models/response_format_text_grammar.rb b/lib/openai/models/response_format_text_grammar.rb index 8d43e38fe..4721421cb 100644 --- a/lib/openai/models/response_format_text_grammar.rb +++ b/lib/openai/models/response_format_text_grammar.rb @@ -17,11 +17,13 @@ class ResponseFormatTextGrammar < OpenAI::Internal::Type::BaseModel # @!method initialize(grammar:, type: :grammar) # A custom grammar for the model to follow when generating text. Learn more in the - # [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + # [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars). # - # @param grammar [String] The custom grammar for the model to follow. + # @param grammar [String] + # The custom grammar for the model to follow. # - # @param type [Symbol, :grammar] The type of response format being defined. Always `grammar`. + # @param type [Symbol, :grammar] + # The type of response format being defined. Always `grammar`. end end end diff --git a/lib/openai/models/response_format_text_python.rb b/lib/openai/models/response_format_text_python.rb index 9e12a904f..59295bc12 100644 --- a/lib/openai/models/response_format_text_python.rb +++ b/lib/openai/models/response_format_text_python.rb @@ -11,10 +11,11 @@ class ResponseFormatTextPython < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :python) # Configure the model to generate valid Python code. See the - # [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) + # [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars) # for more details. # - # @param type [Symbol, :python] The type of response format being defined. Always `python`. + # @param type [Symbol, :python] + # The type of response format being defined. Always `python`. end end end diff --git a/lib/openai/models/responses/apply_patch_tool.rb b/lib/openai/models/responses/apply_patch_tool.rb index 6323a243d..fba079f66 100644 --- a/lib/openai/models/responses/apply_patch_tool.rb +++ b/lib/openai/models/responses/apply_patch_tool.rb @@ -25,10 +25,11 @@ class ApplyPatchTool < OpenAI::Internal::Type::BaseModel # @!method initialize(allowed_callers: nil, type: :apply_patch) # Allows the assistant to create, delete, or update files using unified diffs. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param type [Symbol, :apply_patch] The type of the tool. Always `apply_patch`. - + # @param type [Symbol, :apply_patch] + # The type of the tool. Always `apply_patch`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/compacted_response.rb b/lib/openai/models/responses/compacted_response.rb index 4b95adcd3..9fbae65a4 100644 --- a/lib/openai/models/responses/compacted_response.rb +++ b/lib/openai/models/responses/compacted_response.rb @@ -38,18 +38,22 @@ class CompactedResponse < OpenAI::Internal::Type::BaseModel required :usage, -> { OpenAI::Responses::ResponseUsage } # @!method initialize(id:, created_at:, output:, usage:, object: :"response.compaction") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::CompactedResponse} for more details. + # @param id [String] + # The unique identifier for the compacted response. # - # @param id [String] The unique identifier for the compacted response. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the compacted conversation was created. # - # @param created_at [Integer] Unix timestamp (in seconds) when the compacted conversation was created. + # @param output [Array] + # The compacted list of output items. This is a list of all user messages, + # followed by a single compaction item. # - # @param output [Array] The compacted list of output items. This is a list of all user messages, followe + # @param usage [OpenAI::Models::Responses::ResponseUsage] + # Token accounting for the compaction pass, including cached, reasoning, and total + # tokens. # - # @param usage [OpenAI::Models::Responses::ResponseUsage] Token accounting for the compaction pass, including cached, reasoning, and total - # - # @param object [Symbol, :"response.compaction"] The object type. Always `response.compaction`. + # @param object [Symbol, :"response.compaction"] + # The object type. Always `response.compaction`. end end end diff --git a/lib/openai/models/responses/computer_action.rb b/lib/openai/models/responses/computer_action.rb index 1f30f41da..735a958a4 100644 --- a/lib/openai/models/responses/computer_action.rb +++ b/lib/openai/models/responses/computer_action.rb @@ -69,20 +69,23 @@ class Click < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(button:, x:, y_:, keys: nil, type: :click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Click} for more details. - # # A click action. # - # @param button [Symbol, OpenAI::Models::Responses::ComputerAction::Click::Button] Indicates which mouse button was pressed during the click. One of `left`, `right + # @param button [Symbol, OpenAI::Models::Responses::ComputerAction::Click::Button] + # Indicates which mouse button was pressed during the click. One of `left`, + # `right`, `wheel`, `back`, or `forward`. # - # @param x [Integer] The x-coordinate where the click occurred. + # @param x [Integer] + # The x-coordinate where the click occurred. # - # @param y_ [Integer] The y-coordinate where the click occurred. + # @param y_ [Integer] + # The y-coordinate where the click occurred. # - # @param keys [Array, nil] The keys being held while clicking. + # @param keys [Array, nil] + # The keys being held while clicking. # - # @param type [Symbol, :click] Specifies the event type. For a click action, this property is always `click`. + # @param type [Symbol, :click] + # Specifies the event type. For a click action, this property is always `click`. # Indicates which mouse button was pressed during the click. One of `left`, # `right`, `wheel`, `back`, or `forward`. @@ -129,18 +132,20 @@ class DoubleClick < OpenAI::Internal::Type::BaseModel required :y_, Integer, api_name: :y # @!method initialize(keys:, x:, y_:, type: :double_click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::DoubleClick} for more details. - # # A double click action. # - # @param keys [Array, nil] The keys being held while double-clicking. + # @param keys [Array, nil] + # The keys being held while double-clicking. # - # @param x [Integer] The x-coordinate where the double click occurred. + # @param x [Integer] + # The x-coordinate where the double click occurred. # - # @param y_ [Integer] The y-coordinate where the double click occurred. + # @param y_ [Integer] + # The y-coordinate where the double click occurred. # - # @param type [Symbol, :double_click] Specifies the event type. For a double click action, this property is always set + # @param type [Symbol, :double_click] + # Specifies the event type. For a double click action, this property is always set + # to `double_click`. end class Drag < OpenAI::Internal::Type::BaseModel @@ -172,17 +177,25 @@ class Drag < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(path:, keys: nil, type: :drag) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Drag} for more details. - # # A drag action. # - # @param path [Array] An array of coordinates representing the path of the drag action. Coordinates wi + # @param path [Array] + # An array of coordinates representing the path of the drag action. Coordinates + # will appear as an array of objects, eg # - # @param keys [Array, nil] The keys being held while dragging the mouse. + # ``` + # [ + # { x: 100, y: 200 }, + # { x: 200, y: 300 } + # ] + # ``` # - # @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra - + # @param keys [Array, nil] + # The keys being held while dragging the mouse. + # + # @param type [Symbol, :drag] + # Specifies the event type. For a drag action, this property is always set to + # `drag`. class Path < OpenAI::Internal::Type::BaseModel # @!attribute x # The x-coordinate. @@ -199,9 +212,11 @@ class Path < OpenAI::Internal::Type::BaseModel # @!method initialize(x:, y_:) # An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. # - # @param x [Integer] The x-coordinate. + # @param x [Integer] + # The x-coordinate. # - # @param y_ [Integer] The y-coordinate. + # @param y_ [Integer] + # The y-coordinate. end end @@ -221,14 +236,15 @@ class Keypress < OpenAI::Internal::Type::BaseModel required :type, const: :keypress # @!method initialize(keys:, type: :keypress) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Keypress} for more details. - # # A collection of keypresses the model would like to perform. # - # @param keys [Array] The combination of keys the model is requesting to be pressed. This is an array + # @param keys [Array] + # The combination of keys the model is requesting to be pressed. This is an array + # of strings, each representing a key. # - # @param type [Symbol, :keypress] Specifies the event type. For a keypress action, this property is always set to + # @param type [Symbol, :keypress] + # Specifies the event type. For a keypress action, this property is always set to + # `keypress`. end class Move < OpenAI::Internal::Type::BaseModel @@ -258,18 +274,20 @@ class Move < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(x:, y_:, keys: nil, type: :move) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Move} for more details. - # # A mouse move action. # - # @param x [Integer] The x-coordinate to move to. + # @param x [Integer] + # The x-coordinate to move to. # - # @param y_ [Integer] The y-coordinate to move to. + # @param y_ [Integer] + # The y-coordinate to move to. # - # @param keys [Array, nil] The keys being held while moving the mouse. + # @param keys [Array, nil] + # The keys being held while moving the mouse. # - # @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov + # @param type [Symbol, :move] + # Specifies the event type. For a move action, this property is always set to + # `move`. end class Screenshot < OpenAI::Internal::Type::BaseModel @@ -281,12 +299,11 @@ class Screenshot < OpenAI::Internal::Type::BaseModel required :type, const: :screenshot # @!method initialize(type: :screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Screenshot} for more details. - # # A screenshot action. # - # @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is always set t + # @param type [Symbol, :screenshot] + # Specifies the event type. For a screenshot action, this property is always set + # to `screenshot`. end class Scroll < OpenAI::Internal::Type::BaseModel @@ -328,22 +345,26 @@ class Scroll < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(scroll_x:, scroll_y:, x:, y_:, keys: nil, type: :scroll) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Scroll} for more details. - # # A scroll action. # - # @param scroll_x [Integer] The horizontal scroll distance. + # @param scroll_x [Integer] + # The horizontal scroll distance. # - # @param scroll_y [Integer] The vertical scroll distance. + # @param scroll_y [Integer] + # The vertical scroll distance. # - # @param x [Integer] The x-coordinate where the scroll occurred. + # @param x [Integer] + # The x-coordinate where the scroll occurred. # - # @param y_ [Integer] The y-coordinate where the scroll occurred. + # @param y_ [Integer] + # The y-coordinate where the scroll occurred. # - # @param keys [Array, nil] The keys being held while scrolling. + # @param keys [Array, nil] + # The keys being held while scrolling. # - # @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s + # @param type [Symbol, :scroll] + # Specifies the event type. For a scroll action, this property is always set to + # `scroll`. end class Type < OpenAI::Internal::Type::BaseModel @@ -361,14 +382,14 @@ class Type < OpenAI::Internal::Type::BaseModel required :type, const: :type # @!method initialize(text:, type: :type) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Type} for more details. - # # An action to type in text. # - # @param text [String] The text to type. + # @param text [String] + # The text to type. # - # @param type [Symbol, :type] Specifies the event type. For a type action, this property is always set to `typ + # @param type [Symbol, :type] + # Specifies the event type. For a type action, this property is always set to + # `type`. end class Wait < OpenAI::Internal::Type::BaseModel @@ -380,12 +401,11 @@ class Wait < OpenAI::Internal::Type::BaseModel required :type, const: :wait # @!method initialize(type: :wait) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ComputerAction::Wait} for more details. - # # A wait action. # - # @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is always set to `wai + # @param type [Symbol, :wait] + # Specifies the event type. For a wait action, this property is always set to + # `wait`. end # @!method self.variants diff --git a/lib/openai/models/responses/computer_tool.rb b/lib/openai/models/responses/computer_tool.rb index bc47c4529..67fc6a599 100644 --- a/lib/openai/models/responses/computer_tool.rb +++ b/lib/openai/models/responses/computer_tool.rb @@ -12,9 +12,10 @@ class ComputerTool < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :computer) # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). # - # @param type [Symbol, :computer] The type of the computer tool. Always `computer`. + # @param type [Symbol, :computer] + # The type of the computer tool. Always `computer`. end end end diff --git a/lib/openai/models/responses/computer_use_preview_tool.rb b/lib/openai/models/responses/computer_use_preview_tool.rb index dbd0de643..09f92cb7f 100644 --- a/lib/openai/models/responses/computer_use_preview_tool.rb +++ b/lib/openai/models/responses/computer_use_preview_tool.rb @@ -30,15 +30,19 @@ class ComputerUsePreviewTool < OpenAI::Internal::Type::BaseModel # @!method initialize(display_height:, display_width:, environment:, type: :computer_use_preview) # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). # - # @param display_height [Integer] The height of the computer display. + # @param display_height [Integer] + # The height of the computer display. # - # @param display_width [Integer] The width of the computer display. + # @param display_width [Integer] + # The width of the computer display. # - # @param environment [Symbol, OpenAI::Models::Responses::ComputerUsePreviewTool::Environment] The type of computer environment to control. + # @param environment [Symbol, OpenAI::Models::Responses::ComputerUsePreviewTool::Environment] + # The type of computer environment to control. # - # @param type [Symbol, :computer_use_preview] The type of the computer use tool. Always `computer_use_preview`. + # @param type [Symbol, :computer_use_preview] + # The type of the computer use tool. Always `computer_use_preview`. # The type of computer environment to control. # diff --git a/lib/openai/models/responses/container_auto.rb b/lib/openai/models/responses/container_auto.rb index 3e8e9b380..783db8631 100644 --- a/lib/openai/models/responses/container_auto.rb +++ b/lib/openai/models/responses/container_auto.rb @@ -35,15 +35,20 @@ class ContainerAuto < OpenAI::Internal::Type::BaseModel optional :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ContainerAuto::Skill] } # @!method initialize(file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, type: :container_auto) - # @param file_ids [Array] An optional list of uploaded files to make available to your code. + # @param file_ids [Array] + # An optional list of uploaded files to make available to your code. # - # @param memory_limit [Symbol, OpenAI::Models::Responses::ContainerAuto::MemoryLimit, nil] The memory limit for the container. + # @param memory_limit [Symbol, OpenAI::Models::Responses::ContainerAuto::MemoryLimit, nil] + # The memory limit for the container. # - # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param skills [Array] An optional list of skills referenced by id or inline data. + # @param skills [Array] + # An optional list of skills referenced by id or inline data. # - # @param type [Symbol, :container_auto] Automatically creates a container for this request + # @param type [Symbol, :container_auto] + # Automatically creates a container for this request # The memory limit for the container. # diff --git a/lib/openai/models/responses/container_network_policy_allowlist.rb b/lib/openai/models/responses/container_network_policy_allowlist.rb index cefe57d48..f98be5597 100644 --- a/lib/openai/models/responses/container_network_policy_allowlist.rb +++ b/lib/openai/models/responses/container_network_policy_allowlist.rb @@ -26,11 +26,14 @@ class ContainerNetworkPolicyAllowlist < OpenAI::Internal::Type::BaseModel ) # @!method initialize(allowed_domains:, domain_secrets: nil, type: :allowlist) - # @param allowed_domains [Array] A list of allowed domains when type is `allowlist`. + # @param allowed_domains [Array] + # A list of allowed domains when type is `allowlist`. # - # @param domain_secrets [Array] Optional domain-scoped secrets for allowlisted domains. + # @param domain_secrets [Array] + # Optional domain-scoped secrets for allowlisted domains. # - # @param type [Symbol, :allowlist] Allow outbound network access only to specified domains. Always `allowlist`. + # @param type [Symbol, :allowlist] + # Allow outbound network access only to specified domains. Always `allowlist`. end end end diff --git a/lib/openai/models/responses/container_network_policy_disabled.rb b/lib/openai/models/responses/container_network_policy_disabled.rb index 8f4b40b05..58ba94177 100644 --- a/lib/openai/models/responses/container_network_policy_disabled.rb +++ b/lib/openai/models/responses/container_network_policy_disabled.rb @@ -11,7 +11,8 @@ class ContainerNetworkPolicyDisabled < OpenAI::Internal::Type::BaseModel required :type, const: :disabled # @!method initialize(type: :disabled) - # @param type [Symbol, :disabled] Disable outbound network access. Always `disabled`. + # @param type [Symbol, :disabled] + # Disable outbound network access. Always `disabled`. end end end diff --git a/lib/openai/models/responses/container_network_policy_domain_secret.rb b/lib/openai/models/responses/container_network_policy_domain_secret.rb index d3989514c..8bcfb1364 100644 --- a/lib/openai/models/responses/container_network_policy_domain_secret.rb +++ b/lib/openai/models/responses/container_network_policy_domain_secret.rb @@ -23,11 +23,14 @@ class ContainerNetworkPolicyDomainSecret < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(domain:, name:, value:) - # @param domain [String] The domain associated with the secret. + # @param domain [String] + # The domain associated with the secret. # - # @param name [String] The name of the secret to inject for the domain. + # @param name [String] + # The name of the secret to inject for the domain. # - # @param value [String] The secret value to inject for the domain. + # @param value [String] + # The secret value to inject for the domain. end end end diff --git a/lib/openai/models/responses/container_reference.rb b/lib/openai/models/responses/container_reference.rb index 9a9e93859..ed31cf9de 100644 --- a/lib/openai/models/responses/container_reference.rb +++ b/lib/openai/models/responses/container_reference.rb @@ -17,9 +17,11 @@ class ContainerReference < OpenAI::Internal::Type::BaseModel required :type, const: :container_reference # @!method initialize(container_id:, type: :container_reference) - # @param container_id [String] The ID of the referenced container. + # @param container_id [String] + # The ID of the referenced container. # - # @param type [Symbol, :container_reference] References a container created with the /v1/containers endpoint + # @param type [Symbol, :container_reference] + # References a container created with the /v1/containers endpoint end end end diff --git a/lib/openai/models/responses/custom_tool.rb b/lib/openai/models/responses/custom_tool.rb index 1b11dc91c..2f7f66cdd 100644 --- a/lib/openai/models/responses/custom_tool.rb +++ b/lib/openai/models/responses/custom_tool.rb @@ -52,26 +52,30 @@ class CustomTool < OpenAI::Internal::Type::BaseModel optional :format_, union: -> { OpenAI::CustomToolInputFormat }, api_name: :format # @!method initialize(name:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, format_: nil, type: :custom) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::CustomTool} for more details. - # # A custom tool that processes input using a specified format. Learn more about - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) # - # @param name [String] The name of the custom tool, used to identify it in tool calls. + # @param name [String] + # The name of the custom tool, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param async [Boolean] Whether the tool response can be returned asynchronously versus immediately retu + # @param async [Boolean] + # Whether the tool response can be returned asynchronously versus immediately + # returned on next response creation. # - # @param defer_loading [Boolean] Whether this tool should be deferred and discovered via tool search. + # @param defer_loading [Boolean] + # Whether this tool should be deferred and discovered via tool search. # - # @param description [String] Optional description of the custom tool, used to provide more context. + # @param description [String] + # Optional description of the custom tool, used to provide more context. # - # @param format_ [OpenAI::Models::CustomToolInputFormat::Text, OpenAI::Models::CustomToolInputFormat::Grammar] The input format for the custom tool. Default is unconstrained text. + # @param format_ [OpenAI::Models::CustomToolInputFormat::Text, OpenAI::Models::CustomToolInputFormat::Grammar] + # The input format for the custom tool. Default is unconstrained text. # - # @param type [Symbol, :custom] The type of the custom tool. Always `custom`. - + # @param type [Symbol, :custom] + # The type of the custom tool. Always `custom`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/easy_input_message.rb b/lib/openai/models/responses/easy_input_message.rb index 1f4c34fba..0516c1c4a 100644 --- a/lib/openai/models/responses/easy_input_message.rb +++ b/lib/openai/models/responses/easy_input_message.rb @@ -34,22 +34,28 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Responses::EasyInputMessage::Type } # @!method initialize(content:, role:, phase: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::EasyInputMessage} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. Messages with the # `assistant` role are presumed to have been generated by the model in previous # interactions. # - # @param content [String, Array] Text, image, or audio input to the model, used to generate a response. + # @param content [String, Array] + # Text, image, or audio input to the model, used to generate a response. Can also + # contain previous assistant responses. # - # @param role [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] The role of the message input. One of `user`, `assistant`, `system`, or + # @param role [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] + # The role of the message input. One of `user`, `assistant`, `system`, or + # `developer`. # - # @param phase [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # @param phase [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. # - # @param type [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type] The type of the message input. Always `message`. + # @param type [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type] + # The type of the message input. Always `message`. # Text, image, or audio input to the model, used to generate a response. Can also # contain previous assistant responses. diff --git a/lib/openai/models/responses/file_search_tool.rb b/lib/openai/models/responses/file_search_tool.rb index 6ac36036f..3a83583e8 100644 --- a/lib/openai/models/responses/file_search_tool.rb +++ b/lib/openai/models/responses/file_search_tool.rb @@ -36,22 +36,25 @@ class FileSearchTool < OpenAI::Internal::Type::BaseModel optional :ranking_options, -> { OpenAI::Responses::FileSearchTool::RankingOptions } # @!method initialize(vector_store_ids:, filters: nil, max_num_results: nil, ranking_options: nil, type: :file_search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::FileSearchTool} for more details. - # # A tool that searches for relevant content from uploaded files. Learn more about # the - # [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). # - # @param vector_store_ids [Array] The IDs of the vector stores to search. + # @param vector_store_ids [Array] + # The IDs of the vector stores to search. # - # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter, nil] A filter to apply. + # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter, nil] + # A filter to apply. # - # @param max_num_results [Integer] The maximum number of results to return. This number should be between 1 and 50 + # @param max_num_results [Integer] + # The maximum number of results to return. This number should be between 1 and 50 + # inclusive. # - # @param ranking_options [OpenAI::Models::Responses::FileSearchTool::RankingOptions] Ranking options for search. + # @param ranking_options [OpenAI::Models::Responses::FileSearchTool::RankingOptions] + # Ranking options for search. # - # @param type [Symbol, :file_search] The type of the file search tool. Always `file_search`. + # @param type [Symbol, :file_search] + # The type of the file search tool. Always `file_search`. # A filter to apply. # @@ -93,16 +96,19 @@ class RankingOptions < OpenAI::Internal::Type::BaseModel optional :score_threshold, Float # @!method initialize(hybrid_search: nil, ranker: nil, score_threshold: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::FileSearchTool::RankingOptions} for more details. - # # Ranking options for search. # - # @param hybrid_search [OpenAI::Models::Responses::FileSearchTool::RankingOptions::HybridSearch] Weights that control how reciprocal rank fusion balances semantic embedding matc + # @param hybrid_search [OpenAI::Models::Responses::FileSearchTool::RankingOptions::HybridSearch] + # Weights that control how reciprocal rank fusion balances semantic embedding + # matches versus sparse keyword matches when hybrid search is enabled. # - # @param ranker [Symbol, OpenAI::Models::Responses::FileSearchTool::RankingOptions::Ranker] The ranker to use for the file search. + # @param ranker [Symbol, OpenAI::Models::Responses::FileSearchTool::RankingOptions::Ranker] + # The ranker to use for the file search. # - # @param score_threshold [Float] The score threshold for the file search, a number between 0 and 1. Numbers close + # @param score_threshold [Float] + # The score threshold for the file search, a number between 0 and 1. Numbers + # closer to 1 will attempt to return only the most relevant results, but may + # return fewer results. # @see OpenAI::Models::Responses::FileSearchTool::RankingOptions#hybrid_search class HybridSearch < OpenAI::Internal::Type::BaseModel @@ -122,9 +128,11 @@ class HybridSearch < OpenAI::Internal::Type::BaseModel # Weights that control how reciprocal rank fusion balances semantic embedding # matches versus sparse keyword matches when hybrid search is enabled. # - # @param embedding_weight [Float] The weight of the embedding in the reciprocal ranking fusion. + # @param embedding_weight [Float] + # The weight of the embedding in the reciprocal ranking fusion. # - # @param text_weight [Float] The weight of the text in the reciprocal ranking fusion. + # @param text_weight [Float] + # The weight of the text in the reciprocal ranking fusion. end # The ranker to use for the file search. diff --git a/lib/openai/models/responses/function_shell_tool.rb b/lib/openai/models/responses/function_shell_tool.rb index e9b2643ae..ac998ce6b 100644 --- a/lib/openai/models/responses/function_shell_tool.rb +++ b/lib/openai/models/responses/function_shell_tool.rb @@ -30,12 +30,13 @@ class FunctionShellTool < OpenAI::Internal::Type::BaseModel # @!method initialize(allowed_callers: nil, environment: nil, type: :shell) # A tool that allows the model to execute shell commands. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # # @param environment [OpenAI::Models::Responses::ContainerAuto, OpenAI::Models::Responses::LocalEnvironment, OpenAI::Models::Responses::ContainerReference, nil] # - # @param type [Symbol, :shell] The type of the shell tool. Always `shell`. - + # @param type [Symbol, :shell] + # The type of the shell tool. Always `shell`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/function_tool.rb b/lib/openai/models/responses/function_tool.rb index 5a743e2ec..a106d5fa1 100644 --- a/lib/openai/models/responses/function_tool.rb +++ b/lib/openai/models/responses/function_tool.rb @@ -71,31 +71,37 @@ class FunctionTool < OpenAI::Internal::Type::BaseModel optional :output_schema, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true # @!method initialize(name:, parameters:, strict:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, output_schema: nil, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::FunctionTool} for more details. - # # Defines a function in your own code the model can choose to call. Learn more # about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. # - # @param parameters [Hash{Symbol=>Object}, nil] A JSON schema object describing the parameters of the function. + # @param parameters [Hash{Symbol=>Object}, nil] + # A JSON schema object describing the parameters of the function. # - # @param strict [Boolean, nil] Whether strict parameter validation is enforced for this function tool. + # @param strict [Boolean, nil] + # Whether strict parameter validation is enforced for this function tool. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # # @param async [Boolean] # - # @param defer_loading [Boolean] Whether this function is deferred and loaded via tool search. + # @param defer_loading [Boolean] + # Whether this function is deferred and loaded via tool search. # - # @param description [String, nil] A description of the function. Used by the model to determine whether or not to + # @param description [String, nil] + # A description of the function. Used by the model to determine whether or not to + # call the function. # - # @param output_schema [Hash{Symbol=>Object}, nil] A JSON schema object describing the JSON value encoded in string outputs for thi + # @param output_schema [Hash{Symbol=>Object}, nil] + # A JSON schema object describing the JSON value encoded in string outputs for + # this function. # - # @param type [Symbol, :function] The type of the function tool. Always `function`. - + # @param type [Symbol, :function] + # The type of the function tool. Always `function`. module AllowedCaller extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/inline_skill.rb b/lib/openai/models/responses/inline_skill.rb index 25ff2380a..8009ec869 100644 --- a/lib/openai/models/responses/inline_skill.rb +++ b/lib/openai/models/responses/inline_skill.rb @@ -29,13 +29,17 @@ class InlineSkill < OpenAI::Internal::Type::BaseModel required :type, const: :inline # @!method initialize(description:, name:, source:, type: :inline) - # @param description [String] The description of the skill. + # @param description [String] + # The description of the skill. # - # @param name [String] The name of the skill. + # @param name [String] + # The name of the skill. # - # @param source [OpenAI::Models::Responses::InlineSkillSource] Inline skill payload + # @param source [OpenAI::Models::Responses::InlineSkillSource] + # Inline skill payload # - # @param type [Symbol, :inline] Defines an inline skill for this request. + # @param type [Symbol, :inline] + # Defines an inline skill for this request. end end end diff --git a/lib/openai/models/responses/inline_skill_source.rb b/lib/openai/models/responses/inline_skill_source.rb index bdf4d7000..3d2881879 100644 --- a/lib/openai/models/responses/inline_skill_source.rb +++ b/lib/openai/models/responses/inline_skill_source.rb @@ -25,11 +25,14 @@ class InlineSkillSource < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, media_type: :"application/zip", type: :base64) # Inline skill payload # - # @param data [String] Base64-encoded skill zip bundle. + # @param data [String] + # Base64-encoded skill zip bundle. # - # @param media_type [Symbol, :"application/zip"] The media type of the inline skill payload. Must be `application/zip`. + # @param media_type [Symbol, :"application/zip"] + # The media type of the inline skill payload. Must be `application/zip`. # - # @param type [Symbol, :base64] The type of the inline skill source. Must be `base64`. + # @param type [Symbol, :base64] + # The type of the inline skill source. Must be `base64`. end end end diff --git a/lib/openai/models/responses/input_item_list_params.rb b/lib/openai/models/responses/input_item_list_params.rb index eb2605f33..f0a5ebaae 100644 --- a/lib/openai/models/responses/input_item_list_params.rb +++ b/lib/openai/models/responses/input_item_list_params.rb @@ -43,18 +43,24 @@ class InputItemListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::Responses::InputItemListParams::Order } # @!method initialize(response_id:, after: nil, include: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::InputItemListParams} for more details. - # # @param response_id [String] # - # @param after [String] An item ID to list items after, used in pagination. + # @param after [String] + # An item ID to list items after, used in pagination. + # + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between + # @param order [Symbol, OpenAI::Models::Responses::InputItemListParams::Order] + # The order to return the input items in. Default is `desc`. # - # @param order [Symbol, OpenAI::Models::Responses::InputItemListParams::Order] The order to return the input items in. Default is `desc`. + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/responses/input_token_count_params.rb b/lib/openai/models/responses/input_token_count_params.rb index fb94d62bd..2e979fab7 100644 --- a/lib/openai/models/responses/input_token_count_params.rb +++ b/lib/openai/models/responses/input_token_count_params.rb @@ -42,8 +42,8 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, nil] optional :model, String, nil?: true @@ -65,7 +65,7 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -73,7 +73,7 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Reasoning, nil] optional :reasoning, -> { OpenAI::Reasoning }, nil?: true @@ -82,8 +82,8 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] optional :text, -> { OpenAI::Responses::InputTokenCountParams::Text }, nil?: true @@ -114,32 +114,66 @@ class InputTokenCountParams < OpenAI::Internal::Type::BaseModel optional :truncation, enum: -> { OpenAI::Responses::InputTokenCountParams::Truncation } # @!method initialize(conversation: nil, input: nil, instructions: nil, model: nil, parallel_tool_calls: nil, personality: nil, previous_response_id: nil, reasoning: nil, text: nil, tool_choice: nil, tools: nil, truncation: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::InputTokenCountParams} for more details. + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. + # @param model [String, nil] + # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a + # wide range of models with different capabilities, performance characteristics, + # and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param model [String, nil] Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a w + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. + # @param personality [String, Symbol, OpenAI::Models::Responses::InputTokenCountParams::Personality] + # A model-owned style preset to apply to this request. Omit this parameter to use + # the model's default style. Supported values may expand over time. Values must be + # at most 64 characters. # - # @param personality [String, Symbol, OpenAI::Models::Responses::InputTokenCountParams::Personality] A model-owned style preset to apply to this request. Omit this parameter to use + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu + # @param reasoning [OpenAI::Models::Reasoning, nil] + # **gpt-5 and o-series models only** Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # - # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** Configuration options for [reasoning models]( + # @param text [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: # - # @param text [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] Configuration options for a text response from the model. Can be plain + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::InputTokenCountParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] Controls which tool the model should use, if any. + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::InputTokenCountParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] + # Controls which tool the model should use, if any. # - # @param tools [Array, nil] An array of tools the model may call while generating a response. You can specif + # @param tools [Array, nil] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. # - # @param truncation [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Truncation] The truncation strategy to use for the model response. - `auto`: If the input to + # @param truncation [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Truncation] + # The truncation strategy to use for the model response. - `auto`: If the input to + # this Response exceeds the model's context window size, the model will truncate + # the response to fit the context window by dropping items from the beginning of + # the conversation. - `disabled` (default): If the input size will exceed the + # context window size for a model, the request will fail with a 400 error. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -210,7 +244,7 @@ class Text < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -239,18 +273,32 @@ class Text < OpenAI::Internal::Type::BaseModel ) # @!method initialize(format_: nil, verbosity: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::InputTokenCountParams::Text} for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. # - # @param verbosity [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Text::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in + # @param verbosity [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Text::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose @@ -288,7 +336,7 @@ module ToolChoice variant -> { OpenAI::Responses::ToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Responses::ToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -316,7 +364,8 @@ class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/responses/local_environment.rb b/lib/openai/models/responses/local_environment.rb index e971843cb..cdadef42a 100644 --- a/lib/openai/models/responses/local_environment.rb +++ b/lib/openai/models/responses/local_environment.rb @@ -17,9 +17,11 @@ class LocalEnvironment < OpenAI::Internal::Type::BaseModel optional :skills, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::LocalSkill] } # @!method initialize(skills: nil, type: :local) - # @param skills [Array] An optional list of skills. + # @param skills [Array] + # An optional list of skills. # - # @param type [Symbol, :local] Use a local computer environment. + # @param type [Symbol, :local] + # Use a local computer environment. end end end diff --git a/lib/openai/models/responses/local_skill.rb b/lib/openai/models/responses/local_skill.rb index 299d5d04e..95d714a26 100644 --- a/lib/openai/models/responses/local_skill.rb +++ b/lib/openai/models/responses/local_skill.rb @@ -23,11 +23,14 @@ class LocalSkill < OpenAI::Internal::Type::BaseModel required :path, String # @!method initialize(description:, name:, path:) - # @param description [String] The description of the skill. + # @param description [String] + # The description of the skill. # - # @param name [String] The name of the skill. + # @param name [String] + # The name of the skill. # - # @param path [String] The path to the directory containing the skill. + # @param path [String] + # The path to the directory containing the skill. end end end diff --git a/lib/openai/models/responses/namespace_tool.rb b/lib/openai/models/responses/namespace_tool.rb index a3ba8d23d..649e837d1 100644 --- a/lib/openai/models/responses/namespace_tool.rb +++ b/lib/openai/models/responses/namespace_tool.rb @@ -31,13 +31,17 @@ class NamespaceTool < OpenAI::Internal::Type::BaseModel # @!method initialize(description:, name:, tools:, type: :namespace) # Groups function/custom tools under a shared namespace. # - # @param description [String] A description of the namespace shown to the model. + # @param description [String] + # A description of the namespace shown to the model. # - # @param name [String] The namespace name used in tool calls (for example, `crm`). + # @param name [String] + # The namespace name used in tool calls (for example, `crm`). # - # @param tools [Array] The function/custom tools available inside this namespace. + # @param tools [Array] + # The function/custom tools available inside this namespace. # - # @param type [Symbol, :namespace] The type of the tool. Always `namespace`. + # @param type [Symbol, :namespace] + # The type of the tool. Always `namespace`. # A function or custom tool that belongs to a namespace. module Tool @@ -47,7 +51,7 @@ module Tool variant :function, -> { OpenAI::Responses::NamespaceTool::Tool::Function } - # A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) variant :custom, -> { OpenAI::Responses::CustomTool } class Function < OpenAI::Internal::Type::BaseModel @@ -116,24 +120,30 @@ class Function < OpenAI::Internal::Type::BaseModel optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, allowed_callers: nil, async: nil, defer_loading: nil, description: nil, output_schema: nil, parameters: nil, strict: nil, type: :function) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::NamespaceTool::Tool::Function} for more details. - # # @param name [String] # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param async [Boolean] Whether the tool response can be returned asynchronously versus immediately retu + # @param async [Boolean] + # Whether the tool response can be returned asynchronously versus immediately + # returned on next response creation. # - # @param defer_loading [Boolean] Whether this function should be deferred and discovered via tool search. + # @param defer_loading [Boolean] + # Whether this function should be deferred and discovered via tool search. # # @param description [String, nil] # - # @param output_schema [Hash{Symbol=>Object}, nil] A JSON Schema describing the JSON value encoded in string outputs for this funct + # @param output_schema [Hash{Symbol=>Object}, nil] + # A JSON Schema describing the JSON value encoded in string outputs for this + # function tool. This does not describe content-array outputs. # # @param parameters [Object, nil] # - # @param strict [Boolean, nil] Whether to enforce strict parameter validation. If omitted, Responses attempts t + # @param strict [Boolean, nil] + # Whether to enforce strict parameter validation. If omitted, Responses attempts + # to use strict validation when the schema is compatible, and falls back to + # non-strict validation otherwise. # # @param type [Symbol, :function] diff --git a/lib/openai/models/responses/response.rb b/lib/openai/models/responses/response.rb index 17de0239c..bde314d76 100644 --- a/lib/openai/models/responses/response.rb +++ b/lib/openai/models/responses/response.rb @@ -56,8 +56,8 @@ class Response < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] required :model, union: -> { OpenAI::ResponsesModel } @@ -111,17 +111,18 @@ class Response < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array] @@ -139,7 +140,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -161,7 +162,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -185,7 +186,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -193,7 +194,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -207,7 +208,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -227,7 +228,7 @@ class Response < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -249,7 +250,7 @@ class Response < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Reasoning, nil] optional :reasoning, -> { OpenAI::Reasoning }, nil?: true @@ -260,7 +261,7 @@ class Response < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -273,13 +274,15 @@ class Response < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -305,8 +308,8 @@ class Response < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Responses::ResponseTextConfig, nil] optional :text, -> { OpenAI::Responses::ResponseTextConfig } @@ -345,7 +348,7 @@ class Response < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String @@ -372,78 +375,238 @@ def output_text end # @!method initialize(id:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Response} for more details. - # - # @param id [String] Unique identifier for this Response. - # - # @param created_at [Float] Unix timestamp (in seconds) of when this Response was created. - # - # @param error [OpenAI::Models::Responses::ResponseError, nil] An error object returned when the model fails to generate a Response. - # - # @param incomplete_details [OpenAI::Models::Responses::Response::IncompleteDetails, nil] Details about why the response is incomplete. - # - # @param instructions [String, Array, nil] A system (or developer) message inserted into the model's context. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param output [Array] An array of content items generated by the model. - # - # @param parallel_tool_calls [Boolean] Whether to allow the model to run tool calls in parallel. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::Response::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param completed_at [Float, nil] Unix timestamp (in seconds) of when this Response was completed. - # - # @param conversation [OpenAI::Models::Responses::Response::Conversation, nil] The conversation that this response belonged to. Input items and output items fr - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param moderation [OpenAI::Models::Responses::Response::Moderation, nil] Moderation results for the response input and output, if moderated completions w - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_diagnostics [OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::Unavailable] Prompt cache diagnostics requested for this response. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::Response::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::Response::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::Response::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param status [Symbol, OpenAI::Models::Responses::ResponseStatus] The status of the response generation. One of `completed`, `failed`, - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param truncation [Symbol, OpenAI::Models::Responses::Response::Truncation, nil] The truncation strategy to use for the model response. - # - # @param usage [OpenAI::Models::Responses::ResponseUsage] Represents token usage details including input tokens, output tokens, - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param object [Symbol, :response] The object type of this resource - always set to `response`. + # @param id [String] + # Unique identifier for this Response. + # + # @param created_at [Float] + # Unix timestamp (in seconds) of when this Response was created. + # + # @param error [OpenAI::Models::Responses::ResponseError, nil] + # An error object returned when the model fails to generate a Response. + # + # @param incomplete_details [OpenAI::Models::Responses::Response::IncompleteDetails, nil] + # Details about why the response is incomplete. + # + # @param instructions [String, Array, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param output [Array] + # An array of content items generated by the model. + # + # - The length and order of items in the `output` array is dependent on the + # model's response. + # - Rather than accessing the first item in the `output` array and assuming it's + # an `assistant` message with the content generated by the model, you might + # consider using the `output_text` property where supported in SDKs. + # + # @param parallel_tool_calls [Boolean] + # Whether to allow the model to run tool calls in parallel. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::Response::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param completed_at [Float, nil] + # Unix timestamp (in seconds) of when this Response was completed. Only present + # when the status is `completed`. + # + # @param conversation [OpenAI::Models::Responses::Response::Conversation, nil] + # The conversation that this response belonged to. Input items and output items + # from this response were automatically added to this conversation. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param moderation [OpenAI::Models::Responses::Response::Moderation, nil] + # Moderation results for the response input and output, if moderated completions + # were requested. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_diagnostics [OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheHit, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::ComparisonResponseNotFound, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::Unavailable] + # Prompt cache diagnostics requested for this response. + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Responses::Response::PromptCacheOptions] + # The prompt-caching options that were applied to the response. Supported for + # `gpt-5.6` and later models. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::Response::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Responses::Response::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param status [Symbol, OpenAI::Models::Responses::ResponseStatus] + # The status of the response generation. One of `completed`, `failed`, + # `in_progress`, `cancelled`, `queued`, or `incomplete`. + # + # @param text [OpenAI::Models::Responses::ResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param truncation [Symbol, OpenAI::Models::Responses::Response::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param usage [OpenAI::Models::Responses::ResponseUsage] + # Represents token usage details including input tokens, output tokens, a + # breakdown of output tokens, and the total tokens used. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param object [Symbol, :response] + # The object type of this resource - always set to `response`. # @see OpenAI::Models::Responses::Response#incomplete_details class IncompleteDetails < OpenAI::Internal::Type::BaseModel @@ -456,12 +619,12 @@ class IncompleteDetails < OpenAI::Internal::Type::BaseModel optional :reason, enum: -> { OpenAI::Responses::Response::IncompleteDetails::Reason } # @!method initialize(reason: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Response::IncompleteDetails} for more details. - # # Details about why the response is incomplete. # - # @param reason [Symbol, OpenAI::Models::Responses::Response::IncompleteDetails::Reason] The reason why the response is incomplete. `steered` means + # @param reason [Symbol, OpenAI::Models::Responses::Response::IncompleteDetails::Reason] + # The reason why the response is incomplete. `steered` means the response stopped + # at a safe output boundary after a WebSocket `response.steer` event. The server + # can then create a successor response automatically with the queued input. # The reason why the response is incomplete. `steered` means the response stopped # at a safe output boundary after a WebSocket `response.steer` event. The server @@ -528,7 +691,7 @@ module ToolChoice variant -> { OpenAI::Responses::ToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Responses::ToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -556,7 +719,8 @@ class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants @@ -575,7 +739,8 @@ class Conversation < OpenAI::Internal::Type::BaseModel # The conversation that this response belonged to. Input items and output items # from this response were automatically added to this conversation. # - # @param id [String] The unique ID of the conversation that this response was associated with. + # @param id [String] + # The unique ID of the conversation that this response was associated with. end # @see OpenAI::Models::Responses::Response#moderation @@ -596,9 +761,11 @@ class Moderation < OpenAI::Internal::Type::BaseModel # Moderation results for the response input and output, if moderated completions # were requested. # - # @param input [OpenAI::Models::Responses::Response::Moderation::Input::ModerationResult, OpenAI::Models::Responses::Response::Moderation::Input::Error] Moderation for the response input. + # @param input [OpenAI::Models::Responses::Response::Moderation::Input::ModerationResult, OpenAI::Models::Responses::Response::Moderation::Input::Error] + # Moderation for the response input. # - # @param output [OpenAI::Models::Responses::Response::Moderation::Output::ModerationResult, OpenAI::Models::Responses::Response::Moderation::Output::Error] Moderation for the response output. + # @param output [OpenAI::Models::Responses::Response::Moderation::Output::ModerationResult, OpenAI::Models::Responses::Response::Moderation::Output::Error] + # Moderation for the response output. # Moderation for the response input. # @@ -663,24 +830,27 @@ class ModerationResult < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Response::Moderation::Input::ModerationResult} for - # more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -714,11 +884,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation for the response input or output. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which was always `error` for moderation failures. + # @param type [Symbol, :error] + # The object type, which was always `error` for moderation failures. end # @!method self.variants @@ -788,24 +961,27 @@ class ModerationResult < OpenAI::Internal::Type::BaseModel required :type, const: :moderation_result # @!method initialize(categories:, category_applied_input_types:, category_scores:, flagged:, model:, type: :moderation_result) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Response::Moderation::Output::ModerationResult} for - # more details. - # # A moderation result produced for the response input or output. # - # @param categories [Hash{Symbol=>Boolean}] A dictionary of moderation categories to booleans, True if the input is flagged + # @param categories [Hash{Symbol=>Boolean}] + # A dictionary of moderation categories to booleans, True if the input is flagged + # under this category. # - # @param category_applied_input_types [Hash{Symbol=>Array}] Which modalities of input are reflected by the score for each category. + # @param category_applied_input_types [Hash{Symbol=>Array}] + # Which modalities of input are reflected by the score for each category. # - # @param category_scores [Hash{Symbol=>Float}] A dictionary of moderation categories to scores. + # @param category_scores [Hash{Symbol=>Float}] + # A dictionary of moderation categories to scores. # - # @param flagged [Boolean] A boolean indicating whether the content was flagged by any category. + # @param flagged [Boolean] + # A boolean indicating whether the content was flagged by any category. # - # @param model [String] The moderation model that produced this result. + # @param model [String] + # The moderation model that produced this result. # - # @param type [Symbol, :moderation_result] The object type, which was always `moderation_result` for successful moderation - + # @param type [Symbol, :moderation_result] + # The object type, which was always `moderation_result` for successful moderation + # results. module CategoryAppliedInputType extend OpenAI::Internal::Type::Enum @@ -839,11 +1015,14 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, type: :error) # An error produced while attempting moderation for the response input or output. # - # @param code [String] The error code. + # @param code [String] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param type [Symbol, :error] The object type, which was always `error` for moderation failures. + # @param type [Symbol, :error] + # The object type, which was always `error` for moderation failures. end # @!method self.variants @@ -896,15 +1075,15 @@ class CacheMiss < OpenAI::Internal::Type::BaseModel optional :comparison_reusable_tokens, Integer # @!method initialize(cache_missed_tokens:, reason:, comparison_reusable_tokens: nil, type: :cache_miss) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss} for - # more details. - # - # @param cache_missed_tokens [Integer] The estimated number of input tokens affected after the first detected divergenc + # @param cache_missed_tokens [Integer] + # The estimated number of input tokens affected after the first detected + # divergence. # - # @param reason [Symbol, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::Reason] The reason prompt cache reuse did not occur. + # @param reason [Symbol, OpenAI::Models::Responses::Response::PromptCacheDiagnostics::CacheMiss::Reason] + # The reason prompt cache reuse did not occur. # - # @param comparison_reusable_tokens [Integer] The raw token count of the reusable prefix in the compared response. + # @param comparison_reusable_tokens [Integer] + # The raw token count of the reusable prefix in the compared response. # # @param type [Symbol, :cache_miss] @@ -987,11 +1166,14 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # The prompt-caching options that were applied to the response. Supported for # `gpt-5.6` and later models. # - # @param mode [Symbol, OpenAI::Models::Responses::Response::PromptCacheOptions::Mode] Whether implicit prompt-cache breakpoints were enabled. + # @param mode [Symbol, OpenAI::Models::Responses::Response::PromptCacheOptions::Mode] + # Whether implicit prompt-cache breakpoints were enabled. # - # @param ttl [Symbol, OpenAI::Models::Responses::Response::PromptCacheOptions::Ttl] The minimum lifetime applied to each cache breakpoint. + # @param ttl [Symbol, OpenAI::Models::Responses::Response::PromptCacheOptions::Ttl] + # The minimum lifetime applied to each cache breakpoint. # - # @param comparison_response_id [String, nil] The response ID supplied as the prompt cache diagnostics comparison. + # @param comparison_response_id [String, nil] + # The response ID supplied as the prompt cache diagnostics comparison. # Whether implicit prompt-cache breakpoints were enabled. # @@ -1026,7 +1208,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1057,13 +1239,15 @@ module PromptCacheRetention # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/lib/openai/models/responses/response_apply_patch_tool_call.rb b/lib/openai/models/responses/response_apply_patch_tool_call.rb index 4b8475ea9..5bf864de5 100644 --- a/lib/openai/models/responses/response_apply_patch_tool_call.rb +++ b/lib/openai/models/responses/response_apply_patch_tool_call.rb @@ -54,24 +54,30 @@ class ResponseApplyPatchToolCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, operation:, status:, caller_: nil, created_by: nil, type: :apply_patch_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseApplyPatchToolCall} for more details. - # # A tool call that applies file diffs by creating, deleting, or updating files. # - # @param id [String] The unique ID of the apply patch tool call. Populated when this item is returned + # @param id [String] + # The unique ID of the apply patch tool call. Populated when this item is returned + # via API. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param operation [OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::CreateFile, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::DeleteFile, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::UpdateFile] One of the create_file, delete_file, or update_file operations applied via apply + # @param operation [OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::CreateFile, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::DeleteFile, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::UpdateFile] + # One of the create_file, delete_file, or update_file operations applied via + # apply_patch. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Status] The status of the apply patch tool call. One of `in_progress` or `completed`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Status] + # The status of the apply patch tool call. One of `in_progress` or `completed`. # - # @param caller_ [OpenAI::Models::Responses::ResponseApplyPatchToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseApplyPatchToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call. + # @param created_by [String] + # The ID of the entity that created this tool call. # - # @param type [Symbol, :apply_patch_call] The type of the item. Always `apply_patch_call`. + # @param type [Symbol, :apply_patch_call] + # The type of the item. Always `apply_patch_call`. # One of the create_file, delete_file, or update_file operations applied via # apply_patch. @@ -113,11 +119,14 @@ class CreateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :create_file) # Instruction describing how to create a file via the apply_patch tool. # - # @param diff [String] Diff to apply. + # @param diff [String] + # Diff to apply. # - # @param path [String] Path of the file to create. + # @param path [String] + # Path of the file to create. # - # @param type [Symbol, :create_file] Create a new file with the provided diff. + # @param type [Symbol, :create_file] + # Create a new file with the provided diff. end class DeleteFile < OpenAI::Internal::Type::BaseModel @@ -136,9 +145,11 @@ class DeleteFile < OpenAI::Internal::Type::BaseModel # @!method initialize(path:, type: :delete_file) # Instruction describing how to delete a file via the apply_patch tool. # - # @param path [String] Path of the file to delete. + # @param path [String] + # Path of the file to delete. # - # @param type [Symbol, :delete_file] Delete the specified file. + # @param type [Symbol, :delete_file] + # Delete the specified file. end class UpdateFile < OpenAI::Internal::Type::BaseModel @@ -163,11 +174,14 @@ class UpdateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :update_file) # Instruction describing how to update a file via the apply_patch tool. # - # @param diff [String] Diff to apply. + # @param diff [String] + # Diff to apply. # - # @param path [String] Path of the file to update. + # @param path [String] + # Path of the file to update. # - # @param type [Symbol, :update_file] Update an existing file with the provided diff. + # @param type [Symbol, :update_file] + # Update an existing file with the provided diff. end # @!method self.variants @@ -222,7 +236,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_apply_patch_tool_call_output.rb b/lib/openai/models/responses/response_apply_patch_tool_call_output.rb index a6a733338..e81076378 100644 --- a/lib/openai/models/responses/response_apply_patch_tool_call_output.rb +++ b/lib/openai/models/responses/response_apply_patch_tool_call_output.rb @@ -53,24 +53,29 @@ class ResponseApplyPatchToolCallOutput < OpenAI::Internal::Type::BaseModel optional :output, String, nil?: true # @!method initialize(id:, call_id:, status:, caller_: nil, created_by: nil, output: nil, type: :apply_patch_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput} for more details. - # # The output emitted by an apply patch tool call. # - # @param id [String] The unique ID of the apply patch tool call output. Populated when this item is r + # @param id [String] + # The unique ID of the apply patch tool call output. Populated when this item is + # returned via API. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Status] The status of the apply patch tool call output. One of `completed` or `failed`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Status] + # The status of the apply patch tool call output. One of `completed` or `failed`. # - # @param caller_ [OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call output. + # @param created_by [String] + # The ID of the entity that created this tool call output. # - # @param output [String, nil] Optional textual output returned by the apply patch tool. + # @param output [String, nil] + # Optional textual output returned by the apply patch tool. # - # @param type [Symbol, :apply_patch_call_output] The type of the item. Always `apply_patch_call_output`. + # @param type [Symbol, :apply_patch_call_output] + # The type of the item. Always `apply_patch_call_output`. # The status of the apply patch tool call output. One of `completed` or `failed`. # @@ -120,7 +125,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_audio_delta_event.rb b/lib/openai/models/responses/response_audio_delta_event.rb index 07ecdb3da..c8f5e1f8f 100644 --- a/lib/openai/models/responses/response_audio_delta_event.rb +++ b/lib/openai/models/responses/response_audio_delta_event.rb @@ -23,16 +23,16 @@ class ResponseAudioDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.audio.delta" # @!method initialize(delta:, sequence_number:, type: :"response.audio.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseAudioDeltaEvent} for more details. - # # Emitted when there is a partial audio response. # - # @param delta [String] A chunk of Base64 encoded response audio bytes. + # @param delta [String] + # A chunk of Base64 encoded response audio bytes. # - # @param sequence_number [Integer] A sequence number for this chunk of the stream response. + # @param sequence_number [Integer] + # A sequence number for this chunk of the stream response. # - # @param type [Symbol, :"response.audio.delta"] The type of the event. Always `response.audio.delta`. + # @param type [Symbol, :"response.audio.delta"] + # The type of the event. Always `response.audio.delta`. end end end diff --git a/lib/openai/models/responses/response_audio_done_event.rb b/lib/openai/models/responses/response_audio_done_event.rb index c40cf77a5..cc3434294 100644 --- a/lib/openai/models/responses/response_audio_done_event.rb +++ b/lib/openai/models/responses/response_audio_done_event.rb @@ -17,14 +17,13 @@ class ResponseAudioDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.audio.done" # @!method initialize(sequence_number:, type: :"response.audio.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseAudioDoneEvent} for more details. - # # Emitted when the audio response is complete. # - # @param sequence_number [Integer] The sequence number of the delta. + # @param sequence_number [Integer] + # The sequence number of the delta. # - # @param type [Symbol, :"response.audio.done"] The type of the event. Always `response.audio.done`. + # @param type [Symbol, :"response.audio.done"] + # The type of the event. Always `response.audio.done`. end end end diff --git a/lib/openai/models/responses/response_audio_transcript_delta_event.rb b/lib/openai/models/responses/response_audio_transcript_delta_event.rb index 96372cc0d..5d0f9fd5c 100644 --- a/lib/openai/models/responses/response_audio_transcript_delta_event.rb +++ b/lib/openai/models/responses/response_audio_transcript_delta_event.rb @@ -23,16 +23,16 @@ class ResponseAudioTranscriptDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.audio.transcript.delta" # @!method initialize(delta:, sequence_number:, type: :"response.audio.transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseAudioTranscriptDeltaEvent} for more details. - # # Emitted when there is a partial transcript of audio. # - # @param delta [String] The partial transcript of the audio response. + # @param delta [String] + # The partial transcript of the audio response. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.audio.transcript.delta"] The type of the event. Always `response.audio.transcript.delta`. + # @param type [Symbol, :"response.audio.transcript.delta"] + # The type of the event. Always `response.audio.transcript.delta`. end end end diff --git a/lib/openai/models/responses/response_audio_transcript_done_event.rb b/lib/openai/models/responses/response_audio_transcript_done_event.rb index 9e0d38b94..198fe1031 100644 --- a/lib/openai/models/responses/response_audio_transcript_done_event.rb +++ b/lib/openai/models/responses/response_audio_transcript_done_event.rb @@ -17,14 +17,13 @@ class ResponseAudioTranscriptDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.audio.transcript.done" # @!method initialize(sequence_number:, type: :"response.audio.transcript.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseAudioTranscriptDoneEvent} for more details. - # # Emitted when the full audio transcript is completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.audio.transcript.done"] The type of the event. Always `response.audio.transcript.done`. + # @param type [Symbol, :"response.audio.transcript.done"] + # The type of the event. Always `response.audio.transcript.done`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_call_code_delta_event.rb b/lib/openai/models/responses/response_code_interpreter_call_code_delta_event.rb index 60f1568ad..8bbb8b2f6 100644 --- a/lib/openai/models/responses/response_code_interpreter_call_code_delta_event.rb +++ b/lib/openai/models/responses/response_code_interpreter_call_code_delta_event.rb @@ -36,21 +36,23 @@ class ResponseCodeInterpreterCallCodeDeltaEvent < OpenAI::Internal::Type::BaseMo required :type, const: :"response.code_interpreter_call_code.delta" # @!method initialize(delta:, item_id:, output_index:, sequence_number:, type: :"response.code_interpreter_call_code.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCodeInterpreterCallCodeDeltaEvent} for more - # details. - # # Emitted when a partial code snippet is streamed by the code interpreter. # - # @param delta [String] The partial code snippet being streamed by the code interpreter. + # @param delta [String] + # The partial code snippet being streamed by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is being streame + # @param output_index [Integer] + # The index of the output item in the response for which the code is being + # streamed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param type [Symbol, :"response.code_interpreter_call_code.delta"] The type of the event. Always `response.code_interpreter_call_code.delta`. + # @param type [Symbol, :"response.code_interpreter_call_code.delta"] + # The type of the event. Always `response.code_interpreter_call_code.delta`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_call_code_done_event.rb b/lib/openai/models/responses/response_code_interpreter_call_code_done_event.rb index d6b47e895..b6389c8a0 100644 --- a/lib/openai/models/responses/response_code_interpreter_call_code_done_event.rb +++ b/lib/openai/models/responses/response_code_interpreter_call_code_done_event.rb @@ -37,15 +37,20 @@ class ResponseCodeInterpreterCallCodeDoneEvent < OpenAI::Internal::Type::BaseMod # @!method initialize(code:, item_id:, output_index:, sequence_number:, type: :"response.code_interpreter_call_code.done") # Emitted when the code snippet is finalized by the code interpreter. # - # @param code [String] The final code snippet output by the code interpreter. + # @param code [String] + # The final code snippet output by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is finalized. + # @param output_index [Integer] + # The index of the output item in the response for which the code is finalized. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param type [Symbol, :"response.code_interpreter_call_code.done"] The type of the event. Always `response.code_interpreter_call_code.done`. + # @param type [Symbol, :"response.code_interpreter_call_code.done"] + # The type of the event. Always `response.code_interpreter_call_code.done`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_call_completed_event.rb b/lib/openai/models/responses/response_code_interpreter_call_completed_event.rb index 20224ecaf..ab56a6218 100644 --- a/lib/openai/models/responses/response_code_interpreter_call_completed_event.rb +++ b/lib/openai/models/responses/response_code_interpreter_call_completed_event.rb @@ -30,19 +30,20 @@ class ResponseCodeInterpreterCallCompletedEvent < OpenAI::Internal::Type::BaseMo required :type, const: :"response.code_interpreter_call.completed" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.code_interpreter_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCodeInterpreterCallCompletedEvent} for more - # details. - # # Emitted when the code interpreter call is completed. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is completed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param type [Symbol, :"response.code_interpreter_call.completed"] The type of the event. Always `response.code_interpreter_call.completed`. + # @param type [Symbol, :"response.code_interpreter_call.completed"] + # The type of the event. Always `response.code_interpreter_call.completed`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_call_in_progress_event.rb b/lib/openai/models/responses/response_code_interpreter_call_in_progress_event.rb index ff821153e..292ef6f69 100644 --- a/lib/openai/models/responses/response_code_interpreter_call_in_progress_event.rb +++ b/lib/openai/models/responses/response_code_interpreter_call_in_progress_event.rb @@ -30,19 +30,20 @@ class ResponseCodeInterpreterCallInProgressEvent < OpenAI::Internal::Type::BaseM required :type, const: :"response.code_interpreter_call.in_progress" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.code_interpreter_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCodeInterpreterCallInProgressEvent} for more - # details. - # # Emitted when a code interpreter call is in progress. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is in progress. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param type [Symbol, :"response.code_interpreter_call.in_progress"] The type of the event. Always `response.code_interpreter_call.in_progress`. + # @param type [Symbol, :"response.code_interpreter_call.in_progress"] + # The type of the event. Always `response.code_interpreter_call.in_progress`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_call_interpreting_event.rb b/lib/openai/models/responses/response_code_interpreter_call_interpreting_event.rb index 0000a542e..925fd141c 100644 --- a/lib/openai/models/responses/response_code_interpreter_call_interpreting_event.rb +++ b/lib/openai/models/responses/response_code_interpreter_call_interpreting_event.rb @@ -30,19 +30,20 @@ class ResponseCodeInterpreterCallInterpretingEvent < OpenAI::Internal::Type::Bas required :type, const: :"response.code_interpreter_call.interpreting" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.code_interpreter_call.interpreting") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCodeInterpreterCallInterpretingEvent} for - # more details. - # # Emitted when the code interpreter is actively interpreting the code snippet. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter is i + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter is + # interpreting code. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param type [Symbol, :"response.code_interpreter_call.interpreting"] The type of the event. Always `response.code_interpreter_call.interpreting`. + # @param type [Symbol, :"response.code_interpreter_call.interpreting"] + # The type of the event. Always `response.code_interpreter_call.interpreting`. end end end diff --git a/lib/openai/models/responses/response_code_interpreter_tool_call.rb b/lib/openai/models/responses/response_code_interpreter_tool_call.rb index 57d309a44..a05d60ee9 100644 --- a/lib/openai/models/responses/response_code_interpreter_tool_call.rb +++ b/lib/openai/models/responses/response_code_interpreter_tool_call.rb @@ -49,22 +49,27 @@ class ResponseCodeInterpreterToolCall < OpenAI::Internal::Type::BaseModel required :type, const: :code_interpreter_call # @!method initialize(id:, code:, container_id:, outputs:, status:, type: :code_interpreter_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCodeInterpreterToolCall} for more details. - # # A tool call to run code. # - # @param id [String] The unique ID of the code interpreter tool call. + # @param id [String] + # The unique ID of the code interpreter tool call. # - # @param code [String, nil] The code to run, or null if not available. + # @param code [String, nil] + # The code to run, or null if not available. # - # @param container_id [String] The ID of the container used to run the code. + # @param container_id [String] + # The ID of the container used to run the code. # - # @param outputs [Array, nil] The outputs generated by the code interpreter, such as logs or images. + # @param outputs [Array, nil] + # The outputs generated by the code interpreter, such as logs or images. Can be + # null if no outputs are available. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::Status] The status of the code interpreter tool call. Valid values are `in_progress`, `c + # @param status [Symbol, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall::Status] + # The status of the code interpreter tool call. Valid values are `in_progress`, + # `completed`, `incomplete`, `interpreting`, and `failed`. # - # @param type [Symbol, :code_interpreter_call] The type of the code interpreter tool call. Always `code_interpreter_call`. + # @param type [Symbol, :code_interpreter_call] + # The type of the code interpreter tool call. Always `code_interpreter_call`. # The logs output from the code interpreter. module Output @@ -94,9 +99,11 @@ class Logs < OpenAI::Internal::Type::BaseModel # @!method initialize(logs:, type: :logs) # The logs output from the code interpreter. # - # @param logs [String] The logs output from the code interpreter. + # @param logs [String] + # The logs output from the code interpreter. # - # @param type [Symbol, :logs] The type of the output. Always `logs`. + # @param type [Symbol, :logs] + # The type of the output. Always `logs`. end class Image < OpenAI::Internal::Type::BaseModel @@ -115,9 +122,11 @@ class Image < OpenAI::Internal::Type::BaseModel # @!method initialize(url:, type: :image) # The image output from the code interpreter. # - # @param url [String] The URL of the image output from the code interpreter. + # @param url [String] + # The URL of the image output from the code interpreter. # - # @param type [Symbol, :image] The type of the output. Always `image`. + # @param type [Symbol, :image] + # The type of the output. Always `image`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_compact_params.rb b/lib/openai/models/responses/response_compact_params.rb index dab27dee0..6544e6a98 100644 --- a/lib/openai/models/responses/response_compact_params.rb +++ b/lib/openai/models/responses/response_compact_params.rb @@ -12,8 +12,8 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] required :model, union: -> { OpenAI::Responses::ResponseCompactParams::Model }, nil?: true @@ -36,7 +36,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -56,7 +56,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions, nil] @@ -84,48 +84,86 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. # # @return [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] optional :service_tier, enum: -> { OpenAI::Responses::ResponseCompactParams::ServiceTier }, nil?: true # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCompactParams} for more details. + # @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu + # @param prompt_cache_key [String, nil] + # A key to use when reading from or writing to the prompt cache. # - # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. + # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions, nil] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions, nil] Options for prompt caching. Supported for `gpt-5.6` and later models. By default + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] + # How long to retain a prompt cache entry created by this request. # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request. - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto' + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. - 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'. - + # If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -509,10 +547,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel optional :ttl, enum: -> { OpenAI::Responses::ResponseCompactParams::PromptCacheOptions::Ttl } # @!method initialize(mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions} for more - # details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -520,12 +554,21 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param mode [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -578,17 +621,17 @@ module PromptCacheRetention # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. module ServiceTier extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/response_compaction_item.rb b/lib/openai/models/responses/response_compaction_item.rb index 0e18253da..3b74c3020 100644 --- a/lib/openai/models/responses/response_compaction_item.rb +++ b/lib/openai/models/responses/response_compaction_item.rb @@ -30,15 +30,19 @@ class ResponseCompactionItem < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, encrypted_content:, created_by: nil, type: :compaction) # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). # - # @param id [String] The unique ID of the compaction item. + # @param id [String] + # The unique ID of the compaction item. # - # @param encrypted_content [String] The encrypted content that was produced by compaction. + # @param encrypted_content [String] + # The encrypted content that was produced by compaction. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :compaction] The type of the item. Always `compaction`. + # @param type [Symbol, :compaction] + # The type of the item. Always `compaction`. end end end diff --git a/lib/openai/models/responses/response_compaction_item_param.rb b/lib/openai/models/responses/response_compaction_item_param.rb index 7676b035f..8a299b7d8 100644 --- a/lib/openai/models/responses/response_compaction_item_param.rb +++ b/lib/openai/models/responses/response_compaction_item_param.rb @@ -24,13 +24,16 @@ class ResponseCompactionItemParam < OpenAI::Internal::Type::BaseModel # @!method initialize(encrypted_content:, id: nil, type: :compaction) # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). # - # @param encrypted_content [String] The encrypted content of the compaction summary. + # @param encrypted_content [String] + # The encrypted content of the compaction summary. # - # @param id [String, nil] The ID of the compaction item. + # @param id [String, nil] + # The ID of the compaction item. # - # @param type [Symbol, :compaction] The type of the item. Always `compaction`. + # @param type [Symbol, :compaction] + # The type of the item. Always `compaction`. end end end diff --git a/lib/openai/models/responses/response_completed_event.rb b/lib/openai/models/responses/response_completed_event.rb index 37e03c759..7ab5b82a3 100644 --- a/lib/openai/models/responses/response_completed_event.rb +++ b/lib/openai/models/responses/response_completed_event.rb @@ -23,16 +23,16 @@ class ResponseCompletedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.completed" # @!method initialize(response:, sequence_number:, type: :"response.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCompletedEvent} for more details. - # # Emitted when the model response is complete. # - # @param response [OpenAI::Models::Responses::Response] Properties of the completed response. + # @param response [OpenAI::Models::Responses::Response] + # Properties of the completed response. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param type [Symbol, :"response.completed"] The type of the event. Always `response.completed`. + # @param type [Symbol, :"response.completed"] + # The type of the event. Always `response.completed`. end end end diff --git a/lib/openai/models/responses/response_computer_tool_call.rb b/lib/openai/models/responses/response_computer_tool_call.rb index 0cdbb81e9..9641bfecb 100644 --- a/lib/openai/models/responses/response_computer_tool_call.rb +++ b/lib/openai/models/responses/response_computer_tool_call.rb @@ -52,27 +52,32 @@ class ResponseComputerToolCall < OpenAI::Internal::Type::BaseModel optional :actions, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ComputerAction] } # @!method initialize(id:, call_id:, pending_safety_checks:, status:, type:, action: nil, actions: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall} for more details. - # # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) # for more information. # - # @param id [String] The unique ID of the computer call. + # @param id [String] + # The unique ID of the computer call. # - # @param call_id [String] An identifier used when responding to the tool call with output. + # @param call_id [String] + # An identifier used when responding to the tool call with output. # - # @param pending_safety_checks [Array] The pending safety checks for the computer call. + # @param pending_safety_checks [Array] + # The pending safety checks for the computer call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Type] The type of the computer call. Always `computer_call`. + # @param type [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Type] + # The type of the computer call. Always `computer_call`. # - # @param action [OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click, OpenAI::Models::Responses::ResponseComputerToolCall::Action::DoubleClick, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Keypress, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Move, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Screenshot, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Scroll, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Type, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Wait] A click action. + # @param action [OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click, OpenAI::Models::Responses::ResponseComputerToolCall::Action::DoubleClick, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Keypress, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Move, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Screenshot, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Scroll, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Type, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Wait] + # A click action. # - # @param actions [Array] Flattened batched actions for `computer_use`. Each action includes an - + # @param actions [Array] + # Flattened batched actions for `computer_use`. Each action includes an `type` + # discriminator and action-specific fields. class PendingSafetyCheck < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the pending safety check. @@ -95,11 +100,14 @@ class PendingSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. @@ -197,21 +205,23 @@ class Click < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(button:, x:, y_:, keys: nil, type: :click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click} for more - # details. - # # A click action. # - # @param button [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::Button] Indicates which mouse button was pressed during the click. One of `left`, `right + # @param button [Symbol, OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click::Button] + # Indicates which mouse button was pressed during the click. One of `left`, + # `right`, `wheel`, `back`, or `forward`. # - # @param x [Integer] The x-coordinate where the click occurred. + # @param x [Integer] + # The x-coordinate where the click occurred. # - # @param y_ [Integer] The y-coordinate where the click occurred. + # @param y_ [Integer] + # The y-coordinate where the click occurred. # - # @param keys [Array, nil] The keys being held while clicking. + # @param keys [Array, nil] + # The keys being held while clicking. # - # @param type [Symbol, :click] Specifies the event type. For a click action, this property is always `click`. + # @param type [Symbol, :click] + # Specifies the event type. For a click action, this property is always `click`. # Indicates which mouse button was pressed during the click. One of `left`, # `right`, `wheel`, `back`, or `forward`. @@ -258,19 +268,20 @@ class DoubleClick < OpenAI::Internal::Type::BaseModel required :y_, Integer, api_name: :y # @!method initialize(keys:, x:, y_:, type: :double_click) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::DoubleClick} for - # more details. - # # A double click action. # - # @param keys [Array, nil] The keys being held while double-clicking. + # @param keys [Array, nil] + # The keys being held while double-clicking. # - # @param x [Integer] The x-coordinate where the double click occurred. + # @param x [Integer] + # The x-coordinate where the double click occurred. # - # @param y_ [Integer] The y-coordinate where the double click occurred. + # @param y_ [Integer] + # The y-coordinate where the double click occurred. # - # @param type [Symbol, :double_click] Specifies the event type. For a double click action, this property is always set + # @param type [Symbol, :double_click] + # Specifies the event type. For a double click action, this property is always set + # to `double_click`. end class Drag < OpenAI::Internal::Type::BaseModel @@ -305,18 +316,25 @@ class Drag < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(path:, keys: nil, type: :drag) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag} for more - # details. - # # A drag action. # - # @param path [Array] An array of coordinates representing the path of the drag action. Coordinates wi + # @param path [Array] + # An array of coordinates representing the path of the drag action. Coordinates + # will appear as an array of objects, eg # - # @param keys [Array, nil] The keys being held while dragging the mouse. + # ``` + # [ + # { x: 100, y: 200 }, + # { x: 200, y: 300 } + # ] + # ``` # - # @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra - + # @param keys [Array, nil] + # The keys being held while dragging the mouse. + # + # @param type [Symbol, :drag] + # Specifies the event type. For a drag action, this property is always set to + # `drag`. class Path < OpenAI::Internal::Type::BaseModel # @!attribute x # The x-coordinate. @@ -333,9 +351,11 @@ class Path < OpenAI::Internal::Type::BaseModel # @!method initialize(x:, y_:) # An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. # - # @param x [Integer] The x-coordinate. + # @param x [Integer] + # The x-coordinate. # - # @param y_ [Integer] The y-coordinate. + # @param y_ [Integer] + # The y-coordinate. end end @@ -355,15 +375,15 @@ class Keypress < OpenAI::Internal::Type::BaseModel required :type, const: :keypress # @!method initialize(keys:, type: :keypress) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Keypress} for more - # details. - # # A collection of keypresses the model would like to perform. # - # @param keys [Array] The combination of keys the model is requesting to be pressed. This is an array + # @param keys [Array] + # The combination of keys the model is requesting to be pressed. This is an array + # of strings, each representing a key. # - # @param type [Symbol, :keypress] Specifies the event type. For a keypress action, this property is always set to + # @param type [Symbol, :keypress] + # Specifies the event type. For a keypress action, this property is always set to + # `keypress`. end class Move < OpenAI::Internal::Type::BaseModel @@ -393,19 +413,20 @@ class Move < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(x:, y_:, keys: nil, type: :move) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Move} for more - # details. - # # A mouse move action. # - # @param x [Integer] The x-coordinate to move to. + # @param x [Integer] + # The x-coordinate to move to. # - # @param y_ [Integer] The y-coordinate to move to. + # @param y_ [Integer] + # The y-coordinate to move to. # - # @param keys [Array, nil] The keys being held while moving the mouse. + # @param keys [Array, nil] + # The keys being held while moving the mouse. # - # @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov + # @param type [Symbol, :move] + # Specifies the event type. For a move action, this property is always set to + # `move`. end class Screenshot < OpenAI::Internal::Type::BaseModel @@ -417,13 +438,11 @@ class Screenshot < OpenAI::Internal::Type::BaseModel required :type, const: :screenshot # @!method initialize(type: :screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Screenshot} for - # more details. - # # A screenshot action. # - # @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is always set t + # @param type [Symbol, :screenshot] + # Specifies the event type. For a screenshot action, this property is always set + # to `screenshot`. end class Scroll < OpenAI::Internal::Type::BaseModel @@ -465,23 +484,26 @@ class Scroll < OpenAI::Internal::Type::BaseModel optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(scroll_x:, scroll_y:, x:, y_:, keys: nil, type: :scroll) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Scroll} for more - # details. - # # A scroll action. # - # @param scroll_x [Integer] The horizontal scroll distance. + # @param scroll_x [Integer] + # The horizontal scroll distance. # - # @param scroll_y [Integer] The vertical scroll distance. + # @param scroll_y [Integer] + # The vertical scroll distance. # - # @param x [Integer] The x-coordinate where the scroll occurred. + # @param x [Integer] + # The x-coordinate where the scroll occurred. # - # @param y_ [Integer] The y-coordinate where the scroll occurred. + # @param y_ [Integer] + # The y-coordinate where the scroll occurred. # - # @param keys [Array, nil] The keys being held while scrolling. + # @param keys [Array, nil] + # The keys being held while scrolling. # - # @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s + # @param type [Symbol, :scroll] + # Specifies the event type. For a scroll action, this property is always set to + # `scroll`. end class Type < OpenAI::Internal::Type::BaseModel @@ -499,15 +521,14 @@ class Type < OpenAI::Internal::Type::BaseModel required :type, const: :type # @!method initialize(text:, type: :type) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Type} for more - # details. - # # An action to type in text. # - # @param text [String] The text to type. + # @param text [String] + # The text to type. # - # @param type [Symbol, :type] Specifies the event type. For a type action, this property is always set to `typ + # @param type [Symbol, :type] + # Specifies the event type. For a type action, this property is always set to + # `type`. end class Wait < OpenAI::Internal::Type::BaseModel @@ -519,13 +540,11 @@ class Wait < OpenAI::Internal::Type::BaseModel required :type, const: :wait # @!method initialize(type: :wait) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Wait} for more - # details. - # # A wait action. # - # @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is always set to `wai + # @param type [Symbol, :wait] + # Specifies the event type. For a wait action, this property is always set to + # `wait`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_computer_tool_call_output_item.rb b/lib/openai/models/responses/response_computer_tool_call_output_item.rb index 88caa8338..6b97e74d8 100644 --- a/lib/openai/models/responses/response_computer_tool_call_output_item.rb +++ b/lib/openai/models/responses/response_computer_tool_call_output_item.rb @@ -56,23 +56,28 @@ class ResponseComputerToolCallOutputItem < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, output:, status:, acknowledged_safety_checks: nil, created_by: nil, type: :computer_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCallOutputItem} for more - # details. + # @param id [String] + # The unique ID of the computer call tool output. # - # @param id [String] The unique ID of the computer call tool output. + # @param call_id [String] + # The ID of the computer tool call that produced the output. # - # @param call_id [String] The ID of the computer tool call that produced the output. + # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot] + # A computer screenshot image used with the computer use tool. # - # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot] A computer screenshot image used with the computer use tool. + # @param status [Symbol, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status] The status of the message input. One of `in_progress`, `completed`, or + # @param acknowledged_safety_checks [Array] + # The safety checks reported by the API that have been acknowledged by the + # developer. # - # @param acknowledged_safety_checks [Array] The safety checks reported by the API that have been acknowledged by the + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param created_by [String] The identifier of the actor that created the item. - # - # @param type [Symbol, :computer_call_output] The type of the computer tool call output. Always `computer_call_output`. + # @param type [Symbol, :computer_call_output] + # The type of the computer tool call output. Always `computer_call_output`. # The status of the message input. One of `in_progress`, `completed`, or # `incomplete`. Populated when input items are returned via API. @@ -112,11 +117,14 @@ class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end end end diff --git a/lib/openai/models/responses/response_computer_tool_call_output_screenshot.rb b/lib/openai/models/responses/response_computer_tool_call_output_screenshot.rb index 91dcc4a51..f1f2c9405 100644 --- a/lib/openai/models/responses/response_computer_tool_call_output_screenshot.rb +++ b/lib/openai/models/responses/response_computer_tool_call_output_screenshot.rb @@ -24,17 +24,17 @@ class ResponseComputerToolCallOutputScreenshot < OpenAI::Internal::Type::BaseMod optional :image_url, String # @!method initialize(file_id: nil, image_url: nil, type: :computer_screenshot) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot} for more - # details. - # # A computer screenshot image used with the computer use tool. # - # @param file_id [String] The identifier of an uploaded file that contains the screenshot. + # @param file_id [String] + # The identifier of an uploaded file that contains the screenshot. # - # @param image_url [String] The URL of the screenshot image. + # @param image_url [String] + # The URL of the screenshot image. # - # @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is + # @param type [Symbol, :computer_screenshot] + # Specifies the event type. For a computer screenshot, this property is always set + # to `computer_screenshot`. end end end diff --git a/lib/openai/models/responses/response_configuration_update_item.rb b/lib/openai/models/responses/response_configuration_update_item.rb index ed3984df7..cef6d6e36 100644 --- a/lib/openai/models/responses/response_configuration_update_item.rb +++ b/lib/openai/models/responses/response_configuration_update_item.rb @@ -26,11 +26,14 @@ class ResponseConfigurationUpdateItem < OpenAI::Internal::Type::BaseModel # A configuration update that applies to subsequent responses until it is replaced # by another configuration update. # - # @param id [String] The unique ID of the configuration update item. + # @param id [String] + # The unique ID of the configuration update item. # - # @param reasoning [OpenAI::Models::Responses::ResponseConfigurationUpdateItem::Reasoning] The reasoning configuration applied by this update. + # @param reasoning [OpenAI::Models::Responses::ResponseConfigurationUpdateItem::Reasoning] + # The reasoning configuration applied by this update. # - # @param type [Symbol, :configuration_update] The item type. Always `configuration_update`. + # @param type [Symbol, :configuration_update] + # The item type. Always `configuration_update`. # @see OpenAI::Models::Responses::ResponseConfigurationUpdateItem#reasoning class Reasoning < OpenAI::Internal::Type::BaseModel @@ -42,13 +45,11 @@ class Reasoning < OpenAI::Internal::Type::BaseModel optional :effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true # @!method initialize(effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseConfigurationUpdateItem::Reasoning} for more - # details. - # # The reasoning configuration applied by this update. # - # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] The reasoning effort used for subsequent responses until another + # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # The reasoning effort used for subsequent responses until another configuration + # update replaces it. end end end diff --git a/lib/openai/models/responses/response_configuration_update_item_param.rb b/lib/openai/models/responses/response_configuration_update_item_param.rb index cdbabc0d6..eabce2605 100644 --- a/lib/openai/models/responses/response_configuration_update_item_param.rb +++ b/lib/openai/models/responses/response_configuration_update_item_param.rb @@ -27,11 +27,14 @@ class ResponseConfigurationUpdateItemParam < OpenAI::Internal::Type::BaseModel # remains in effect for subsequent responses until it is replaced by another # configuration update. # - # @param id [String, nil] The unique ID of the configuration update item. + # @param id [String, nil] + # The unique ID of the configuration update item. # - # @param reasoning [OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam::Reasoning] Updates to reasoning configuration. Only effort is supported. + # @param reasoning [OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam::Reasoning] + # Updates to reasoning configuration. Only effort is supported. # - # @param type [Symbol, :configuration_update] The item type. Always `configuration_update`. + # @param type [Symbol, :configuration_update] + # The item type. Always `configuration_update`. # @see OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam#reasoning class Reasoning < OpenAI::Internal::Type::BaseModel @@ -43,13 +46,11 @@ class Reasoning < OpenAI::Internal::Type::BaseModel optional :effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true # @!method initialize(effort: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam::Reasoning} for - # more details. - # # Updates to reasoning configuration. Only effort is supported. # - # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] The reasoning effort to use for subsequent responses until another + # @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # The reasoning effort to use for subsequent responses until another configuration + # update replaces it. end end end diff --git a/lib/openai/models/responses/response_container_reference.rb b/lib/openai/models/responses/response_container_reference.rb index 85b0bc7e3..3fbe10ea8 100644 --- a/lib/openai/models/responses/response_container_reference.rb +++ b/lib/openai/models/responses/response_container_reference.rb @@ -20,7 +20,8 @@ class ResponseContainerReference < OpenAI::Internal::Type::BaseModel # # @param container_id [String] # - # @param type [Symbol, :container_reference] The environment type. Always `container_reference`. + # @param type [Symbol, :container_reference] + # The environment type. Always `container_reference`. end end end diff --git a/lib/openai/models/responses/response_content.rb b/lib/openai/models/responses/response_content.rb index 89e2500f6..988d72aec 100644 --- a/lib/openai/models/responses/response_content.rb +++ b/lib/openai/models/responses/response_content.rb @@ -10,7 +10,7 @@ module ResponseContent # A text input to the model. variant -> { OpenAI::Responses::ResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant -> { OpenAI::Responses::ResponseInputImage } # A file input to the model. @@ -41,9 +41,11 @@ class ReasoningTextContent < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_content_part_added_event.rb b/lib/openai/models/responses/response_content_part_added_event.rb index 0da2dd68d..547625f74 100644 --- a/lib/openai/models/responses/response_content_part_added_event.rb +++ b/lib/openai/models/responses/response_content_part_added_event.rb @@ -41,22 +41,25 @@ class ResponseContentPartAddedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.content_part.added" # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, type: :"response.content_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseContentPartAddedEvent} for more details. - # # Emitted when a new content part is added. # - # @param content_index [Integer] The index of the content part that was added. + # @param content_index [Integer] + # The index of the content part that was added. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added. + # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] + # The content part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.content_part.added"] The type of the event. Always `response.content_part.added`. + # @param type [Symbol, :"response.content_part.added"] + # The type of the event. Always `response.content_part.added`. # The content part that was added. # @@ -91,9 +94,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_content_part_done_event.rb b/lib/openai/models/responses/response_content_part_done_event.rb index 5ce016f3e..287848170 100644 --- a/lib/openai/models/responses/response_content_part_done_event.rb +++ b/lib/openai/models/responses/response_content_part_done_event.rb @@ -41,22 +41,25 @@ class ResponseContentPartDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.content_part.done" # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, type: :"response.content_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseContentPartDoneEvent} for more details. - # # Emitted when a content part is done. # - # @param content_index [Integer] The index of the content part that is done. + # @param content_index [Integer] + # The index of the content part that is done. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done. + # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] + # The content part that is done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.content_part.done"] The type of the event. Always `response.content_part.done`. + # @param type [Symbol, :"response.content_part.done"] + # The type of the event. Always `response.content_part.done`. # The content part that is done. # @@ -91,9 +94,11 @@ class ReasoningText < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_conversation_param.rb b/lib/openai/models/responses/response_conversation_param.rb index b4ab29772..c526338d0 100644 --- a/lib/openai/models/responses/response_conversation_param.rb +++ b/lib/openai/models/responses/response_conversation_param.rb @@ -13,7 +13,8 @@ class ResponseConversationParam < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # The conversation that this response belongs to. # - # @param id [String] The unique ID of the conversation. + # @param id [String] + # The unique ID of the conversation. end end end diff --git a/lib/openai/models/responses/response_create_params.rb b/lib/openai/models/responses/response_create_params.rb index d3f373ba1..52688e131 100644 --- a/lib/openai/models/responses/response_create_params.rb +++ b/lib/openai/models/responses/response_create_params.rb @@ -12,7 +12,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -76,11 +76,11 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @return [String, Array, nil] optional :input, union: -> { OpenAI::Responses::ResponseCreateParams::Input } @@ -98,7 +98,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -127,8 +127,8 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel, nil] optional :model, union: -> { OpenAI::ResponsesModel } @@ -148,7 +148,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -156,7 +156,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -164,7 +164,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -177,7 +177,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions, nil] @@ -191,7 +191,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -213,7 +213,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Reasoning, nil] optional :reasoning, -> { OpenAI::Reasoning }, nil?: true @@ -224,7 +224,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -237,13 +237,15 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -262,7 +264,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). # # @return [Boolean, nil] optional :store, OpenAI::Internal::Type::Boolean, nil?: true @@ -286,8 +288,8 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Responses::ResponseTextConfig, nil] optional( @@ -316,17 +318,18 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array, nil] @@ -371,74 +374,256 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams} for more details. - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Responses::ResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -456,9 +641,11 @@ class ContextManagement < OpenAI::Internal::Type::BaseModel optional :compact_threshold, Integer, nil?: true # @!method initialize(type:, compact_threshold: nil) - # @param type [String] The context management entry type. Currently only 'compaction' is supported. + # @param type [String] + # The context management entry type. Currently only 'compaction' is supported. # - # @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry. + # @param compact_threshold [Integer, nil] + # Token threshold at which compaction should be triggered for this entry. end # The conversation that this response belongs to. Items from this conversation are @@ -482,11 +669,11 @@ module Conversation # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -517,14 +704,14 @@ class Moderation < OpenAI::Internal::Type::BaseModel optional :policy, -> { OpenAI::Responses::ResponseCreateParams::Moderation::Policy }, nil?: true # @!method initialize(model:, policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams::Moderation} for more details. - # # Configuration for running moderation on the input and output of this response. # - # @param model [String] The moderation model to use for moderated completions, e.g. 'omni-moderation-lat + # @param model [String] + # The moderation model to use for moderated completions, e.g. + # 'omni-moderation-latest'. # - # @param policy [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy, nil] The policy to apply to moderated response input and output. + # @param policy [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy, nil] + # The policy to apply to moderated response input and output. # @see OpenAI::Models::Responses::ResponseCreateParams::Moderation#policy class Policy < OpenAI::Internal::Type::BaseModel @@ -555,9 +742,11 @@ class Policy < OpenAI::Internal::Type::BaseModel # @!method initialize(input: nil, output: nil) # The policy to apply to moderated response input and output. # - # @param input [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy::Input, nil] The moderation policy for the response input. + # @param input [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy::Input, nil] + # The moderation policy for the response input. # - # @param output [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy::Output, nil] The moderation policy for the response output. + # @param output [OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy::Output, nil] + # The moderation policy for the response output. # @see OpenAI::Models::Responses::ResponseCreateParams::Moderation::Policy#input class Input < OpenAI::Internal::Type::BaseModel @@ -637,10 +826,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel optional :ttl, enum: -> { OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl } # @!method initialize(comparison_response_id: nil, mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions} for more - # details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -648,14 +833,25 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param comparison_response_id [String, nil] The ID of a response to compare when diagnosing prompt cache reuse. Supplying th + # @param comparison_response_id [String, nil] + # The ID of a response to compare when diagnosing prompt cache reuse. Supplying + # this field requests prompt cache diagnostics when the feature is enabled. # - # @param mode [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -697,7 +893,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -726,13 +922,15 @@ module PromptCacheRetention # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -771,13 +969,15 @@ class StreamOptions < OpenAI::Internal::Type::BaseModel optional :include_obfuscation, OpenAI::Internal::Type::Boolean # @!method initialize(include_obfuscation: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams::StreamOptions} for more - # details. - # # Options for streaming responses. Only set this when you set `stream: true`. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. end # How the model should select which tool (or tools) to use when generating a @@ -800,7 +1000,7 @@ module ToolChoice variant -> { OpenAI::Responses::ToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Responses::ToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -828,7 +1028,8 @@ class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_created_event.rb b/lib/openai/models/responses/response_created_event.rb index 58d548691..928397860 100644 --- a/lib/openai/models/responses/response_created_event.rb +++ b/lib/openai/models/responses/response_created_event.rb @@ -23,16 +23,16 @@ class ResponseCreatedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.created" # @!method initialize(response:, sequence_number:, type: :"response.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreatedEvent} for more details. - # # An event that is emitted when a response is created. # - # @param response [OpenAI::Models::Responses::Response] The response that was created. + # @param response [OpenAI::Models::Responses::Response] + # The response that was created. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param type [Symbol, :"response.created"] The type of the event. Always `response.created`. + # @param type [Symbol, :"response.created"] + # The type of the event. Always `response.created`. end end end diff --git a/lib/openai/models/responses/response_custom_tool_call.rb b/lib/openai/models/responses/response_custom_tool_call.rb index 486aaa2a3..ca6b5df92 100644 --- a/lib/openai/models/responses/response_custom_tool_call.rb +++ b/lib/openai/models/responses/response_custom_tool_call.rb @@ -58,26 +58,31 @@ class ResponseCustomToolCall < OpenAI::Internal::Type::BaseModel optional :namespace, String # @!method initialize(call_id:, input:, name:, id: nil, async: nil, caller_: nil, namespace: nil, type: :custom_tool_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCustomToolCall} for more details. - # # A call to a custom tool created by the model. # - # @param call_id [String] An identifier used to map this custom tool call to a tool call output. + # @param call_id [String] + # An identifier used to map this custom tool call to a tool call output. # - # @param input [String] The input for the custom tool call generated by the model. + # @param input [String] + # The input for the custom tool call generated by the model. # - # @param name [String] The name of the custom tool being called. + # @param name [String] + # The name of the custom tool being called. # - # @param id [String] The unique ID of the custom tool call in the OpenAI platform. + # @param id [String] + # The unique ID of the custom tool call in the OpenAI platform. # - # @param async [Boolean] Whether the custom tool call runs asynchronously. + # @param async [Boolean] + # Whether the custom tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the custom tool being called. + # @param namespace [String] + # The namespace of the custom tool being called. # - # @param type [Symbol, :custom_tool_call] The type of the custom tool call. Always `custom_tool_call`. + # @param type [Symbol, :custom_tool_call] + # The type of the custom tool call. Always `custom_tool_call`. # The execution context that produced this tool call. # @@ -114,7 +119,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_custom_tool_call_input_delta_event.rb b/lib/openai/models/responses/response_custom_tool_call_input_delta_event.rb index 5fa83189f..00d8ff61a 100644 --- a/lib/openai/models/responses/response_custom_tool_call_input_delta_event.rb +++ b/lib/openai/models/responses/response_custom_tool_call_input_delta_event.rb @@ -37,15 +37,20 @@ class ResponseCustomToolCallInputDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(delta:, item_id:, output_index:, sequence_number:, type: :"response.custom_tool_call_input.delta") # Event representing a delta (partial update) to the input of a custom tool call. # - # @param delta [String] The incremental input data (delta) for the custom tool call. + # @param delta [String] + # The incremental input data (delta) for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this delta applies to. + # @param output_index [Integer] + # The index of the output this delta applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.custom_tool_call_input.delta"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.delta"] + # The event type identifier. end end end diff --git a/lib/openai/models/responses/response_custom_tool_call_input_done_event.rb b/lib/openai/models/responses/response_custom_tool_call_input_done_event.rb index e45a41e0c..28d8b236d 100644 --- a/lib/openai/models/responses/response_custom_tool_call_input_done_event.rb +++ b/lib/openai/models/responses/response_custom_tool_call_input_done_event.rb @@ -37,15 +37,20 @@ class ResponseCustomToolCallInputDoneEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(input:, item_id:, output_index:, sequence_number:, type: :"response.custom_tool_call_input.done") # Event indicating that input for a custom tool call is complete. # - # @param input [String] The complete input data for the custom tool call. + # @param input [String] + # The complete input data for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this event applies to. + # @param output_index [Integer] + # The index of the output this event applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.custom_tool_call_input.done"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.done"] + # The event type identifier. end end end diff --git a/lib/openai/models/responses/response_custom_tool_call_item.rb b/lib/openai/models/responses/response_custom_tool_call_item.rb index 82dce8fea..4ca9c9baf 100644 --- a/lib/openai/models/responses/response_custom_tool_call_item.rb +++ b/lib/openai/models/responses/response_custom_tool_call_item.rb @@ -24,30 +24,38 @@ class ResponseCustomToolCallItem < OpenAI::Models::Responses::ResponseCustomTool optional :created_by, String # @!method initialize(call_id:, input:, name:, id:, status:, async: nil, caller_: nil, namespace: nil, created_by: nil, type: :custom_tool_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCustomToolCallItem} for more details. - # # A call to a custom tool created by the model. # - # @param call_id [String] An identifier used to map this custom tool call to a tool call output. + # @param call_id [String] + # An identifier used to map this custom tool call to a tool call output. # - # @param input [String] The input for the custom tool call generated by the model. + # @param input [String] + # The input for the custom tool call generated by the model. # - # @param name [String] The name of the custom tool being called. + # @param name [String] + # The name of the custom tool being called. # - # @param id [String] The unique ID of the custom tool call item. + # @param id [String] + # The unique ID of the custom tool call item. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseCustomToolCallItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseCustomToolCallItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param async [Boolean] Whether the custom tool call runs asynchronously. + # @param async [Boolean] + # Whether the custom tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the custom tool being called. + # @param namespace [String] + # The namespace of the custom tool being called. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :custom_tool_call] The type of the custom tool call. Always `custom_tool_call`. + # @param type [Symbol, :custom_tool_call] + # The type of the custom tool call. Always `custom_tool_call`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/responses/response_custom_tool_call_output.rb b/lib/openai/models/responses/response_custom_tool_call_output.rb index fb00d3653..b9e10b70c 100644 --- a/lib/openai/models/responses/response_custom_tool_call_output.rb +++ b/lib/openai/models/responses/response_custom_tool_call_output.rb @@ -41,20 +41,23 @@ class ResponseCustomToolCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, caller_: nil, type: :custom_tool_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCustomToolCallOutput} for more details. - # # The output of a custom tool call from your code, being sent back to the model. # - # @param call_id [String] The call ID, used to map this custom tool call output to a custom tool call. + # @param call_id [String] + # The call ID, used to map this custom tool call output to a custom tool call. # - # @param output [String, Array] The output from the custom tool call generated by your code. + # @param output [String, Array] + # The output from the custom tool call generated by your code. Can be a string or + # an list of output content. # - # @param id [String] The unique ID of the custom tool call output in the OpenAI platform. + # @param id [String] + # The unique ID of the custom tool call output in the OpenAI platform. # - # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param type [Symbol, :custom_tool_call_output] The type of the custom tool call output. Always `custom_tool_call_output`. + # @param type [Symbol, :custom_tool_call_output] + # The type of the custom tool call output. Always `custom_tool_call_output`. # The output from the custom tool call generated by your code. Can be a string or # an list of output content. @@ -78,7 +81,7 @@ module OutputContentList # A text input to the model. variant :input_text, -> { OpenAI::Responses::ResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Responses::ResponseInputImage } # A file input to the model. @@ -119,7 +122,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -136,9 +140,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_custom_tool_call_output_item.rb b/lib/openai/models/responses/response_custom_tool_call_output_item.rb index 416f6f7f5..f03037827 100644 --- a/lib/openai/models/responses/response_custom_tool_call_output_item.rb +++ b/lib/openai/models/responses/response_custom_tool_call_output_item.rb @@ -24,24 +24,30 @@ class ResponseCustomToolCallOutputItem < OpenAI::Models::Responses::ResponseCust optional :created_by, String # @!method initialize(call_id:, output:, id:, status:, caller_: nil, created_by: nil, type: :custom_tool_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCustomToolCallOutputItem} for more details. - # # The output of a custom tool call from your code, being sent back to the model. # - # @param call_id [String] The call ID, used to map this custom tool call output to a custom tool call. + # @param call_id [String] + # The call ID, used to map this custom tool call output to a custom tool call. # - # @param output [String, Array] The output from the custom tool call generated by your code. + # @param output [String, Array] + # The output from the custom tool call generated by your code. Can be a string or + # an list of output content. # - # @param id [String] The unique ID of the custom tool call output item. + # @param id [String] + # The unique ID of the custom tool call output item. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseCustomToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :custom_tool_call_output] The type of the custom tool call output. Always `custom_tool_call_output`. + # @param type [Symbol, :custom_tool_call_output] + # The type of the custom tool call output. Always `custom_tool_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/responses/response_error.rb b/lib/openai/models/responses/response_error.rb index 9b34a34fb..92da685ad 100644 --- a/lib/openai/models/responses/response_error.rb +++ b/lib/openai/models/responses/response_error.rb @@ -22,14 +22,13 @@ class ResponseError < OpenAI::Internal::Type::BaseModel optional :misalignment, -> { OpenAI::Responses::ResponseError::Misalignment } # @!method initialize(code:, message:, misalignment: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseError} for more details. - # # An error object returned when the model fails to generate a Response. # - # @param code [Symbol, OpenAI::Models::Responses::ResponseError::Code] The error code for the response. + # @param code [Symbol, OpenAI::Models::Responses::ResponseError::Code] + # The error code for the response. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # # @param misalignment [OpenAI::Models::Responses::ResponseError::Misalignment] @@ -86,11 +85,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel optional :steer, -> { OpenAI::Responses::ResponseError::Misalignment::Steer } # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::Responses::ResponseError::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::Responses::ResponseError::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::Responses::ResponseError::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::Responses::ResponseError::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -148,7 +150,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end diff --git a/lib/openai/models/responses/response_error_event.rb b/lib/openai/models/responses/response_error_event.rb index 9dde9fb49..3b38411ba 100644 --- a/lib/openai/models/responses/response_error_event.rb +++ b/lib/openai/models/responses/response_error_event.rb @@ -35,20 +35,22 @@ class ResponseErrorEvent < OpenAI::Internal::Type::BaseModel required :type, const: :error # @!method initialize(code:, message:, param:, sequence_number:, type: :error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseErrorEvent} for more details. - # # Emitted when an error occurs. # - # @param code [String, nil] The error code. + # @param code [String, nil] + # The error code. # - # @param message [String] The error message. + # @param message [String] + # The error message. # - # @param param [String, nil] The error parameter. + # @param param [String, nil] + # The error parameter. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :error] The type of the event. Always `error`. + # @param type [Symbol, :error] + # The type of the event. Always `error`. end end end diff --git a/lib/openai/models/responses/response_failed_event.rb b/lib/openai/models/responses/response_failed_event.rb index 064ba7852..a199fea94 100644 --- a/lib/openai/models/responses/response_failed_event.rb +++ b/lib/openai/models/responses/response_failed_event.rb @@ -23,16 +23,16 @@ class ResponseFailedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.failed" # @!method initialize(response:, sequence_number:, type: :"response.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFailedEvent} for more details. - # # An event that is emitted when a response fails. # - # @param response [OpenAI::Models::Responses::Response] The response that failed. + # @param response [OpenAI::Models::Responses::Response] + # The response that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.failed"] The type of the event. Always `response.failed`. + # @param type [Symbol, :"response.failed"] + # The type of the event. Always `response.failed`. end end end diff --git a/lib/openai/models/responses/response_file_search_call_completed_event.rb b/lib/openai/models/responses/response_file_search_call_completed_event.rb index 8ae559c0a..270c7883c 100644 --- a/lib/openai/models/responses/response_file_search_call_completed_event.rb +++ b/lib/openai/models/responses/response_file_search_call_completed_event.rb @@ -29,19 +29,19 @@ class ResponseFileSearchCallCompletedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.file_search_call.completed" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.file_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFileSearchCallCompletedEvent} for more - # details. - # # Emitted when a file search call is completed (results found). # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.file_search_call.completed"] The type of the event. Always `response.file_search_call.completed`. + # @param type [Symbol, :"response.file_search_call.completed"] + # The type of the event. Always `response.file_search_call.completed`. end end end diff --git a/lib/openai/models/responses/response_file_search_call_in_progress_event.rb b/lib/openai/models/responses/response_file_search_call_in_progress_event.rb index 2dc256ec2..5ced2d3cc 100644 --- a/lib/openai/models/responses/response_file_search_call_in_progress_event.rb +++ b/lib/openai/models/responses/response_file_search_call_in_progress_event.rb @@ -29,19 +29,19 @@ class ResponseFileSearchCallInProgressEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.file_search_call.in_progress" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.file_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFileSearchCallInProgressEvent} for more - # details. - # # Emitted when a file search call is initiated. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.file_search_call.in_progress"] The type of the event. Always `response.file_search_call.in_progress`. + # @param type [Symbol, :"response.file_search_call.in_progress"] + # The type of the event. Always `response.file_search_call.in_progress`. end end end diff --git a/lib/openai/models/responses/response_file_search_call_searching_event.rb b/lib/openai/models/responses/response_file_search_call_searching_event.rb index 9cd935932..77f17d66c 100644 --- a/lib/openai/models/responses/response_file_search_call_searching_event.rb +++ b/lib/openai/models/responses/response_file_search_call_searching_event.rb @@ -29,19 +29,19 @@ class ResponseFileSearchCallSearchingEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.file_search_call.searching" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.file_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFileSearchCallSearchingEvent} for more - # details. - # # Emitted when a file search is currently searching. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is searching. + # @param output_index [Integer] + # The index of the output item that the file search call is searching. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.file_search_call.searching"] The type of the event. Always `response.file_search_call.searching`. + # @param type [Symbol, :"response.file_search_call.searching"] + # The type of the event. Always `response.file_search_call.searching`. end end end diff --git a/lib/openai/models/responses/response_file_search_tool_call.rb b/lib/openai/models/responses/response_file_search_tool_call.rb index 3603b7968..07f6ec01d 100644 --- a/lib/openai/models/responses/response_file_search_tool_call.rb +++ b/lib/openai/models/responses/response_file_search_tool_call.rb @@ -42,22 +42,25 @@ class ResponseFileSearchToolCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, queries:, status:, results: nil, type: :file_search_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFileSearchToolCall} for more details. - # # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) # for more information. # - # @param id [String] The unique ID of the file search tool call. + # @param id [String] + # The unique ID of the file search tool call. # - # @param queries [Array] The queries used to search for files. + # @param queries [Array] + # The queries used to search for files. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFileSearchToolCall::Status] The status of the file search tool call. One of `in_progress`, + # @param status [Symbol, OpenAI::Models::Responses::ResponseFileSearchToolCall::Status] + # The status of the file search tool call. One of `in_progress`, `searching`, + # `incomplete` or `failed`, # - # @param results [Array, nil] The results of the file search tool call. + # @param results [Array, nil] + # The results of the file search tool call. # - # @param type [Symbol, :file_search_call] The type of the file search tool call. Always `file_search_call`. + # @param type [Symbol, :file_search_call] + # The type of the file search tool call. Always `file_search_call`. # The status of the file search tool call. One of `in_progress`, `searching`, # `incomplete` or `failed`, @@ -118,20 +121,24 @@ class Result < OpenAI::Internal::Type::BaseModel optional :text, String # @!method initialize(attributes: nil, file_id: nil, filename: nil, score: nil, text: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFileSearchToolCall::Result} for more - # details. - # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param file_id [String] The unique ID of the file. + # @param file_id [String] + # The unique ID of the file. # - # @param filename [String] The name of the file. + # @param filename [String] + # The name of the file. # - # @param score [Float] The relevance score of the file - a value between 0 and 1. + # @param score [Float] + # The relevance score of the file - a value between 0 and 1. # - # @param text [String] The text that was retrieved from the file. - + # @param text [String] + # The text that was retrieved from the file. module Attribute extend OpenAI::Internal::Type::Union diff --git a/lib/openai/models/responses/response_format_text_config.rb b/lib/openai/models/responses/response_format_text_config.rb index 92c1a5de9..667db6d6b 100644 --- a/lib/openai/models/responses/response_format_text_config.rb +++ b/lib/openai/models/responses/response_format_text_config.rb @@ -7,7 +7,7 @@ module Responses # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -25,7 +25,7 @@ module ResponseFormatTextConfig variant :text, -> { OpenAI::ResponseFormatText } # JSON Schema response format. Used to generate structured JSON responses. - # Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). variant :json_schema, -> { OpenAI::Responses::ResponseFormatTextJSONSchemaConfig } # An {OpenAI::BaseModel} can be provided and implicitly converted into {OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig}. diff --git a/lib/openai/models/responses/response_format_text_json_schema_config.rb b/lib/openai/models/responses/response_format_text_json_schema_config.rb index 158ad2e02..585223a84 100644 --- a/lib/openai/models/responses/response_format_text_json_schema_config.rb +++ b/lib/openai/models/responses/response_format_text_json_schema_config.rb @@ -44,29 +44,37 @@ class ResponseFormatTextJSONSchemaConfig < OpenAI::Internal::Type::BaseModel # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # @return [Boolean, nil] optional :strict, OpenAI::Internal::Type::Boolean, nil?: true # @!method initialize(name:, schema:, description: nil, strict: nil, type: :json_schema) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig} for more - # details. - # # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param name [String] The name of the response format. Must be a-z, A-Z, 0-9, or contain + # @param name [String] + # The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores + # and dashes, with a maximum length of 64. # - # @param schema [Hash{Symbol=>Object}, OpenAI::StructuredOutput::JsonSchemaConverter] The schema for the response format, described as a JSON Schema object. + # @param schema [Hash{Symbol=>Object}, OpenAI::StructuredOutput::JsonSchemaConverter] + # The schema for the response format, described as a JSON Schema object. Learn how + # to build JSON schemas [here](https://json-schema.org/). # - # @param description [String] A description of what the response format is for, used by the model to + # @param description [String] + # A description of what the response format is for, used by the model to determine + # how to respond in the format. # - # @param strict [Boolean, nil] Whether to enable strict schema adherence when generating the output. + # @param strict [Boolean, nil] + # Whether to enable strict schema adherence when generating the output. If set to + # true, the model will always follow the exact schema defined in the `schema` + # field. Only a subset of JSON Schema is supported when `strict` is `true`. To + # learn more, read the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # - # @param type [Symbol, :json_schema] The type of response format being defined. Always `json_schema`. + # @param type [Symbol, :json_schema] + # The type of response format being defined. Always `json_schema`. end end end diff --git a/lib/openai/models/responses/response_function_call_arguments_delta_event.rb b/lib/openai/models/responses/response_function_call_arguments_delta_event.rb index 70a57547c..cad8b4b78 100644 --- a/lib/openai/models/responses/response_function_call_arguments_delta_event.rb +++ b/lib/openai/models/responses/response_function_call_arguments_delta_event.rb @@ -35,21 +35,22 @@ class ResponseFunctionCallArgumentsDeltaEvent < OpenAI::Internal::Type::BaseMode required :type, const: :"response.function_call_arguments.delta" # @!method initialize(delta:, item_id:, output_index:, sequence_number:, type: :"response.function_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionCallArgumentsDeltaEvent} for more - # details. - # # Emitted when there is a partial function-call arguments delta. # - # @param delta [String] The function-call arguments delta that is added. + # @param delta [String] + # The function-call arguments delta that is added. # - # @param item_id [String] The ID of the output item that the function-call arguments delta is added to. + # @param item_id [String] + # The ID of the output item that the function-call arguments delta is added to. # - # @param output_index [Integer] The index of the output item that the function-call arguments delta is added to. + # @param output_index [Integer] + # The index of the output item that the function-call arguments delta is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.function_call_arguments.delta"] The type of the event. Always `response.function_call_arguments.delta`. + # @param type [Symbol, :"response.function_call_arguments.delta"] + # The type of the event. Always `response.function_call_arguments.delta`. end end end diff --git a/lib/openai/models/responses/response_function_call_arguments_done_event.rb b/lib/openai/models/responses/response_function_call_arguments_done_event.rb index a5b29f4b9..78405b12a 100644 --- a/lib/openai/models/responses/response_function_call_arguments_done_event.rb +++ b/lib/openai/models/responses/response_function_call_arguments_done_event.rb @@ -36,13 +36,17 @@ class ResponseFunctionCallArgumentsDoneEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, type: :"response.function_call_arguments.done") # Emitted when function-call arguments are finalized. # - # @param arguments [String] The function-call arguments. + # @param arguments [String] + # The function-call arguments. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item. + # @param output_index [Integer] + # The index of the output item. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # # @param type [Symbol, :"response.function_call_arguments.done"] end diff --git a/lib/openai/models/responses/response_function_call_output_item.rb b/lib/openai/models/responses/response_function_call_output_item.rb index b6689067b..4f7063536 100644 --- a/lib/openai/models/responses/response_function_call_output_item.rb +++ b/lib/openai/models/responses/response_function_call_output_item.rb @@ -12,7 +12,7 @@ module ResponseFunctionCallOutputItem # A text input to the model. variant :input_text, -> { OpenAI::Responses::ResponseInputTextContent } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) variant :input_image, -> { OpenAI::Responses::ResponseInputImageContent } # A file input to the model. diff --git a/lib/openai/models/responses/response_function_shell_call_output_content.rb b/lib/openai/models/responses/response_function_shell_call_output_content.rb index 9d9814c81..d515c6730 100644 --- a/lib/openai/models/responses/response_function_shell_call_output_content.rb +++ b/lib/openai/models/responses/response_function_shell_call_output_content.rb @@ -25,11 +25,14 @@ class ResponseFunctionShellCallOutputContent < OpenAI::Internal::Type::BaseModel # @!method initialize(outcome:, stderr:, stdout:) # Captured stdout and stderr for a portion of a shell tool call output. # - # @param outcome [OpenAI::Models::Responses::ResponseFunctionShellCallOutputContent::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellCallOutputContent::Outcome::Exit] The exit or timeout outcome associated with this shell call. + # @param outcome [OpenAI::Models::Responses::ResponseFunctionShellCallOutputContent::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellCallOutputContent::Outcome::Exit] + # The exit or timeout outcome associated with this shell call. # - # @param stderr [String] Captured stderr output for the shell call. + # @param stderr [String] + # Captured stderr output for the shell call. # - # @param stdout [String] Captured stdout output for the shell call. + # @param stdout [String] + # Captured stdout output for the shell call. # The exit or timeout outcome associated with this shell call. # @@ -55,7 +58,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -74,9 +78,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] The exit code returned by the shell process. + # @param exit_code [Integer] + # The exit code returned by the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_function_shell_tool_call.rb b/lib/openai/models/responses/response_function_shell_tool_call.rb index 60eea7645..248b028b7 100644 --- a/lib/openai/models/responses/response_function_shell_tool_call.rb +++ b/lib/openai/models/responses/response_function_shell_tool_call.rb @@ -64,26 +64,33 @@ class ResponseFunctionShellToolCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, action:, call_id:, environment:, status:, caller_: nil, created_by: nil, type: :shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionShellToolCall} for more details. - # # A tool call that executes one or more shell commands in a managed environment. # - # @param id [String] The unique ID of the shell tool call. Populated when this item is returned via A + # @param id [String] + # The unique ID of the shell tool call. Populated when this item is returned via + # API. # - # @param action [OpenAI::Models::Responses::ResponseFunctionShellToolCall::Action] The shell commands and limits that describe how to run the tool call. + # @param action [OpenAI::Models::Responses::ResponseFunctionShellToolCall::Action] + # The shell commands and limits that describe how to run the tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param environment [OpenAI::Models::Responses::ResponseLocalEnvironment, OpenAI::Models::Responses::ResponseContainerReference, nil] Represents the use of a local environment to perform shell actions. + # @param environment [OpenAI::Models::Responses::ResponseLocalEnvironment, OpenAI::Models::Responses::ResponseContainerReference, nil] + # Represents the use of a local environment to perform shell actions. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCall::Status] The status of the shell call. One of `in_progress`, `completed`, or `incomplete` + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCall::Status] + # The status of the shell call. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param caller_ [OpenAI::Models::Responses::ResponseFunctionShellToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionShellToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseFunctionShellToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionShellToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The ID of the entity that created this tool call. + # @param created_by [String] + # The ID of the entity that created this tool call. # - # @param type [Symbol, :shell_call] The type of the item. Always `shell_call`. + # @param type [Symbol, :shell_call] + # The type of the item. Always `shell_call`. # @see OpenAI::Models::Responses::ResponseFunctionShellToolCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -109,9 +116,11 @@ class Action < OpenAI::Internal::Type::BaseModel # # @param commands [Array] # - # @param max_output_length [Integer, nil] Optional maximum number of characters to return from each command. + # @param max_output_length [Integer, nil] + # Optional maximum number of characters to return from each command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the commands. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the commands. end # Represents the use of a local environment to perform shell actions. @@ -182,7 +191,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_function_shell_tool_call_output.rb b/lib/openai/models/responses/response_function_shell_tool_call_output.rb index cc0c6eea6..40f38af75 100644 --- a/lib/openai/models/responses/response_function_shell_tool_call_output.rb +++ b/lib/openai/models/responses/response_function_shell_tool_call_output.rb @@ -64,28 +64,34 @@ class ResponseFunctionShellToolCallOutput < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, max_output_length:, output:, status:, caller_: nil, created_by: nil, type: :shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput} for more - # details. - # # The output of a shell tool call that was emitted. # - # @param id [String] The unique ID of the shell call output. Populated when this item is returned via + # @param id [String] + # The unique ID of the shell call output. Populated when this item is returned via + # API. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param max_output_length [Integer, nil] The maximum length of the shell command output. This is generated by the model a + # @param max_output_length [Integer, nil] + # The maximum length of the shell command output. This is generated by the model + # and should be passed back with the raw output. # - # @param output [Array] An array of shell call output contents + # @param output [Array] + # An array of shell call output contents # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status] The status of the shell call output. One of `in_progress`, `completed`, or `inco + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status] + # The status of the shell call output. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param caller_ [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :shell_call_output] The type of the shell call output. Always `shell_call_output`. - + # @param type [Symbol, :shell_call_output] + # The type of the shell call output. Always `shell_call_output`. class Output < OpenAI::Internal::Type::BaseModel # @!attribute outcome # Represents either an exit outcome (with an exit code) or a timeout outcome for a @@ -113,19 +119,20 @@ class Output < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(outcome:, stderr:, stdout:, created_by: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output} for - # more details. - # # The content of a shell tool call output that was emitted. # - # @param outcome [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit] Represents either an exit outcome (with an exit code) or a timeout outcome for a + # @param outcome [OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit] + # Represents either an exit outcome (with an exit code) or a timeout outcome for a + # shell call output chunk. # - # @param stderr [String] The standard error output that was captured. + # @param stderr [String] + # The standard error output that was captured. # - # @param stdout [String] The standard output that was captured. + # @param stdout [String] + # The standard output that was captured. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # Represents either an exit outcome (with an exit code) or a timeout outcome for a # shell call output chunk. @@ -152,7 +159,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -171,9 +179,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] Exit code from the shell process. + # @param exit_code [Integer] + # Exit code from the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants @@ -231,7 +241,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_function_tool_call.rb b/lib/openai/models/responses/response_function_tool_call.rb index c6a22b323..0e998176e 100644 --- a/lib/openai/models/responses/response_function_tool_call.rb +++ b/lib/openai/models/responses/response_function_tool_call.rb @@ -73,30 +73,37 @@ class ResponseFunctionToolCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseFunctionToolCall::Status } # @!method initialize(arguments:, call_id:, name:, id: nil, async: nil, caller_: nil, namespace: nil, status: nil, type: :function_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionToolCall} for more details. - # # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. # - # @param arguments [String] A JSON string of the arguments to pass to the function. + # @param arguments [String] + # A JSON string of the arguments to pass to the function. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param name [String] The name of the function to run. + # @param name [String] + # The name of the function to run. # - # @param id [String] The unique ID of the function tool call. + # @param id [String] + # The unique ID of the function tool call. # - # @param async [Boolean] Whether the function tool call runs asynchronously. + # @param async [Boolean] + # Whether the function tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the function to run. + # @param namespace [String] + # The namespace of the function to run. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCall::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCall::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call] The type of the function tool call. Always `function_call`. + # @param type [Symbol, :function_call] + # The type of the function tool call. Always `function_call`. # The execution context that produced this tool call. # @@ -133,7 +140,8 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # # @param type [Symbol, :program] end diff --git a/lib/openai/models/responses/response_function_tool_call_item.rb b/lib/openai/models/responses/response_function_tool_call_item.rb index d985bc28b..0ca071a84 100644 --- a/lib/openai/models/responses/response_function_tool_call_item.rb +++ b/lib/openai/models/responses/response_function_tool_call_item.rb @@ -24,32 +24,40 @@ class ResponseFunctionToolCallItem < OpenAI::Models::Responses::ResponseFunction optional :created_by, String # @!method initialize(arguments:, call_id:, name:, id:, status:, async: nil, caller_: nil, namespace: nil, created_by: nil, type: :function_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionToolCallItem} for more details. - # # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. # - # @param arguments [String] A JSON string of the arguments to pass to the function. + # @param arguments [String] + # A JSON string of the arguments to pass to the function. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param name [String] The name of the function to run. + # @param name [String] + # The name of the function to run. # - # @param id [String] The unique ID of the function tool call. + # @param id [String] + # The unique ID of the function tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param async [Boolean] Whether the function tool call runs asynchronously. + # @param async [Boolean] + # Whether the function tool call runs asynchronously. # - # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param namespace [String] The namespace of the function to run. + # @param namespace [String] + # The namespace of the function to run. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :function_call] The type of the function tool call. Always `function_call`. + # @param type [Symbol, :function_call] + # The type of the function tool call. Always `function_call`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # Populated when items are returned via API. diff --git a/lib/openai/models/responses/response_function_tool_call_output_item.rb b/lib/openai/models/responses/response_function_tool_call_output_item.rb index 48fa67e6f..9529abbee 100644 --- a/lib/openai/models/responses/response_function_tool_call_output_item.rb +++ b/lib/openai/models/responses/response_function_tool_call_output_item.rb @@ -66,27 +66,34 @@ class ResponseFunctionToolCallOutputItem < OpenAI::Internal::Type::BaseModel optional :namespace, String # @!method initialize(id:, output:, status:, call_id: nil, caller_: nil, created_by: nil, name: nil, namespace: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem} for more - # details. + # @param id [String] + # The unique ID of the function call tool output. # - # @param id [String] The unique ID of the function call tool output. + # @param output [String, Array] + # The output from the function call generated by your code. Can be a string or an + # list of output content. # - # @param output [String, Array] The output from the function call generated by your code. + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status] The status of the item. One of `in_progress`, `completed`, or + # @param call_id [String] + # The unique ID of the function tool call generated by the model. # - # @param call_id [String] The unique ID of the function tool call generated by the model. + # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param caller_ [OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Caller::Direct, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Caller::Program, nil] The execution context that produced this tool call. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param created_by [String] The identifier of the actor that created the item. + # @param name [String] + # The name of the tool that produced the output. # - # @param name [String] The name of the tool that produced the output. + # @param namespace [String] + # The namespace of the tool that produced the output. # - # @param namespace [String] The namespace of the tool that produced the output. - # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # The output from the function call generated by your code. Can be a string or an # list of output content. @@ -110,7 +117,7 @@ module OutputContentList # A text input to the model. variant :input_text, -> { OpenAI::Responses::ResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Responses::ResponseInputImage } # A file input to the model. @@ -166,7 +173,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -183,9 +191,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_function_web_search.rb b/lib/openai/models/responses/response_function_web_search.rb index d9146c527..c884cad5b 100644 --- a/lib/openai/models/responses/response_function_web_search.rb +++ b/lib/openai/models/responses/response_function_web_search.rb @@ -30,20 +30,22 @@ class ResponseFunctionWebSearch < OpenAI::Internal::Type::BaseModel required :type, const: :web_search_call # @!method initialize(id:, action:, status:, type: :web_search_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionWebSearch} for more details. - # # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for - # more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) + # for more information. # - # @param id [String] The unique ID of the web search tool call. + # @param id [String] + # The unique ID of the web search tool call. # - # @param action [OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find] An object describing the specific action taken in this web search call. + # @param action [OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find] + # An object describing the specific action taken in this web search call. Includes + # details on how the model used the web (search, open_page, find_in_page). # - # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionWebSearch::Status] The status of the web search tool call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionWebSearch::Status] + # The status of the web search tool call. # - # @param type [Symbol, :web_search_call] The type of the web search tool call. Always `web_search_call`. + # @param type [Symbol, :web_search_call] + # The type of the web search tool call. Always `web_search_call`. # An object describing the specific action taken in this web search call. Includes # details on how the model used the web (search, open_page, find_in_page). @@ -96,20 +98,19 @@ class Search < OpenAI::Internal::Type::BaseModel ) # @!method initialize(queries: nil, query: nil, sources: nil, type: :search) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search} for more - # details. - # # Action type "search" - Performs a web search query. # - # @param queries [Array] The search queries. + # @param queries [Array] + # The search queries. # - # @param query [String] The search query. + # @param query [String] + # The search query. # - # @param sources [Array] The sources used in the search. + # @param sources [Array] + # The sources used in the search. # - # @param type [Symbol, :search] The action type. - + # @param type [Symbol, :search] + # The action type. class Source < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of source. Always `url`. @@ -124,15 +125,13 @@ class Source < OpenAI::Internal::Type::BaseModel required :url, String # @!method initialize(url:, type: :url) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search::Source} - # for more details. - # # A source used in the search. # - # @param url [String] The URL of the source. + # @param url [String] + # The URL of the source. # - # @param type [Symbol, :url] The type of source. Always `url`. + # @param type [Symbol, :url] + # The type of source. Always `url`. end end @@ -150,15 +149,13 @@ class OpenPage < OpenAI::Internal::Type::BaseModel optional :url, String, nil?: true # @!method initialize(url: nil, type: :open_page) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage} for - # more details. - # # Action type "open_page" - Opens a specific URL from search results. # - # @param url [String, nil] The URL opened by the model. + # @param url [String, nil] + # The URL opened by the model. # - # @param type [Symbol, :open_page] The action type. + # @param type [Symbol, :open_page] + # The action type. end class Find < OpenAI::Internal::Type::BaseModel @@ -181,17 +178,16 @@ class Find < OpenAI::Internal::Type::BaseModel required :url, String # @!method initialize(pattern:, url:, type: :find_in_page) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find} for - # more details. - # # Action type "find_in_page": Searches for a pattern within a loaded page. # - # @param pattern [String] The pattern or text to search for within the page. + # @param pattern [String] + # The pattern or text to search for within the page. # - # @param url [String] The URL of the page searched for the pattern. + # @param url [String] + # The URL of the page searched for the pattern. # - # @param type [Symbol, :find_in_page] The action type. + # @param type [Symbol, :find_in_page] + # The action type. end # @!method self.variants diff --git a/lib/openai/models/responses/response_image_gen_call_completed_event.rb b/lib/openai/models/responses/response_image_gen_call_completed_event.rb index ceccdcf62..43f12a537 100644 --- a/lib/openai/models/responses/response_image_gen_call_completed_event.rb +++ b/lib/openai/models/responses/response_image_gen_call_completed_event.rb @@ -32,13 +32,17 @@ class ResponseImageGenCallCompletedEvent < OpenAI::Internal::Type::BaseModel # Emitted when an image generation tool call has completed and the final image is # available. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.image_generation_call.completed"] The type of the event. Always 'response.image_generation_call.completed'. + # @param type [Symbol, :"response.image_generation_call.completed"] + # The type of the event. Always 'response.image_generation_call.completed'. end end end diff --git a/lib/openai/models/responses/response_image_gen_call_generating_event.rb b/lib/openai/models/responses/response_image_gen_call_generating_event.rb index d8f9683d6..71632cf1c 100644 --- a/lib/openai/models/responses/response_image_gen_call_generating_event.rb +++ b/lib/openai/models/responses/response_image_gen_call_generating_event.rb @@ -32,13 +32,17 @@ class ResponseImageGenCallGeneratingEvent < OpenAI::Internal::Type::BaseModel # Emitted when an image generation tool call is actively generating an image # (intermediate state). # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param type [Symbol, :"response.image_generation_call.generating"] The type of the event. Always 'response.image_generation_call.generating'. + # @param type [Symbol, :"response.image_generation_call.generating"] + # The type of the event. Always 'response.image_generation_call.generating'. end end end diff --git a/lib/openai/models/responses/response_image_gen_call_in_progress_event.rb b/lib/openai/models/responses/response_image_gen_call_in_progress_event.rb index 83d9ac0ad..4916c685c 100644 --- a/lib/openai/models/responses/response_image_gen_call_in_progress_event.rb +++ b/lib/openai/models/responses/response_image_gen_call_in_progress_event.rb @@ -31,13 +31,17 @@ class ResponseImageGenCallInProgressEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.image_generation_call.in_progress") # Emitted when an image generation tool call is in progress. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param type [Symbol, :"response.image_generation_call.in_progress"] The type of the event. Always 'response.image_generation_call.in_progress'. + # @param type [Symbol, :"response.image_generation_call.in_progress"] + # The type of the event. Always 'response.image_generation_call.in_progress'. end end end diff --git a/lib/openai/models/responses/response_image_gen_call_partial_image_event.rb b/lib/openai/models/responses/response_image_gen_call_partial_image_event.rb index 41ef73429..ad4b4c923 100644 --- a/lib/openai/models/responses/response_image_gen_call_partial_image_event.rb +++ b/lib/openai/models/responses/response_image_gen_call_partial_image_event.rb @@ -66,31 +66,38 @@ class ResponseImageGenCallPartialImageEvent < OpenAI::Internal::Type::BaseModel optional :size, String # @!method initialize(item_id:, output_index:, partial_image_b64:, partial_image_index:, sequence_number:, background: nil, output_format: nil, quality: nil, size: nil, type: :"response.image_generation_call.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseImageGenCallPartialImageEvent} for more - # details. - # # Emitted when a partial image is available during image generation streaming. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param partial_image_b64 [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param partial_image_b64 [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param partial_image_index [Integer] 0-based index for the partial image (backend is 1-based, but this is 0-based for + # @param partial_image_index [Integer] + # 0-based index for the partial image (backend is 1-based, but this is 0-based for + # the user). # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param background [String] The background setting that was used. + # @param background [String] + # The background setting that was used. # - # @param output_format [String] The output format that was used. + # @param output_format [String] + # The output format that was used. # - # @param quality [String] The image quality that was used. + # @param quality [String] + # The image quality that was used. # - # @param size [String] The image size that was used. + # @param size [String] + # The image size that was used. # - # @param type [Symbol, :"response.image_generation_call.partial_image"] The type of the event. Always 'response.image_generation_call.partial_image'. + # @param type [Symbol, :"response.image_generation_call.partial_image"] + # The type of the event. Always 'response.image_generation_call.partial_image'. end end end diff --git a/lib/openai/models/responses/response_in_progress_event.rb b/lib/openai/models/responses/response_in_progress_event.rb index 775c9b0c0..20bf5d66c 100644 --- a/lib/openai/models/responses/response_in_progress_event.rb +++ b/lib/openai/models/responses/response_in_progress_event.rb @@ -23,16 +23,16 @@ class ResponseInProgressEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.in_progress" # @!method initialize(response:, sequence_number:, type: :"response.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInProgressEvent} for more details. - # # Emitted when the response is in progress. # - # @param response [OpenAI::Models::Responses::Response] The response that is in progress. + # @param response [OpenAI::Models::Responses::Response] + # The response that is in progress. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.in_progress"] The type of the event. Always `response.in_progress`. + # @param type [Symbol, :"response.in_progress"] + # The type of the event. Always `response.in_progress`. end end end diff --git a/lib/openai/models/responses/response_incomplete_event.rb b/lib/openai/models/responses/response_incomplete_event.rb index feb269bb9..f1837b485 100644 --- a/lib/openai/models/responses/response_incomplete_event.rb +++ b/lib/openai/models/responses/response_incomplete_event.rb @@ -23,20 +23,20 @@ class ResponseIncompleteEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.incomplete" # @!method initialize(response:, sequence_number:, type: :"response.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseIncompleteEvent} for more details. - # # An event that is emitted when a response finishes as incomplete. # # Over WebSocket, steering can finish a response with # `response.incomplete_details.reason` set to `steered`, followed automatically by # a successor `response.created` that commits the queued steering input. # - # @param response [OpenAI::Models::Responses::Response] The response that was incomplete. + # @param response [OpenAI::Models::Responses::Response] + # The response that was incomplete. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.incomplete"] The type of the event. Always `response.incomplete`. + # @param type [Symbol, :"response.incomplete"] + # The type of the event. Always `response.incomplete`. end end end diff --git a/lib/openai/models/responses/response_input_audio.rb b/lib/openai/models/responses/response_input_audio.rb index 70f024610..e2261b409 100644 --- a/lib/openai/models/responses/response_input_audio.rb +++ b/lib/openai/models/responses/response_input_audio.rb @@ -16,14 +16,12 @@ class ResponseInputAudio < OpenAI::Internal::Type::BaseModel required :type, const: :input_audio # @!method initialize(input_audio:, type: :input_audio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputAudio} for more details. - # # An audio input to the model. # # @param input_audio [OpenAI::Models::Responses::ResponseInputAudio::InputAudio] # - # @param type [Symbol, :input_audio] The type of the input item. Always `input_audio`. + # @param type [Symbol, :input_audio] + # The type of the input item. Always `input_audio`. # @see OpenAI::Models::Responses::ResponseInputAudio#input_audio class InputAudio < OpenAI::Internal::Type::BaseModel @@ -44,12 +42,11 @@ class InputAudio < OpenAI::Internal::Type::BaseModel ) # @!method initialize(data:, format_:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputAudio::InputAudio} for more details. - # - # @param data [String] Base64-encoded audio data. + # @param data [String] + # Base64-encoded audio data. # - # @param format_ [Symbol, OpenAI::Models::Responses::ResponseInputAudio::InputAudio::Format] The format of the audio data. Currently supported formats are `mp3` and + # @param format_ [Symbol, OpenAI::Models::Responses::ResponseInputAudio::InputAudio::Format] + # The format of the audio data. Currently supported formats are `mp3` and `wav`. # The format of the audio data. Currently supported formats are `mp3` and `wav`. # diff --git a/lib/openai/models/responses/response_input_content.rb b/lib/openai/models/responses/response_input_content.rb index 59c6970ec..53305c9b3 100644 --- a/lib/openai/models/responses/response_input_content.rb +++ b/lib/openai/models/responses/response_input_content.rb @@ -12,7 +12,7 @@ module ResponseInputContent # A text input to the model. variant :input_text, -> { OpenAI::Responses::ResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant :input_image, -> { OpenAI::Responses::ResponseInputImage } # A file input to the model. diff --git a/lib/openai/models/responses/response_input_file.rb b/lib/openai/models/responses/response_input_file.rb index f8cd8b0f3..65e778ef9 100644 --- a/lib/openai/models/responses/response_input_file.rb +++ b/lib/openai/models/responses/response_input_file.rb @@ -53,24 +53,34 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Responses::ResponseInputFile::PromptCacheBreakpoint } # @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, prompt_cache_breakpoint: nil, type: :input_file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputFile} for more details. - # # A file input to the model. # - # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFile::Detail] The detail level of the file to be sent to the model. Use `auto` to let the syst + # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFile::Detail] + # The detail level of the file to be sent to the model. Use `auto` to let the + # system select the detail level; for GPT-5.6 and later models, `auto` uses + # high-quality rendering, which may increase input token usage. Use `low` for + # lower-cost rendering, or `high` to render the file at higher quality. Defaults + # to `auto`. # - # @param file_data [String] The content of the file to be sent to the model. + # @param file_data [String] + # The content of the file to be sent to the model. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param file_url [String] The URL of the file to be sent to the model. + # @param file_url [String] + # The URL of the file to be sent to the model. # - # @param filename [String] The name of the file to be sent to the model. + # @param filename [String] + # The name of the file to be sent to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputFile::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputFile::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_file] The type of the input item. Always `input_file`. + # @param type [Symbol, :input_file] + # The type of the input item. Always `input_file`. # The detail level of the file to be sent to the model. Use `auto` to let the # system select the detail level; for GPT-5.6 and later models, `auto` uses @@ -103,7 +113,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_input_file_content.rb b/lib/openai/models/responses/response_input_file_content.rb index 180ecb39c..1721ec9e4 100644 --- a/lib/openai/models/responses/response_input_file_content.rb +++ b/lib/openai/models/responses/response_input_file_content.rb @@ -57,24 +57,34 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, prompt_cache_breakpoint: nil, type: :input_file) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputFileContent} for more details. - # # A file input to the model. # - # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFileContent::Detail] The detail level of the file to be sent to the model. Use `auto` to let the syst + # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFileContent::Detail] + # The detail level of the file to be sent to the model. Use `auto` to let the + # system select the detail level; for GPT-5.6 and later models, `auto` uses + # high-quality rendering, which may increase input token usage. Use `low` for + # lower-cost rendering, or `high` to render the file at higher quality. Defaults + # to `auto`. # - # @param file_data [String, nil] The base64-encoded data of the file to be sent to the model. + # @param file_data [String, nil] + # The base64-encoded data of the file to be sent to the model. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param file_url [String, nil] The URL of the file to be sent to the model. + # @param file_url [String, nil] + # The URL of the file to be sent to the model. # - # @param filename [String, nil] The name of the file to be sent to the model. + # @param filename [String, nil] + # The name of the file to be sent to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputFileContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputFileContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_file] The type of the input item. Always `input_file`. + # @param type [Symbol, :input_file] + # The type of the input item. Always `input_file`. # The detail level of the file to be sent to the model. Use `auto` to let the # system select the detail level; for GPT-5.6 and later models, `auto` uses @@ -107,7 +117,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_input_image.rb b/lib/openai/models/responses/response_input_image.rb index e5f26a674..575ab6110 100644 --- a/lib/openai/models/responses/response_input_image.rb +++ b/lib/openai/models/responses/response_input_image.rb @@ -39,21 +39,27 @@ class ResponseInputImage < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Responses::ResponseInputImage::PromptCacheBreakpoint } # @!method initialize(detail:, file_id: nil, image_url: nil, prompt_cache_breakpoint: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputImage} for more details. - # # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision). + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). # - # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputImage::Detail] The detail level of the image to be sent to the model. One of `high`, `low`, `au + # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputImage::Detail] + # The detail level of the image to be sent to the model. One of `high`, `low`, + # `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param image_url [String, nil] The URL of the image to be sent to the model. A fully qualified URL or base64 en + # @param image_url [String, nil] + # The URL of the image to be sent to the model. A fully qualified URL or base64 + # encoded image in a data URL. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputImage::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputImage::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_image] The type of the input item. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the input item. Always `input_image`. # The detail level of the image to be sent to the model. One of `high`, `low`, # `auto`, or `original`. Defaults to `auto`. @@ -84,7 +90,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_input_image_content.rb b/lib/openai/models/responses/response_input_image_content.rb index 35ab8ad2e..bc8c0b093 100644 --- a/lib/openai/models/responses/response_input_image_content.rb +++ b/lib/openai/models/responses/response_input_image_content.rb @@ -43,21 +43,27 @@ class ResponseInputImageContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detail: nil, file_id: nil, image_url: nil, prompt_cache_breakpoint: nil, type: :input_image) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputImageContent} for more details. - # # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision) + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision) # - # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputImageContent::Detail, nil] The detail level of the image to be sent to the model. One of `high`, `low`, `au + # @param detail [Symbol, OpenAI::Models::Responses::ResponseInputImageContent::Detail, nil] + # The detail level of the image to be sent to the model. One of `high`, `low`, + # `auto`, or `original`. Defaults to `auto`. # - # @param file_id [String, nil] The ID of the file to be sent to the model. + # @param file_id [String, nil] + # The ID of the file to be sent to the model. # - # @param image_url [String, nil] The URL of the image to be sent to the model. A fully qualified URL or base64 en + # @param image_url [String, nil] + # The URL of the image to be sent to the model. A fully qualified URL or base64 + # encoded image in a data URL. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputImageContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputImageContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_image] The type of the input item. Always `input_image`. + # @param type [Symbol, :input_image] + # The type of the input item. Always `input_image`. # The detail level of the image to be sent to the model. One of `high`, `low`, # `auto`, or `original`. Defaults to `auto`. @@ -88,7 +94,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_input_item.rb b/lib/openai/models/responses/response_input_item.rb index 19f3df219..787686d9a 100644 --- a/lib/openai/models/responses/response_input_item.rb +++ b/lib/openai/models/responses/response_input_item.rb @@ -29,22 +29,22 @@ module ResponseInputItem variant :message, -> { OpenAI::Responses::ResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Responses::ResponseFileSearchToolCall } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Responses::ResponseComputerToolCall } # The output of a computer tool call. variant :computer_call_output, -> { OpenAI::Responses::ResponseInputItem::ComputerCallOutput } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Responses::ResponseFunctionWebSearch } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Responses::ResponseFunctionToolCall } # The output of a function tool call. @@ -64,10 +64,10 @@ module ResponseInputItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Responses::ResponseReasoningItem } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Responses::ResponseCompactionItemParam } # An image generation request made by the model. @@ -150,20 +150,23 @@ class Message < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Responses::ResponseInputItem::Message::Type } # @!method initialize(content:, role:, status: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::Message} for more details. - # # A message input to the model with a role indicating instruction following # hierarchy. Instructions given with the `developer` or `system` role take # precedence over instructions given with the `user` role. # - # @param content [Array] A list of one or many input items to the model, containing different content + # @param content [Array] + # A list of one or many input items to the model, containing different content + # types. # - # @param role [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Role] The role of the message input. One of `user`, `system`, or `developer`. + # @param role [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Role] + # The role of the message input. One of `user`, `system`, or `developer`. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Status] The status of item. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Status] + # The status of item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Type] The type of the message input. Always set to `message`. + # @param type [Symbol, OpenAI::Models::Responses::ResponseInputItem::Message::Type] + # The type of the message input. Always set to `message`. # The role of the message input. One of `user`, `system`, or `developer`. # @@ -259,24 +262,27 @@ class ComputerCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, acknowledged_safety_checks: nil, status: nil, type: :computer_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput} for more - # details. - # # The output of a computer tool call. # - # @param call_id [String] The ID of the computer tool call that produced the output. + # @param call_id [String] + # The ID of the computer tool call that produced the output. # - # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot] A computer screenshot image used with the computer use tool. + # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot] + # A computer screenshot image used with the computer use tool. # - # @param id [String, nil] The ID of the computer tool call output. + # @param id [String, nil] + # The ID of the computer tool call output. # - # @param acknowledged_safety_checks [Array, nil] The safety checks reported by the API that have been acknowledged by the develop + # @param acknowledged_safety_checks [Array, nil] + # The safety checks reported by the API that have been acknowledged by the + # developer. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Status, nil] The status of the message input. One of `in_progress`, `completed`, or `incomple + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Status, nil] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param type [Symbol, :computer_call_output] The type of the computer tool call output. Always `computer_call_output`. - + # @param type [Symbol, :computer_call_output] + # The type of the computer tool call output. Always `computer_call_output`. class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!attribute id # The ID of the pending safety check. @@ -299,11 +305,14 @@ class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, code: nil, message: nil) # A pending safety check for the computer call. # - # @param id [String] The ID of the pending safety check. + # @param id [String] + # The ID of the pending safety check. # - # @param code [String, nil] The type of the pending safety check. + # @param code [String, nil] + # The type of the pending safety check. # - # @param message [String, nil] Details about the pending safety check. + # @param message [String, nil] + # Details about the pending safety check. end # The status of the message input. One of `in_progress`, `completed`, or @@ -383,27 +392,33 @@ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(output:, id: nil, call_id: nil, caller_: nil, name: nil, namespace: nil, status: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput} for more - # details. - # # The output of a function tool call. # - # @param output [String, Array] Text, image, or file output of the function tool call. + # @param output [String, Array] + # Text, image, or file output of the function tool call. # - # @param id [String, nil] The unique ID of the function tool call output. Populated when this item is retu + # @param id [String, nil] + # The unique ID of the function tool call output. Populated when this item is + # returned via API. # - # @param call_id [String, nil] The unique ID of the function tool call generated by the model. + # @param call_id [String, nil] + # The unique ID of the function tool call generated by the model. # - # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param name [String, nil] The name of the tool that produced the output. + # @param name [String, nil] + # The name of the tool that produced the output. # - # @param namespace [String, nil] The namespace of the tool that produced the output. + # @param namespace [String, nil] + # The namespace of the tool that produced the output. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. Popu + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # Text, image, or file output of the function tool call. # @@ -441,7 +456,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -458,9 +474,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -527,17 +545,23 @@ class ToolSearchCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(arguments:, id: nil, call_id: nil, execution: nil, status: nil, type: :tool_search_call) - # @param arguments [Object] The arguments supplied to the tool search call. + # @param arguments [Object] + # The arguments supplied to the tool search call. # - # @param id [String, nil] The unique ID of this tool search call. + # @param id [String, nil] + # The unique ID of this tool search call. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall::Status, nil] The status of the tool search call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall::Status, nil] + # The status of the tool search call. # - # @param type [Symbol, :tool_search_call] The item type. Always `tool_search_call`. + # @param type [Symbol, :tool_search_call] + # The item type. Always `tool_search_call`. # Whether tool search was executed by the server or by the client. # @@ -593,13 +617,17 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel optional :id, String, nil?: true # @!method initialize(tools:, id: nil, role: :developer, type: :additional_tools) - # @param tools [Array] A list of additional tools made available at this item. + # @param tools [Array] + # A list of additional tools made available at this item. # - # @param id [String, nil] The unique ID of this additional tools item. + # @param id [String, nil] + # The unique ID of this additional tools item. # - # @param role [Symbol, :developer] The role that provided the additional tools. Only `developer` is supported. + # @param role [Symbol, :developer] + # The role that provided the additional tools. Only `developer` is supported. # - # @param type [Symbol, :additional_tools] The item type. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The item type. Always `additional_tools`. end class ImageGenerationCall < OpenAI::Internal::Type::BaseModel @@ -651,23 +679,26 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, result:, status:, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall} for more - # details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param quality [Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -773,20 +804,22 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel required :type, const: :local_shell_call # @!method initialize(id:, action:, call_id:, status:, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::LocalShellCall} for more details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Responses::ResponseInputItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Responses::ResponseInputItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Responses::ResponseInputItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -829,17 +862,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -887,19 +926,19 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # @@ -971,24 +1010,30 @@ class ShellCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseInputItem::ShellCall::Status }, nil?: true # @!method initialize(action:, call_id:, id: nil, caller_: nil, environment: nil, status: nil, type: :shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ShellCall} for more details. - # # A tool representing a request to execute one or more shell commands. # - # @param action [OpenAI::Models::Responses::ResponseInputItem::ShellCall::Action] The shell commands and limits that describe how to run the tool call. + # @param action [OpenAI::Models::Responses::ResponseInputItem::ShellCall::Action] + # The shell commands and limits that describe how to run the tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param id [String, nil] The unique ID of the shell tool call. Populated when this item is returned via A + # @param id [String, nil] + # The unique ID of the shell tool call. Populated when this item is returned via + # API. # - # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ShellCall::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ShellCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ShellCall::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ShellCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param environment [OpenAI::Models::Responses::LocalEnvironment, OpenAI::Models::Responses::ContainerReference, nil] The environment to execute the shell commands in. + # @param environment [OpenAI::Models::Responses::LocalEnvironment, OpenAI::Models::Responses::ContainerReference, nil] + # The environment to execute the shell commands in. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCall::Status, nil] The status of the shell call. One of `in_progress`, `completed`, or `incomplete` + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCall::Status, nil] + # The status of the shell call. One of `in_progress`, `completed`, or + # `incomplete`. # - # @param type [Symbol, :shell_call] The type of the item. Always `shell_call`. + # @param type [Symbol, :shell_call] + # The type of the item. Always `shell_call`. # @see OpenAI::Models::Responses::ResponseInputItem::ShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -1012,17 +1057,17 @@ class Action < OpenAI::Internal::Type::BaseModel optional :timeout_ms, Integer, nil?: true # @!method initialize(commands:, max_output_length: nil, timeout_ms: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ShellCall::Action} for more - # details. - # # The shell commands and limits that describe how to run the tool call. # - # @param commands [Array] Ordered shell commands for the execution environment to run. + # @param commands [Array] + # Ordered shell commands for the execution environment to run. # - # @param max_output_length [Integer, nil] Maximum number of UTF-8 characters to capture from combined stdout and stderr ou + # @param max_output_length [Integer, nil] + # Maximum number of UTF-8 characters to capture from combined stdout and stderr + # output. # - # @param timeout_ms [Integer, nil] Maximum wall-clock time in milliseconds to allow the shell commands to run. + # @param timeout_ms [Integer, nil] + # Maximum wall-clock time in milliseconds to allow the shell commands to run. end # The execution context that produced this tool call. @@ -1045,7 +1090,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1062,9 +1108,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1164,25 +1212,31 @@ class ShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, output:, id: nil, caller_: nil, max_output_length: nil, status: nil, type: :shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput} for more - # details. - # # The streamed output items emitted by a shell tool call. # - # @param call_id [String] The unique ID of the shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the shell tool call generated by the model. # - # @param output [Array] Captured chunks of stdout and stderr output, along with their associated outcome + # @param output [Array] + # Captured chunks of stdout and stderr output, along with their associated + # outcomes. # - # @param id [String, nil] The unique ID of the shell tool call output. Populated when this item is returne + # @param id [String, nil] + # The unique ID of the shell tool call output. Populated when this item is + # returned via API. # - # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param max_output_length [Integer, nil] The maximum number of UTF-8 characters captured for this shell call's combined o + # @param max_output_length [Integer, nil] + # The maximum number of UTF-8 characters captured for this shell call's combined + # output. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil] The status of the shell call output. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil] + # The status of the shell call output. # - # @param type [Symbol, :shell_call_output] The type of the item. Always `shell_call_output`. + # @param type [Symbol, :shell_call_output] + # The type of the item. Always `shell_call_output`. # The execution context that produced this tool call. # @@ -1204,7 +1258,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1221,9 +1276,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1290,23 +1347,28 @@ class ApplyPatchCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, operation:, status:, id: nil, caller_: nil, type: :apply_patch_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall} for more details. - # # A tool call representing a request to create, delete, or update files using diff # patches. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param operation [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::CreateFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::DeleteFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::UpdateFile] The specific create, delete, or update instruction for the apply_patch tool call + # @param operation [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::CreateFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::DeleteFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::UpdateFile] + # The specific create, delete, or update instruction for the apply_patch tool + # call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Status] The status of the apply patch tool call. One of `in_progress` or `completed`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Status] + # The status of the apply patch tool call. One of `in_progress` or `completed`. # - # @param id [String, nil] The unique ID of the apply patch tool call. Populated when this item is returned + # @param id [String, nil] + # The unique ID of the apply patch tool call. Populated when this item is returned + # via API. # - # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param type [Symbol, :apply_patch_call] The type of the item. Always `apply_patch_call`. + # @param type [Symbol, :apply_patch_call] + # The type of the item. Always `apply_patch_call`. # The specific create, delete, or update instruction for the apply_patch tool # call. @@ -1348,11 +1410,14 @@ class CreateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :create_file) # Instruction for creating a new file via the apply_patch tool. # - # @param diff [String] Unified diff content to apply when creating the file. + # @param diff [String] + # Unified diff content to apply when creating the file. # - # @param path [String] Path of the file to create relative to the workspace root. + # @param path [String] + # Path of the file to create relative to the workspace root. # - # @param type [Symbol, :create_file] The operation type. Always `create_file`. + # @param type [Symbol, :create_file] + # The operation type. Always `create_file`. end class DeleteFile < OpenAI::Internal::Type::BaseModel @@ -1371,9 +1436,11 @@ class DeleteFile < OpenAI::Internal::Type::BaseModel # @!method initialize(path:, type: :delete_file) # Instruction for deleting an existing file via the apply_patch tool. # - # @param path [String] Path of the file to delete relative to the workspace root. + # @param path [String] + # Path of the file to delete relative to the workspace root. # - # @param type [Symbol, :delete_file] The operation type. Always `delete_file`. + # @param type [Symbol, :delete_file] + # The operation type. Always `delete_file`. end class UpdateFile < OpenAI::Internal::Type::BaseModel @@ -1398,11 +1465,14 @@ class UpdateFile < OpenAI::Internal::Type::BaseModel # @!method initialize(diff:, path:, type: :update_file) # Instruction for updating an existing file via the apply_patch tool. # - # @param diff [String] Unified diff content to apply to the existing file. + # @param diff [String] + # Unified diff content to apply to the existing file. # - # @param path [String] Path of the file to update relative to the workspace root. + # @param path [String] + # Path of the file to update relative to the workspace root. # - # @param type [Symbol, :update_file] The operation type. Always `update_file`. + # @param type [Symbol, :update_file] + # The operation type. Always `update_file`. end # @!method self.variants @@ -1442,7 +1512,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1459,9 +1530,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1514,23 +1587,27 @@ class ApplyPatchCallOutput < OpenAI::Internal::Type::BaseModel optional :output, String, nil?: true # @!method initialize(call_id:, status:, id: nil, caller_: nil, output: nil, type: :apply_patch_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput} for more - # details. - # # The streamed output emitted by an apply patch tool call. # - # @param call_id [String] The unique ID of the apply patch tool call generated by the model. + # @param call_id [String] + # The unique ID of the apply patch tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Status] The status of the apply patch tool call output. One of `completed` or `failed`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Status] + # The status of the apply patch tool call output. One of `completed` or `failed`. # - # @param id [String, nil] The unique ID of the apply patch tool call output. Populated when this item is r + # @param id [String, nil] + # The unique ID of the apply patch tool call output. Populated when this item is + # returned via API. # - # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param output [String, nil] Optional human-readable log text from the apply patch tool (e.g., patch results + # @param output [String, nil] + # Optional human-readable log text from the apply patch tool (e.g., patch results + # or errors). # - # @param type [Symbol, :apply_patch_call_output] The type of the item. Always `apply_patch_call_output`. + # @param type [Symbol, :apply_patch_call_output] + # The type of the item. Always `apply_patch_call_output`. # The status of the apply patch tool call output. One of `completed` or `failed`. # @@ -1565,7 +1642,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -1582,9 +1660,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants @@ -1627,21 +1707,22 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -1668,19 +1749,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::McpListTools::Tool} for more - # details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end end @@ -1716,21 +1797,22 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel required :type, const: :mcp_approval_request # @!method initialize(id:, arguments:, name:, server_label:, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest} for more - # details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. end class McpApprovalResponse < OpenAI::Internal::Type::BaseModel @@ -1765,21 +1847,22 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(approval_request_id:, approve:, id: nil, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse} for more - # details. - # # A response to an MCP approval request. # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param id [String, nil] The unique ID of the approval response + # @param id [String, nil] + # The unique ID of the approval response # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. end class McpCall < OpenAI::Internal::Type::BaseModel @@ -1841,28 +1924,37 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseInputItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, # `calling`, or `failed`. @@ -1892,7 +1984,8 @@ class CompactionTrigger < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :compaction_trigger) # Compacts the current context. Must be the final input item. # - # @param type [Symbol, :compaction_trigger] The type of the item. Always `compaction_trigger`. + # @param type [Symbol, :compaction_trigger] + # The type of the item. Always `compaction_trigger`. end class ItemReference < OpenAI::Internal::Type::BaseModel @@ -1911,9 +2004,11 @@ class ItemReference < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, type: nil) # An internal identifier for an item to reference. # - # @param id [String] The ID of the item to reference. + # @param id [String] + # The ID of the item to reference. # - # @param type [Symbol, OpenAI::Models::Responses::ResponseInputItem::ItemReference::Type, nil] The type of item to reference. Always `item_reference`. + # @param type [Symbol, OpenAI::Models::Responses::ResponseInputItem::ItemReference::Type, nil] + # The type of item to reference. Always `item_reference`. # The type of item to reference. Always `item_reference`. # @@ -1960,15 +2055,20 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(id:, call_id:, code:, fingerprint:, type: :program) - # @param id [String] The unique ID of this program item. + # @param id [String] + # The unique ID of this program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param type [Symbol, :program] The item type. Always `program`. + # @param type [Symbol, :program] + # The item type. Always `program`. end class ProgramOutput < OpenAI::Internal::Type::BaseModel @@ -2003,15 +2103,20 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel required :type, const: :program_output # @!method initialize(id:, call_id:, result:, status:, type: :program_output) - # @param id [String] The unique ID of this program output item. + # @param id [String] + # The unique ID of this program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ProgramOutput::Status] The terminal status of the program output. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ProgramOutput::Status] + # The terminal status of the program output. # - # @param type [Symbol, :program_output] The item type. Always `program_output`. + # @param type [Symbol, :program_output] + # The item type. Always `program_output`. # The terminal status of the program output. # diff --git a/lib/openai/models/responses/response_input_message_item.rb b/lib/openai/models/responses/response_input_message_item.rb index 979b61644..96e838531 100644 --- a/lib/openai/models/responses/response_input_message_item.rb +++ b/lib/openai/models/responses/response_input_message_item.rb @@ -37,18 +37,22 @@ class ResponseInputMessageItem < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseInputMessageItem::Status } # @!method initialize(id:, content:, role:, status: nil, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputMessageItem} for more details. + # @param id [String] + # The unique ID of the message input. # - # @param id [String] The unique ID of the message input. + # @param content [Array] + # A list of one or many input items to the model, containing different content + # types. # - # @param content [Array] A list of one or many input items to the model, containing different content + # @param role [Symbol, OpenAI::Models::Responses::ResponseInputMessageItem::Role] + # The role of the message input. One of `user`, `system`, or `developer`. # - # @param role [Symbol, OpenAI::Models::Responses::ResponseInputMessageItem::Role] The role of the message input. One of `user`, `system`, or `developer`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseInputMessageItem::Status] + # The status of item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseInputMessageItem::Status] The status of item. One of `in_progress`, `completed`, or - # - # @param type [Symbol, :message] The type of the message input. Always set to `message`. + # @param type [Symbol, :message] + # The type of the message input. Always set to `message`. # The role of the message input. One of `user`, `system`, or `developer`. # diff --git a/lib/openai/models/responses/response_input_text.rb b/lib/openai/models/responses/response_input_text.rb index 049e01756..4b2d071d3 100644 --- a/lib/openai/models/responses/response_input_text.rb +++ b/lib/openai/models/responses/response_input_text.rb @@ -25,16 +25,18 @@ class ResponseInputText < OpenAI::Internal::Type::BaseModel optional :prompt_cache_breakpoint, -> { OpenAI::Responses::ResponseInputText::PromptCacheBreakpoint } # @!method initialize(text:, prompt_cache_breakpoint: nil, type: :input_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputText} for more details. - # # A text input to the model. # - # @param text [String] The text input to the model. + # @param text [String] + # The text input to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputText::PromptCacheBreakpoint] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputText::PromptCacheBreakpoint] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_text] The type of the input item. Always `input_text`. + # @param type [Symbol, :input_text] + # The type of the input item. Always `input_text`. # @see OpenAI::Models::Responses::ResponseInputText#prompt_cache_breakpoint class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel @@ -49,7 +51,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_input_text_content.rb b/lib/openai/models/responses/response_input_text_content.rb index 272d91145..1ae728cb8 100644 --- a/lib/openai/models/responses/response_input_text_content.rb +++ b/lib/openai/models/responses/response_input_text_content.rb @@ -29,16 +29,18 @@ class ResponseInputTextContent < OpenAI::Internal::Type::BaseModel ) # @!method initialize(text:, prompt_cache_breakpoint: nil, type: :input_text) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseInputTextContent} for more details. - # # A text input to the model. # - # @param text [String] The text input to the model. + # @param text [String] + # The text input to the model. # - # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputTextContent::PromptCacheBreakpoint, nil] Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # @param prompt_cache_breakpoint [OpenAI::Models::Responses::ResponseInputTextContent::PromptCacheBreakpoint, nil] + # Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL + # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a + # token block. # - # @param type [Symbol, :input_text] The type of the input item. Always `input_text`. + # @param type [Symbol, :input_text] + # The type of the input item. Always `input_text`. # @see OpenAI::Models::Responses::ResponseInputTextContent#prompt_cache_breakpoint class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel @@ -53,7 +55,8 @@ class PromptCacheBreakpoint < OpenAI::Internal::Type::BaseModel # from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a # token block. # - # @param mode [Symbol, :explicit] The breakpoint mode. Always `explicit`. + # @param mode [Symbol, :explicit] + # The breakpoint mode. Always `explicit`. end end end diff --git a/lib/openai/models/responses/response_item.rb b/lib/openai/models/responses/response_item.rb index 7599bd8f4..543d38d89 100644 --- a/lib/openai/models/responses/response_item.rb +++ b/lib/openai/models/responses/response_item.rb @@ -15,21 +15,21 @@ module ResponseItem variant :message, -> { OpenAI::Responses::ResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Responses::ResponseFileSearchToolCall } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Responses::ResponseComputerToolCall } variant :computer_call_output, -> { OpenAI::Responses::ResponseComputerToolCallOutputItem } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Responses::ResponseFunctionWebSearch } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Responses::ResponseFunctionToolCallItem } variant :function_call_output, -> { OpenAI::Responses::ResponseFunctionToolCallOutputItem } @@ -47,14 +47,14 @@ module ResponseItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Responses::ResponseReasoningItem } variant :program, -> { OpenAI::Responses::ResponseItem::Program } variant :program_output, -> { OpenAI::Responses::ResponseItem::ProgramOutput } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Responses::ResponseCompactionItem } # An image generation request made by the model. @@ -125,13 +125,17 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel required :type, const: :additional_tools # @!method initialize(id:, role:, tools:, type: :additional_tools) - # @param id [String] The unique ID of the additional tools item. + # @param id [String] + # The unique ID of the additional tools item. # - # @param role [Symbol, OpenAI::Models::Responses::ResponseItem::AdditionalTools::Role] The role that provided the additional tools. + # @param role [Symbol, OpenAI::Models::Responses::ResponseItem::AdditionalTools::Role] + # The role that provided the additional tools. # - # @param tools [Array] The additional tool definitions made available at this item. + # @param tools [Array] + # The additional tool definitions made available at this item. # - # @param type [Symbol, :additional_tools] The type of the item. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The type of the item. Always `additional_tools`. # The role that provided the additional tools. # @@ -185,15 +189,20 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(id:, call_id:, code:, fingerprint:, type: :program) - # @param id [String] The unique ID of the program item. + # @param id [String] + # The unique ID of the program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param type [Symbol, :program] The type of the item. Always `program`. + # @param type [Symbol, :program] + # The type of the item. Always `program`. end class ProgramOutput < OpenAI::Internal::Type::BaseModel @@ -228,15 +237,20 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel required :type, const: :program_output # @!method initialize(id:, call_id:, result:, status:, type: :program_output) - # @param id [String] The unique ID of the program output item. + # @param id [String] + # The unique ID of the program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::ProgramOutput::Status] The terminal status of the program output item. + # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::ProgramOutput::Status] + # The terminal status of the program output item. # - # @param type [Symbol, :program_output] The type of the item. Always `program_output`. + # @param type [Symbol, :program_output] + # The type of the item. Always `program_output`. # The terminal status of the program output item. # @@ -297,22 +311,26 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel optional :size, union: -> { OpenAI::Responses::ResponseItem::ImageGenerationCall::Size }, nil?: true # @!method initialize(id:, result:, status:, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::ImageGenerationCall} for more details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param quality [Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Responses::ResponseItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -410,20 +428,22 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel required :type, const: :local_shell_call # @!method initialize(id:, action:, call_id:, status:, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::LocalShellCall} for more details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Responses::ResponseItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Responses::ResponseItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Responses::ResponseItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -466,17 +486,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -526,19 +552,19 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # @@ -590,21 +616,22 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -631,18 +658,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::McpListTools::Tool} for more details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end end @@ -678,20 +706,22 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel required :type, const: :mcp_approval_request # @!method initialize(id:, arguments:, name:, server_label:, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::McpApprovalRequest} for more details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. end class McpApprovalResponse < OpenAI::Internal::Type::BaseModel @@ -726,20 +756,22 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(id:, approval_request_id:, approve:, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::McpApprovalResponse} for more details. - # # A response to an MCP approval request. # - # @param id [String] The unique ID of the approval response + # @param id [String] + # The unique ID of the approval response # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. end class McpCall < OpenAI::Internal::Type::BaseModel @@ -801,28 +833,37 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, # `calling`, or `failed`. diff --git a/lib/openai/models/responses/response_item_list.rb b/lib/openai/models/responses/response_item_list.rb index edfcf844b..93c0ac089 100644 --- a/lib/openai/models/responses/response_item_list.rb +++ b/lib/openai/models/responses/response_item_list.rb @@ -37,15 +37,20 @@ class ResponseItemList < OpenAI::Internal::Type::BaseModel # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) # A list of Response items. # - # @param data [Array] A list of items used to generate this response. + # @param data [Array] + # A list of items used to generate this response. # - # @param first_id [String] The ID of the first item in the list. + # @param first_id [String] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String] The ID of the last item in the list. + # @param last_id [String] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. end end diff --git a/lib/openai/models/responses/response_local_environment.rb b/lib/openai/models/responses/response_local_environment.rb index f999cd1c7..c3ffbf130 100644 --- a/lib/openai/models/responses/response_local_environment.rb +++ b/lib/openai/models/responses/response_local_environment.rb @@ -13,7 +13,8 @@ class ResponseLocalEnvironment < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :local) # Represents the use of a local environment to perform shell actions. # - # @param type [Symbol, :local] The environment type. Always `local`. + # @param type [Symbol, :local] + # The environment type. Always `local`. end end end diff --git a/lib/openai/models/responses/response_mcp_call_arguments_delta_event.rb b/lib/openai/models/responses/response_mcp_call_arguments_delta_event.rb index c5f7d2f3f..c965134f8 100644 --- a/lib/openai/models/responses/response_mcp_call_arguments_delta_event.rb +++ b/lib/openai/models/responses/response_mcp_call_arguments_delta_event.rb @@ -36,22 +36,24 @@ class ResponseMcpCallArgumentsDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.mcp_call_arguments.delta" # @!method initialize(delta:, item_id:, output_index:, sequence_number:, type: :"response.mcp_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseMcpCallArgumentsDeltaEvent} for more - # details. - # # Emitted when there is a delta (partial update) to the arguments of an MCP tool # call. # - # @param delta [String] A JSON string containing the partial update to the arguments for the MCP tool ca + # @param delta [String] + # A JSON string containing the partial update to the arguments for the MCP tool + # call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_call_arguments.delta"] The type of the event. Always 'response.mcp_call_arguments.delta'. + # @param type [Symbol, :"response.mcp_call_arguments.delta"] + # The type of the event. Always 'response.mcp_call_arguments.delta'. end end end diff --git a/lib/openai/models/responses/response_mcp_call_arguments_done_event.rb b/lib/openai/models/responses/response_mcp_call_arguments_done_event.rb index 8b52f9db7..366bddaba 100644 --- a/lib/openai/models/responses/response_mcp_call_arguments_done_event.rb +++ b/lib/openai/models/responses/response_mcp_call_arguments_done_event.rb @@ -35,20 +35,22 @@ class ResponseMcpCallArgumentsDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.mcp_call_arguments.done" # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, type: :"response.mcp_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseMcpCallArgumentsDoneEvent} for more details. - # # Emitted when the arguments for an MCP tool call are finalized. # - # @param arguments [String] A JSON string containing the finalized arguments for the MCP tool call. + # @param arguments [String] + # A JSON string containing the finalized arguments for the MCP tool call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_call_arguments.done"] The type of the event. Always 'response.mcp_call_arguments.done'. + # @param type [Symbol, :"response.mcp_call_arguments.done"] + # The type of the event. Always 'response.mcp_call_arguments.done'. end end end diff --git a/lib/openai/models/responses/response_mcp_call_completed_event.rb b/lib/openai/models/responses/response_mcp_call_completed_event.rb index 217de6ff2..0de3f250b 100644 --- a/lib/openai/models/responses/response_mcp_call_completed_event.rb +++ b/lib/openai/models/responses/response_mcp_call_completed_event.rb @@ -31,13 +31,17 @@ class ResponseMcpCallCompletedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.mcp_call.completed") # Emitted when an MCP tool call has completed successfully. # - # @param item_id [String] The ID of the MCP tool call item that completed. + # @param item_id [String] + # The ID of the MCP tool call item that completed. # - # @param output_index [Integer] The index of the output item that completed. + # @param output_index [Integer] + # The index of the output item that completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_call.completed"] The type of the event. Always 'response.mcp_call.completed'. + # @param type [Symbol, :"response.mcp_call.completed"] + # The type of the event. Always 'response.mcp_call.completed'. end end end diff --git a/lib/openai/models/responses/response_mcp_call_failed_event.rb b/lib/openai/models/responses/response_mcp_call_failed_event.rb index 2ddbc594c..0d157dcc5 100644 --- a/lib/openai/models/responses/response_mcp_call_failed_event.rb +++ b/lib/openai/models/responses/response_mcp_call_failed_event.rb @@ -31,13 +31,17 @@ class ResponseMcpCallFailedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.mcp_call.failed") # Emitted when an MCP tool call has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_call.failed"] The type of the event. Always 'response.mcp_call.failed'. + # @param type [Symbol, :"response.mcp_call.failed"] + # The type of the event. Always 'response.mcp_call.failed'. end end end diff --git a/lib/openai/models/responses/response_mcp_call_in_progress_event.rb b/lib/openai/models/responses/response_mcp_call_in_progress_event.rb index 4d02f14f4..1dc00b71a 100644 --- a/lib/openai/models/responses/response_mcp_call_in_progress_event.rb +++ b/lib/openai/models/responses/response_mcp_call_in_progress_event.rb @@ -31,13 +31,17 @@ class ResponseMcpCallInProgressEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.mcp_call.in_progress") # Emitted when an MCP tool call is in progress. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_call.in_progress"] The type of the event. Always 'response.mcp_call.in_progress'. + # @param type [Symbol, :"response.mcp_call.in_progress"] + # The type of the event. Always 'response.mcp_call.in_progress'. end end end diff --git a/lib/openai/models/responses/response_mcp_list_tools_completed_event.rb b/lib/openai/models/responses/response_mcp_list_tools_completed_event.rb index fd58a5992..2b1f50a97 100644 --- a/lib/openai/models/responses/response_mcp_list_tools_completed_event.rb +++ b/lib/openai/models/responses/response_mcp_list_tools_completed_event.rb @@ -31,13 +31,17 @@ class ResponseMcpListToolsCompletedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.mcp_list_tools.completed") # Emitted when the list of available MCP tools has been successfully retrieved. # - # @param item_id [String] The ID of the MCP tool call item that produced this output. + # @param item_id [String] + # The ID of the MCP tool call item that produced this output. # - # @param output_index [Integer] The index of the output item that was processed. + # @param output_index [Integer] + # The index of the output item that was processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_list_tools.completed"] The type of the event. Always 'response.mcp_list_tools.completed'. + # @param type [Symbol, :"response.mcp_list_tools.completed"] + # The type of the event. Always 'response.mcp_list_tools.completed'. end end end diff --git a/lib/openai/models/responses/response_mcp_list_tools_failed_event.rb b/lib/openai/models/responses/response_mcp_list_tools_failed_event.rb index d93f1e94b..4551cad3c 100644 --- a/lib/openai/models/responses/response_mcp_list_tools_failed_event.rb +++ b/lib/openai/models/responses/response_mcp_list_tools_failed_event.rb @@ -31,13 +31,17 @@ class ResponseMcpListToolsFailedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.mcp_list_tools.failed") # Emitted when the attempt to list available MCP tools has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_list_tools.failed"] The type of the event. Always 'response.mcp_list_tools.failed'. + # @param type [Symbol, :"response.mcp_list_tools.failed"] + # The type of the event. Always 'response.mcp_list_tools.failed'. end end end diff --git a/lib/openai/models/responses/response_mcp_list_tools_in_progress_event.rb b/lib/openai/models/responses/response_mcp_list_tools_in_progress_event.rb index 5bf708acc..05e0a2cd7 100644 --- a/lib/openai/models/responses/response_mcp_list_tools_in_progress_event.rb +++ b/lib/openai/models/responses/response_mcp_list_tools_in_progress_event.rb @@ -32,13 +32,17 @@ class ResponseMcpListToolsInProgressEvent < OpenAI::Internal::Type::BaseModel # Emitted when the system is in the process of retrieving the list of available # MCP tools. # - # @param item_id [String] The ID of the MCP tool call item that is being processed. + # @param item_id [String] + # The ID of the MCP tool call item that is being processed. # - # @param output_index [Integer] The index of the output item that is being processed. + # @param output_index [Integer] + # The index of the output item that is being processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.mcp_list_tools.in_progress"] The type of the event. Always 'response.mcp_list_tools.in_progress'. + # @param type [Symbol, :"response.mcp_list_tools.in_progress"] + # The type of the event. Always 'response.mcp_list_tools.in_progress'. end end end diff --git a/lib/openai/models/responses/response_output_audio.rb b/lib/openai/models/responses/response_output_audio.rb index 811fed00d..4d056e53c 100644 --- a/lib/openai/models/responses/response_output_audio.rb +++ b/lib/openai/models/responses/response_output_audio.rb @@ -23,16 +23,16 @@ class ResponseOutputAudio < OpenAI::Internal::Type::BaseModel required :type, const: :output_audio # @!method initialize(data:, transcript:, type: :output_audio) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputAudio} for more details. - # # An audio output from the model. # - # @param data [String] Base64-encoded audio data from the model. + # @param data [String] + # Base64-encoded audio data from the model. # - # @param transcript [String] The transcript of the audio data from the model. + # @param transcript [String] + # The transcript of the audio data from the model. # - # @param type [Symbol, :output_audio] The type of the output audio. Always `output_audio`. + # @param type [Symbol, :output_audio] + # The type of the output audio. Always `output_audio`. end end end diff --git a/lib/openai/models/responses/response_output_item.rb b/lib/openai/models/responses/response_output_item.rb index 7b7fbef52..349e44e85 100644 --- a/lib/openai/models/responses/response_output_item.rb +++ b/lib/openai/models/responses/response_output_item.rb @@ -13,21 +13,21 @@ module ResponseOutputItem variant :message, -> { OpenAI::Responses::ResponseOutputMessage } # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information. variant :file_search_call, -> { OpenAI::Responses::ResponseFileSearchToolCall } # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information. variant :function_call, -> { OpenAI::Responses::ResponseFunctionToolCall } variant :function_call_output, -> { OpenAI::Responses::ResponseFunctionToolCallOutputItem } # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information. variant :web_search_call, -> { OpenAI::Responses::ResponseFunctionWebSearch } # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information. variant :computer_call, -> { OpenAI::Responses::ResponseComputerToolCall } variant :computer_call_output, -> { OpenAI::Responses::ResponseComputerToolCallOutputItem } @@ -35,7 +35,7 @@ module ResponseOutputItem # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). variant :reasoning, -> { OpenAI::Responses::ResponseReasoningItem } variant :program, -> { OpenAI::Responses::ResponseOutputItem::Program } @@ -48,7 +48,7 @@ module ResponseOutputItem variant :additional_tools, -> { OpenAI::Responses::ResponseOutputItem::AdditionalTools } - # A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). variant :compaction, -> { OpenAI::Responses::ResponseCompactionItem } # An image generation request made by the model. @@ -125,15 +125,20 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(id:, call_id:, code:, fingerprint:, type: :program) - # @param id [String] The unique ID of the program item. + # @param id [String] + # The unique ID of the program item. # - # @param call_id [String] The stable call ID of the program item. + # @param call_id [String] + # The stable call ID of the program item. # - # @param code [String] The JavaScript source executed by programmatic tool calling. + # @param code [String] + # The JavaScript source executed by programmatic tool calling. # - # @param fingerprint [String] Opaque program replay fingerprint that must be round-tripped. + # @param fingerprint [String] + # Opaque program replay fingerprint that must be round-tripped. # - # @param type [Symbol, :program] The type of the item. Always `program`. + # @param type [Symbol, :program] + # The type of the item. Always `program`. end class ProgramOutput < OpenAI::Internal::Type::BaseModel @@ -168,15 +173,20 @@ class ProgramOutput < OpenAI::Internal::Type::BaseModel required :type, const: :program_output # @!method initialize(id:, call_id:, result:, status:, type: :program_output) - # @param id [String] The unique ID of the program output item. + # @param id [String] + # The unique ID of the program output item. # - # @param call_id [String] The call ID of the program item. + # @param call_id [String] + # The call ID of the program item. # - # @param result [String] The result produced by the program item. + # @param result [String] + # The result produced by the program item. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput::Status] The terminal status of the program output item. + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput::Status] + # The terminal status of the program output item. # - # @param type [Symbol, :program_output] The type of the item. Always `program_output`. + # @param type [Symbol, :program_output] + # The type of the item. Always `program_output`. # The terminal status of the program output item. # @@ -218,13 +228,17 @@ class AdditionalTools < OpenAI::Internal::Type::BaseModel required :type, const: :additional_tools # @!method initialize(id:, role:, tools:, type: :additional_tools) - # @param id [String] The unique ID of the additional tools item. + # @param id [String] + # The unique ID of the additional tools item. # - # @param role [Symbol, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools::Role] The role that provided the additional tools. + # @param role [Symbol, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools::Role] + # The role that provided the additional tools. # - # @param tools [Array] The additional tool definitions made available at this item. + # @param tools [Array] + # The additional tool definitions made available at this item. # - # @param type [Symbol, :additional_tools] The type of the item. Always `additional_tools`. + # @param type [Symbol, :additional_tools] + # The type of the item. Always `additional_tools`. # The role that provided the additional tools. # @@ -295,23 +309,26 @@ class ImageGenerationCall < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, result:, status:, quality: nil, size: nil, type: :image_generation_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall} for more - # details. - # # An image generation request made by the model. # - # @param id [String] The unique ID of the image generation call. + # @param id [String] + # The unique ID of the image generation call. # - # @param result [String, nil] The generated image encoded in base64. + # @param result [String, nil] + # The generated image encoded in base64. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Status] The status of the image generation call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Status] + # The status of the image generation call. # - # @param quality [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Quality, nil] The quality of the image generated by the image generation tool call. One of `lo + # @param quality [Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Quality, nil] + # The quality of the image generated by the image generation tool call. One of + # `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. # - # @param size [String, Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Size, nil] The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. + # @param size [String, Symbol, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall::Size, nil] + # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. # - # @param type [Symbol, :image_generation_call] The type of the image generation call. Always `image_generation_call`. + # @param type [Symbol, :image_generation_call] + # The type of the image generation call. Always `image_generation_call`. # The status of the image generation call. # @@ -417,21 +434,22 @@ class LocalShellCall < OpenAI::Internal::Type::BaseModel required :type, const: :local_shell_call # @!method initialize(id:, action:, call_id:, status:, type: :local_shell_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall} for more - # details. - # # A tool call to run a command on the local shell. # - # @param id [String] The unique ID of the local shell call. + # @param id [String] + # The unique ID of the local shell call. # - # @param action [OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall::Action] Execute a shell command on the server. + # @param action [OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall::Action] + # Execute a shell command on the server. # - # @param call_id [String] The unique ID of the local shell tool call generated by the model. + # @param call_id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall::Status] The status of the local shell call. + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall::Status] + # The status of the local shell call. # - # @param type [Symbol, :local_shell_call] The type of the local shell call. Always `local_shell_call`. + # @param type [Symbol, :local_shell_call] + # The type of the local shell call. Always `local_shell_call`. # @see OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall#action class Action < OpenAI::Internal::Type::BaseModel @@ -474,17 +492,23 @@ class Action < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, env:, timeout_ms: nil, user: nil, working_directory: nil, type: :exec) # Execute a shell command on the server. # - # @param command [Array] The command to run. + # @param command [Array] + # The command to run. # - # @param env [Hash{Symbol=>String}] Environment variables to set for the command. + # @param env [Hash{Symbol=>String}] + # Environment variables to set for the command. # - # @param timeout_ms [Integer, nil] Optional timeout in milliseconds for the command. + # @param timeout_ms [Integer, nil] + # Optional timeout in milliseconds for the command. # - # @param user [String, nil] Optional user to run the command as. + # @param user [String, nil] + # Optional user to run the command as. # - # @param working_directory [String, nil] Optional working directory to run the command in. + # @param working_directory [String, nil] + # Optional working directory to run the command in. # - # @param type [Symbol, :exec] The type of the local shell action. Always `exec`. + # @param type [Symbol, :exec] + # The type of the local shell action. Always `exec`. end # The status of the local shell call. @@ -532,19 +556,19 @@ class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(id:, output:, status: nil, type: :local_shell_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput} for more - # details. - # # The output of a local shell tool call. # - # @param id [String] The unique ID of the local shell tool call generated by the model. + # @param id [String] + # The unique ID of the local shell tool call generated by the model. # - # @param output [String] A JSON string of the output of the local shell tool call. + # @param output [String] + # A JSON string of the output of the local shell tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # - # @param type [Symbol, :local_shell_call_output] The type of the local shell tool call output. Always `local_shell_call_output`. + # @param type [Symbol, :local_shell_call_output] + # The type of the local shell tool call output. Always `local_shell_call_output`. # The status of the item. One of `in_progress`, `completed`, or `incomplete`. # @@ -620,28 +644,37 @@ class McpCall < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseOutputItem::McpCall::Status } # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::McpCall} for more details. - # # An invocation of a tool on an MCP server. # - # @param id [String] The unique ID of the tool call. + # @param id [String] + # The unique ID of the tool call. # - # @param arguments [String] A JSON string of the arguments passed to the tool. + # @param arguments [String] + # A JSON string of the arguments passed to the tool. # - # @param name [String] The name of the tool that was run. + # @param name [String] + # The name of the tool that was run. # - # @param server_label [String] The label of the MCP server running the tool. + # @param server_label [String] + # The label of the MCP server running the tool. # - # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request. + # @param approval_request_id [String, nil] + # Unique identifier for the MCP tool call approval request. Include this value in + # a subsequent `mcp_approval_response` input to approve or reject the + # corresponding tool call. # - # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] The error from the tool call, if any. + # @param error [OpenAI::Models::Responses::McpToolCallError::McpProtocolError, OpenAI::Models::Responses::McpToolCallError::McpToolExecutionError, OpenAI::Models::Responses::McpToolCallError::HTTPError, nil] + # The error from the tool call, if any. # - # @param output [String, nil] The output from the tool call. + # @param output [String, nil] + # The output from the tool call. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::McpCall::Status] + # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, + # `calling`, or `failed`. # - # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. + # @param type [Symbol, :mcp_call] + # The type of the item. Always `mcp_call`. # The status of the tool call. One of `in_progress`, `completed`, `incomplete`, # `calling`, or `failed`. @@ -696,21 +729,22 @@ class McpListTools < OpenAI::Internal::Type::BaseModel optional :error, String, nil?: true # @!method initialize(id:, server_label:, tools:, error: nil, type: :mcp_list_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::McpListTools} for more details. - # # A list of tools available on an MCP server. # - # @param id [String] The unique ID of the list. + # @param id [String] + # The unique ID of the list. # - # @param server_label [String] The label of the MCP server. + # @param server_label [String] + # The label of the MCP server. # - # @param tools [Array] The tools available on the server. + # @param tools [Array] + # The tools available on the server. # - # @param error [String, nil] Error message if the server could not list tools. + # @param error [String, nil] + # Error message if the server could not list tools. # - # @param type [Symbol, :mcp_list_tools] The type of the item. Always `mcp_list_tools`. - + # @param type [Symbol, :mcp_list_tools] + # The type of the item. Always `mcp_list_tools`. class Tool < OpenAI::Internal::Type::BaseModel # @!attribute input_schema # The JSON schema describing the tool's input. @@ -737,19 +771,19 @@ class Tool < OpenAI::Internal::Type::BaseModel optional :description, String, nil?: true # @!method initialize(input_schema:, name:, annotations: nil, description: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::McpListTools::Tool} for more - # details. - # # A tool available on an MCP server. # - # @param input_schema [Object] The JSON schema describing the tool's input. + # @param input_schema [Object] + # The JSON schema describing the tool's input. # - # @param name [String] The name of the tool. + # @param name [String] + # The name of the tool. # - # @param annotations [Object, nil] Additional annotations about the tool. + # @param annotations [Object, nil] + # Additional annotations about the tool. # - # @param description [String, nil] The description of the tool. + # @param description [String, nil] + # The description of the tool. end end @@ -785,21 +819,22 @@ class McpApprovalRequest < OpenAI::Internal::Type::BaseModel required :type, const: :mcp_approval_request # @!method initialize(id:, arguments:, name:, server_label:, type: :mcp_approval_request) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest} for more - # details. - # # A request for human approval of a tool invocation. # - # @param id [String] The unique ID of the approval request. + # @param id [String] + # The unique ID of the approval request. # - # @param arguments [String] A JSON string of arguments for the tool. + # @param arguments [String] + # A JSON string of arguments for the tool. # - # @param name [String] The name of the tool to run. + # @param name [String] + # The name of the tool to run. # - # @param server_label [String] The label of the MCP server making the request. + # @param server_label [String] + # The label of the MCP server making the request. # - # @param type [Symbol, :mcp_approval_request] The type of the item. Always `mcp_approval_request`. + # @param type [Symbol, :mcp_approval_request] + # The type of the item. Always `mcp_approval_request`. end class McpApprovalResponse < OpenAI::Internal::Type::BaseModel @@ -834,21 +869,22 @@ class McpApprovalResponse < OpenAI::Internal::Type::BaseModel optional :reason, String, nil?: true # @!method initialize(id:, approval_request_id:, approve:, reason: nil, type: :mcp_approval_response) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse} for more - # details. - # # A response to an MCP approval request. # - # @param id [String] The unique ID of the approval response + # @param id [String] + # The unique ID of the approval response # - # @param approval_request_id [String] The ID of the approval request being answered. + # @param approval_request_id [String] + # The ID of the approval request being answered. # - # @param approve [Boolean] Whether the request was approved. + # @param approve [Boolean] + # Whether the request was approved. # - # @param reason [String, nil] Optional reason for the decision. + # @param reason [String, nil] + # Optional reason for the decision. # - # @param type [Symbol, :mcp_approval_response] The type of the item. Always `mcp_approval_response`. + # @param type [Symbol, :mcp_approval_response] + # The type of the item. Always `mcp_approval_response`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_output_item_added_event.rb b/lib/openai/models/responses/response_output_item_added_event.rb index 8e7e04b06..bdcea5874 100644 --- a/lib/openai/models/responses/response_output_item_added_event.rb +++ b/lib/openai/models/responses/response_output_item_added_event.rb @@ -32,18 +32,22 @@ class ResponseOutputItemAddedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.output_item.added" # @!method initialize(item:, output_index:, sequence_number:, type: :"response.output_item.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItemAddedEvent} for more details. - # # Emitted when a new output item is added. # - # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] The output item that was added. For reasoning items, `encrypted_content` + # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] + # The output item that was added. For reasoning items, `encrypted_content` may be + # incomplete while the item is in progress. Use the reasoning item from the + # corresponding `response.output_item.done` event when passing it as input to a + # subsequent request. # - # @param output_index [Integer] The index of the output item that was added. + # @param output_index [Integer] + # The index of the output item that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.output_item.added"] The type of the event. Always `response.output_item.added`. + # @param type [Symbol, :"response.output_item.added"] + # The type of the event. Always `response.output_item.added`. end end end diff --git a/lib/openai/models/responses/response_output_item_done_event.rb b/lib/openai/models/responses/response_output_item_done_event.rb index 618fe4259..1566bf98e 100644 --- a/lib/openai/models/responses/response_output_item_done_event.rb +++ b/lib/openai/models/responses/response_output_item_done_event.rb @@ -29,18 +29,19 @@ class ResponseOutputItemDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.output_item.done" # @!method initialize(item:, output_index:, sequence_number:, type: :"response.output_item.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputItemDoneEvent} for more details. - # # Emitted when an output item is marked done. # - # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] The output item that was marked done. + # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] + # The output item that was marked done. # - # @param output_index [Integer] The index of the output item that was marked done. + # @param output_index [Integer] + # The index of the output item that was marked done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.output_item.done"] The type of the event. Always `response.output_item.done`. + # @param type [Symbol, :"response.output_item.done"] + # The type of the event. Always `response.output_item.done`. end end end diff --git a/lib/openai/models/responses/response_output_message.rb b/lib/openai/models/responses/response_output_message.rb index e3fa24c64..0ffab54c8 100644 --- a/lib/openai/models/responses/response_output_message.rb +++ b/lib/openai/models/responses/response_output_message.rb @@ -48,22 +48,29 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true # @!method initialize(id:, content:, status:, phase: nil, role: :assistant, type: :message) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputMessage} for more details. - # # An output message from the model. # - # @param id [String] The unique ID of the output message. + # @param id [String] + # The unique ID of the output message. # - # @param content [Array] The content of the output message. + # @param content [Array] + # The content of the output message. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Status] The status of the message input. One of `in_progress`, `completed`, or + # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Status] + # The status of the message input. One of `in_progress`, `completed`, or + # `incomplete`. Populated when input items are returned via API. # - # @param phase [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # @param phase [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. # - # @param role [Symbol, :assistant] The role of the output message. Always `assistant`. + # @param role [Symbol, :assistant] + # The role of the output message. Always `assistant`. # - # @param type [Symbol, :message] The type of the output message. Always `message`. + # @param type [Symbol, :message] + # The type of the output message. Always `message`. # A text output from the model. module Content diff --git a/lib/openai/models/responses/response_output_refusal.rb b/lib/openai/models/responses/response_output_refusal.rb index bf6272e63..a5dc0abd2 100644 --- a/lib/openai/models/responses/response_output_refusal.rb +++ b/lib/openai/models/responses/response_output_refusal.rb @@ -19,9 +19,11 @@ class ResponseOutputRefusal < OpenAI::Internal::Type::BaseModel # @!method initialize(refusal:, type: :refusal) # A refusal from the model. # - # @param refusal [String] The refusal explanation from the model. + # @param refusal [String] + # The refusal explanation from the model. # - # @param type [Symbol, :refusal] The type of the refusal. Always `refusal`. + # @param type [Symbol, :refusal] + # The type of the refusal. Always `refusal`. end end end diff --git a/lib/openai/models/responses/response_output_text.rb b/lib/openai/models/responses/response_output_text.rb index a7a34d94a..1e8b96be7 100644 --- a/lib/openai/models/responses/response_output_text.rb +++ b/lib/openai/models/responses/response_output_text.rb @@ -41,13 +41,16 @@ class ResponseOutputText < OpenAI::Internal::Type::BaseModel # @!method initialize(annotations:, text:, logprobs: nil, type: :output_text) # A text output from the model. # - # @param annotations [Array] The annotations of the text output. + # @param annotations [Array] + # The annotations of the text output. # - # @param text [String] The text output from the model. + # @param text [String] + # The text output from the model. # # @param logprobs [Array] # - # @param type [Symbol, :output_text] The type of the output text. Always `output_text`. + # @param type [Symbol, :output_text] + # The type of the output text. Always `output_text`. # An annotation that applies to a span of output text. module Annotation @@ -98,13 +101,17 @@ class FileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(file_id:, filename:, index:, type: :file_citation) # A citation to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the file cited. + # @param filename [String] + # The filename of the file cited. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`. + # @param type [Symbol, :file_citation] + # The type of the file citation. Always `file_citation`. end class URLCitation < OpenAI::Internal::Type::BaseModel @@ -141,15 +148,20 @@ class URLCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation) # A citation for a web resource used to generate a model response. # - # @param end_index [Integer] The index of the last character of the URL citation in the message. + # @param end_index [Integer] + # The index of the last character of the URL citation in the message. # - # @param start_index [Integer] The index of the first character of the URL citation in the message. + # @param start_index [Integer] + # The index of the first character of the URL citation in the message. # - # @param title [String] The title of the web resource. + # @param title [String] + # The title of the web resource. # - # @param url [String] The URL of the web resource. + # @param url [String] + # The URL of the web resource. # - # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The type of the URL citation. Always `url_citation`. end class ContainerFileCitation < OpenAI::Internal::Type::BaseModel @@ -192,17 +204,23 @@ class ContainerFileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation) # A citation for a container file used to generate a model response. # - # @param container_id [String] The ID of the container file. + # @param container_id [String] + # The ID of the container file. # - # @param end_index [Integer] The index of the last character of the container file citation in the message. + # @param end_index [Integer] + # The index of the last character of the container file citation in the message. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the container file cited. + # @param filename [String] + # The filename of the container file cited. # - # @param start_index [Integer] The index of the first character of the container file citation in the message. + # @param start_index [Integer] + # The index of the first character of the container file citation in the message. # - # @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`. + # @param type [Symbol, :container_file_citation] + # The type of the container file citation. Always `container_file_citation`. end class FilePath < OpenAI::Internal::Type::BaseModel @@ -225,17 +243,16 @@ class FilePath < OpenAI::Internal::Type::BaseModel required :type, const: :file_path # @!method initialize(file_id:, index:, type: :file_path) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputText::Annotation::FilePath} for more - # details. - # # A path to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_path] The type of the file path. Always `file_path`. + # @param type [Symbol, :file_path] + # The type of the file path. Always `file_path`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_output_text_annotation_added_event.rb b/lib/openai/models/responses/response_output_text_annotation_added_event.rb index b839f9cd9..e835edbe8 100644 --- a/lib/openai/models/responses/response_output_text_annotation_added_event.rb +++ b/lib/openai/models/responses/response_output_text_annotation_added_event.rb @@ -53,19 +53,26 @@ class ResponseOutputTextAnnotationAddedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, type: :"response.output_text.annotation.added") # Emitted when an annotation is added to output text content. # - # @param annotation [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text. + # @param annotation [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] + # An annotation that applies to a span of output text. # - # @param annotation_index [Integer] The index of the annotation within the content part. + # @param annotation_index [Integer] + # The index of the annotation within the content part. # - # @param content_index [Integer] The index of the content part within the output item. + # @param content_index [Integer] + # The index of the content part within the output item. # - # @param item_id [String] The unique identifier of the item to which the annotation is being added. + # @param item_id [String] + # The unique identifier of the item to which the annotation is being added. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'. + # @param type [Symbol, :"response.output_text.annotation.added"] + # The type of the event. Always 'response.output_text.annotation.added'. # An annotation that applies to a span of output text. # @@ -124,13 +131,17 @@ class FileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(file_id:, filename:, index:, type: :file_citation) # A citation to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the file cited. + # @param filename [String] + # The filename of the file cited. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`. + # @param type [Symbol, :file_citation] + # The type of the file citation. Always `file_citation`. end class URLCitation < OpenAI::Internal::Type::BaseModel @@ -167,15 +178,20 @@ class URLCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation) # A citation for a web resource used to generate a model response. # - # @param end_index [Integer] The index of the last character of the URL citation in the message. + # @param end_index [Integer] + # The index of the last character of the URL citation in the message. # - # @param start_index [Integer] The index of the first character of the URL citation in the message. + # @param start_index [Integer] + # The index of the first character of the URL citation in the message. # - # @param title [String] The title of the web resource. + # @param title [String] + # The title of the web resource. # - # @param url [String] The URL of the web resource. + # @param url [String] + # The URL of the web resource. # - # @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`. + # @param type [Symbol, :url_citation] + # The type of the URL citation. Always `url_citation`. end class ContainerFileCitation < OpenAI::Internal::Type::BaseModel @@ -218,17 +234,23 @@ class ContainerFileCitation < OpenAI::Internal::Type::BaseModel # @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation) # A citation for a container file used to generate a model response. # - # @param container_id [String] The ID of the container file. + # @param container_id [String] + # The ID of the container file. # - # @param end_index [Integer] The index of the last character of the container file citation in the message. + # @param end_index [Integer] + # The index of the last character of the container file citation in the message. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param filename [String] The filename of the container file cited. + # @param filename [String] + # The filename of the container file cited. # - # @param start_index [Integer] The index of the first character of the container file citation in the message. + # @param start_index [Integer] + # The index of the first character of the container file citation in the message. # - # @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`. + # @param type [Symbol, :container_file_citation] + # The type of the container file citation. Always `container_file_citation`. end class FilePath < OpenAI::Internal::Type::BaseModel @@ -251,17 +273,16 @@ class FilePath < OpenAI::Internal::Type::BaseModel required :type, const: :file_path # @!method initialize(file_id:, index:, type: :file_path) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath} - # for more details. - # # A path to a file. # - # @param file_id [String] The ID of the file. + # @param file_id [String] + # The ID of the file. # - # @param index [Integer] The index of the file in the list of files. + # @param index [Integer] + # The index of the file in the list of files. # - # @param type [Symbol, :file_path] The type of the file path. Always `file_path`. + # @param type [Symbol, :file_path] + # The type of the file path. Always `file_path`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_prompt.rb b/lib/openai/models/responses/response_prompt.rb index e8a20753b..45113bc04 100644 --- a/lib/openai/models/responses/response_prompt.rb +++ b/lib/openai/models/responses/response_prompt.rb @@ -29,17 +29,19 @@ class ResponsePrompt < OpenAI::Internal::Type::BaseModel optional :version, String, nil?: true # @!method initialize(id:, variables: nil, version: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsePrompt} for more details. - # # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # - # @param id [String] The unique identifier of the prompt template to use. + # @param id [String] + # The unique identifier of the prompt template to use. # - # @param variables [Hash{Symbol=>String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile}, nil] Optional map of values to substitute in for variables in your + # @param variables [Hash{Symbol=>String, OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile}, nil] + # Optional map of values to substitute in for variables in your prompt. The + # substitution values can either be strings, or other Response input types like + # images or files. # - # @param version [String, nil] Optional version of the prompt template. + # @param version [String, nil] + # Optional version of the prompt template. # A text input to the model. module Variable @@ -50,7 +52,7 @@ module Variable # A text input to the model. variant -> { OpenAI::Responses::ResponseInputText } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). variant -> { OpenAI::Responses::ResponseInputImage } # A file input to the model. diff --git a/lib/openai/models/responses/response_queued_event.rb b/lib/openai/models/responses/response_queued_event.rb index 0625aa8b0..c94d1dd4d 100644 --- a/lib/openai/models/responses/response_queued_event.rb +++ b/lib/openai/models/responses/response_queued_event.rb @@ -25,11 +25,14 @@ class ResponseQueuedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(response:, sequence_number:, type: :"response.queued") # Emitted when a response is queued and waiting to be processed. # - # @param response [OpenAI::Models::Responses::Response] The full response object that is queued. + # @param response [OpenAI::Models::Responses::Response] + # The full response object that is queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param type [Symbol, :"response.queued"] The type of the event. Always 'response.queued'. + # @param type [Symbol, :"response.queued"] + # The type of the event. Always 'response.queued'. end end end diff --git a/lib/openai/models/responses/response_reasoning_item.rb b/lib/openai/models/responses/response_reasoning_item.rb index 680f80e78..72165ffac 100644 --- a/lib/openai/models/responses/response_reasoning_item.rb +++ b/lib/openai/models/responses/response_reasoning_item.rb @@ -55,26 +55,36 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseReasoningItem::Status } # @!method initialize(id:, summary:, content: nil, encrypted_content: nil, status: nil, type: :reasoning) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningItem} for more details. - # # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). # - # @param id [String] The unique identifier of the reasoning content. + # @param id [String] + # The unique identifier of the reasoning content. # - # @param summary [Array] Reasoning summary content. + # @param summary [Array] + # Reasoning summary content. # - # @param content [Array] Reasoning text content. + # @param content [Array] + # Reasoning text content. # - # @param encrypted_content [String, nil] The encrypted content of the reasoning item. This is populated by default + # @param encrypted_content [String, nil] + # The encrypted content of the reasoning item. This is populated by default for + # reasoning items returned by `POST /v1/responses` and WebSocket `response.create` + # requests. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningItem::Status] The status of the item. One of `in_progress`, `completed`, or + # When streaming, use the completed reasoning item and its `encrypted_content` + # from the `response.output_item.done` event in subsequent requests. The + # `encrypted_content` in `response.output_item.added` may be incomplete. This is + # especially important when `store` is `false` or when using Zero Data Retention. # - # @param type [Symbol, :reasoning] The type of the object. Always `reasoning`. - + # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningItem::Status] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. + # + # @param type [Symbol, :reasoning] + # The type of the object. Always `reasoning`. class Summary < OpenAI::Internal::Type::BaseModel # @!attribute text # A summary of the reasoning output from the model so far. @@ -91,9 +101,11 @@ class Summary < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # A summary text from the model. # - # @param text [String] A summary of the reasoning output from the model so far. + # @param text [String] + # A summary of the reasoning output from the model so far. # - # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the object. Always `summary_text`. end class Content < OpenAI::Internal::Type::BaseModel @@ -112,9 +124,11 @@ class Content < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :reasoning_text) # Reasoning text from the model. # - # @param text [String] The reasoning text from the model. + # @param text [String] + # The reasoning text from the model. # - # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`. + # @param type [Symbol, :reasoning_text] + # The type of the reasoning text. Always `reasoning_text`. end # The status of the item. One of `in_progress`, `completed`, or `incomplete`. diff --git a/lib/openai/models/responses/response_reasoning_summary_part_added_event.rb b/lib/openai/models/responses/response_reasoning_summary_part_added_event.rb index 88b7f071d..0ae25f014 100644 --- a/lib/openai/models/responses/response_reasoning_summary_part_added_event.rb +++ b/lib/openai/models/responses/response_reasoning_summary_part_added_event.rb @@ -41,23 +41,25 @@ class ResponseReasoningSummaryPartAddedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.reasoning_summary_part.added" # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, type: :"response.reasoning_summary_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent} for more - # details. - # # Emitted when a new reasoning summary part is added. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent::Part] The summary part that was added. + # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent::Part] + # The summary part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param type [Symbol, :"response.reasoning_summary_part.added"] The type of the event. Always `response.reasoning_summary_part.added`. + # @param type [Symbol, :"response.reasoning_summary_part.added"] + # The type of the event. Always `response.reasoning_summary_part.added`. # @see OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -76,9 +78,11 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # The summary part that was added. # - # @param text [String] The text of the summary part. + # @param text [String] + # The text of the summary part. # - # @param type [Symbol, :summary_text] The type of the summary part. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the summary part. Always `summary_text`. end end end diff --git a/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb b/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb index 0a9e50763..7e21e7f00 100644 --- a/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb +++ b/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb @@ -48,25 +48,29 @@ class ResponseReasoningSummaryPartDoneEvent < OpenAI::Internal::Type::BaseModel optional :status, enum: -> { OpenAI::Responses::ResponseReasoningSummaryPartDoneEvent::Status } # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, status: nil, type: :"response.reasoning_summary_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent} for more - # details. - # # Emitted when a reasoning summary part is completed. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Part] The completed summary part. + # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Part] + # The completed summary part. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Status] The completion status of the summary part. Omitted when the part completed + # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Status] + # The completion status of the summary part. Omitted when the part completed + # normally and set to `incomplete` when generation was interrupted. # - # @param type [Symbol, :"response.reasoning_summary_part.done"] The type of the event. Always `response.reasoning_summary_part.done`. + # @param type [Symbol, :"response.reasoning_summary_part.done"] + # The type of the event. Always `response.reasoning_summary_part.done`. # @see OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent#part class Part < OpenAI::Internal::Type::BaseModel @@ -85,9 +89,11 @@ class Part < OpenAI::Internal::Type::BaseModel # @!method initialize(text:, type: :summary_text) # The completed summary part. # - # @param text [String] The text of the summary part. + # @param text [String] + # The text of the summary part. # - # @param type [Symbol, :summary_text] The type of the summary part. Always `summary_text`. + # @param type [Symbol, :summary_text] + # The type of the summary part. Always `summary_text`. end # The completion status of the summary part. Omitted when the part completed diff --git a/lib/openai/models/responses/response_reasoning_summary_text_delta_event.rb b/lib/openai/models/responses/response_reasoning_summary_text_delta_event.rb index 9f801ed98..bf067ec3f 100644 --- a/lib/openai/models/responses/response_reasoning_summary_text_delta_event.rb +++ b/lib/openai/models/responses/response_reasoning_summary_text_delta_event.rb @@ -41,23 +41,25 @@ class ResponseReasoningSummaryTextDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.reasoning_summary_text.delta" # @!method initialize(delta:, item_id:, output_index:, sequence_number:, summary_index:, type: :"response.reasoning_summary_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningSummaryTextDeltaEvent} for more - # details. - # # Emitted when a delta is added to a reasoning summary text. # - # @param delta [String] The text delta that was added to the summary. + # @param delta [String] + # The text delta that was added to the summary. # - # @param item_id [String] The ID of the item this summary text delta is associated with. + # @param item_id [String] + # The ID of the item this summary text delta is associated with. # - # @param output_index [Integer] The index of the output item this summary text delta is associated with. + # @param output_index [Integer] + # The index of the output item this summary text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param type [Symbol, :"response.reasoning_summary_text.delta"] The type of the event. Always `response.reasoning_summary_text.delta`. + # @param type [Symbol, :"response.reasoning_summary_text.delta"] + # The type of the event. Always `response.reasoning_summary_text.delta`. end end end diff --git a/lib/openai/models/responses/response_reasoning_summary_text_done_event.rb b/lib/openai/models/responses/response_reasoning_summary_text_done_event.rb index d77661fc7..218b47c5b 100644 --- a/lib/openai/models/responses/response_reasoning_summary_text_done_event.rb +++ b/lib/openai/models/responses/response_reasoning_summary_text_done_event.rb @@ -41,23 +41,25 @@ class ResponseReasoningSummaryTextDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.reasoning_summary_text.done" # @!method initialize(item_id:, output_index:, sequence_number:, summary_index:, text:, type: :"response.reasoning_summary_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningSummaryTextDoneEvent} for more - # details. - # # Emitted when a reasoning summary text is completed. # - # @param item_id [String] The ID of the item this summary text is associated with. + # @param item_id [String] + # The ID of the item this summary text is associated with. # - # @param output_index [Integer] The index of the output item this summary text is associated with. + # @param output_index [Integer] + # The index of the output item this summary text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param text [String] The full text of the completed reasoning summary. + # @param text [String] + # The full text of the completed reasoning summary. # - # @param type [Symbol, :"response.reasoning_summary_text.done"] The type of the event. Always `response.reasoning_summary_text.done`. + # @param type [Symbol, :"response.reasoning_summary_text.done"] + # The type of the event. Always `response.reasoning_summary_text.done`. end end end diff --git a/lib/openai/models/responses/response_reasoning_text_delta_event.rb b/lib/openai/models/responses/response_reasoning_text_delta_event.rb index fc3380bb6..7e4175aec 100644 --- a/lib/openai/models/responses/response_reasoning_text_delta_event.rb +++ b/lib/openai/models/responses/response_reasoning_text_delta_event.rb @@ -41,22 +41,25 @@ class ResponseReasoningTextDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.reasoning_text.delta" # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, type: :"response.reasoning_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningTextDeltaEvent} for more details. - # # Emitted when a delta is added to a reasoning text. # - # @param content_index [Integer] The index of the reasoning content part this delta is associated with. + # @param content_index [Integer] + # The index of the reasoning content part this delta is associated with. # - # @param delta [String] The text delta that was added to the reasoning content. + # @param delta [String] + # The text delta that was added to the reasoning content. # - # @param item_id [String] The ID of the item this reasoning text delta is associated with. + # @param item_id [String] + # The ID of the item this reasoning text delta is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text delta is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.reasoning_text.delta"] The type of the event. Always `response.reasoning_text.delta`. + # @param type [Symbol, :"response.reasoning_text.delta"] + # The type of the event. Always `response.reasoning_text.delta`. end end end diff --git a/lib/openai/models/responses/response_reasoning_text_done_event.rb b/lib/openai/models/responses/response_reasoning_text_done_event.rb index e07630bc5..bd66b0ffd 100644 --- a/lib/openai/models/responses/response_reasoning_text_done_event.rb +++ b/lib/openai/models/responses/response_reasoning_text_done_event.rb @@ -41,22 +41,25 @@ class ResponseReasoningTextDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.reasoning_text.done" # @!method initialize(content_index:, item_id:, output_index:, sequence_number:, text:, type: :"response.reasoning_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseReasoningTextDoneEvent} for more details. - # # Emitted when a reasoning text is completed. # - # @param content_index [Integer] The index of the reasoning content part. + # @param content_index [Integer] + # The index of the reasoning content part. # - # @param item_id [String] The ID of the item this reasoning text is associated with. + # @param item_id [String] + # The ID of the item this reasoning text is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param text [String] The full text of the completed reasoning content. + # @param text [String] + # The full text of the completed reasoning content. # - # @param type [Symbol, :"response.reasoning_text.done"] The type of the event. Always `response.reasoning_text.done`. + # @param type [Symbol, :"response.reasoning_text.done"] + # The type of the event. Always `response.reasoning_text.done`. end end end diff --git a/lib/openai/models/responses/response_refusal_delta_event.rb b/lib/openai/models/responses/response_refusal_delta_event.rb index f912ec9ee..d5ce5f842 100644 --- a/lib/openai/models/responses/response_refusal_delta_event.rb +++ b/lib/openai/models/responses/response_refusal_delta_event.rb @@ -41,22 +41,25 @@ class ResponseRefusalDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.refusal.delta" # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, type: :"response.refusal.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseRefusalDeltaEvent} for more details. - # # Emitted when there is a partial refusal text. # - # @param content_index [Integer] The index of the content part that the refusal text is added to. + # @param content_index [Integer] + # The index of the content part that the refusal text is added to. # - # @param delta [String] The refusal text that is added. + # @param delta [String] + # The refusal text that is added. # - # @param item_id [String] The ID of the output item that the refusal text is added to. + # @param item_id [String] + # The ID of the output item that the refusal text is added to. # - # @param output_index [Integer] The index of the output item that the refusal text is added to. + # @param output_index [Integer] + # The index of the output item that the refusal text is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.refusal.delta"] The type of the event. Always `response.refusal.delta`. + # @param type [Symbol, :"response.refusal.delta"] + # The type of the event. Always `response.refusal.delta`. end end end diff --git a/lib/openai/models/responses/response_refusal_done_event.rb b/lib/openai/models/responses/response_refusal_done_event.rb index 4d4289439..1a68b26e7 100644 --- a/lib/openai/models/responses/response_refusal_done_event.rb +++ b/lib/openai/models/responses/response_refusal_done_event.rb @@ -41,22 +41,25 @@ class ResponseRefusalDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.refusal.done" # @!method initialize(content_index:, item_id:, output_index:, refusal:, sequence_number:, type: :"response.refusal.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseRefusalDoneEvent} for more details. - # # Emitted when refusal text is finalized. # - # @param content_index [Integer] The index of the content part that the refusal text is finalized. + # @param content_index [Integer] + # The index of the content part that the refusal text is finalized. # - # @param item_id [String] The ID of the output item that the refusal text is finalized. + # @param item_id [String] + # The ID of the output item that the refusal text is finalized. # - # @param output_index [Integer] The index of the output item that the refusal text is finalized. + # @param output_index [Integer] + # The index of the output item that the refusal text is finalized. # - # @param refusal [String] The refusal text that is finalized. + # @param refusal [String] + # The refusal text that is finalized. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param type [Symbol, :"response.refusal.done"] The type of the event. Always `response.refusal.done`. + # @param type [Symbol, :"response.refusal.done"] + # The type of the event. Always `response.refusal.done`. end end end diff --git a/lib/openai/models/responses/response_retrieve_params.rb b/lib/openai/models/responses/response_retrieve_params.rb index b9049977a..3a65f977e 100644 --- a/lib/openai/models/responses/response_retrieve_params.rb +++ b/lib/openai/models/responses/response_retrieve_params.rb @@ -40,16 +40,22 @@ class ResponseRetrieveParams < OpenAI::Internal::Type::BaseModel optional :starting_after, Integer # @!method initialize(response_id:, include: nil, include_obfuscation: nil, starting_after: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseRetrieveParams} for more details. - # # @param response_id [String] # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. # - # @param starting_after [Integer] The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # The sequence number of the event after which to start streaming. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/responses/response_shell_call_command_added_event.rb b/lib/openai/models/responses/response_shell_call_command_added_event.rb index 601f67da0..a9a178bc2 100644 --- a/lib/openai/models/responses/response_shell_call_command_added_event.rb +++ b/lib/openai/models/responses/response_shell_call_command_added_event.rb @@ -37,15 +37,20 @@ class ResponseShellCallCommandAddedEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, command_index:, output_index:, sequence_number:, type: :"response.shell_call_command.added") # A streaming event that indicated a shell command was added to a tool call. # - # @param command [String] The shell command that was added. + # @param command [String] + # The shell command that was added. # - # @param command_index [Integer] The index of the shell command that was added. + # @param command_index [Integer] + # The index of the shell command that was added. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param type [Symbol, :"response.shell_call_command.added"] The type of the event, always `response.shell_call_command.added`. + # @param type [Symbol, :"response.shell_call_command.added"] + # The type of the event, always `response.shell_call_command.added`. end end end diff --git a/lib/openai/models/responses/response_shell_call_command_delta_event.rb b/lib/openai/models/responses/response_shell_call_command_delta_event.rb index dde84de24..25b0ced90 100644 --- a/lib/openai/models/responses/response_shell_call_command_delta_event.rb +++ b/lib/openai/models/responses/response_shell_call_command_delta_event.rb @@ -43,17 +43,23 @@ class ResponseShellCallCommandDeltaEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command_index:, delta:, output_index:, sequence_number:, obfuscation: nil, type: :"response.shell_call_command.delta") # A streaming event that indicated a shell command was incrementally updated. # - # @param command_index [Integer] The index of the shell command that was updated. + # @param command_index [Integer] + # The index of the shell command that was updated. # - # @param delta [String] The shell command delta that was appended. + # @param delta [String] + # The shell command delta that was appended. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param obfuscation [String] An obfuscation string that was added to pad the event payload. + # @param obfuscation [String] + # An obfuscation string that was added to pad the event payload. # - # @param type [Symbol, :"response.shell_call_command.delta"] The type of the event, always `response.shell_call_command.delta`. + # @param type [Symbol, :"response.shell_call_command.delta"] + # The type of the event, always `response.shell_call_command.delta`. end end end diff --git a/lib/openai/models/responses/response_shell_call_command_done_event.rb b/lib/openai/models/responses/response_shell_call_command_done_event.rb index ba387b621..332417d86 100644 --- a/lib/openai/models/responses/response_shell_call_command_done_event.rb +++ b/lib/openai/models/responses/response_shell_call_command_done_event.rb @@ -37,15 +37,20 @@ class ResponseShellCallCommandDoneEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(command:, command_index:, output_index:, sequence_number:, type: :"response.shell_call_command.done") # A streaming event that indicated a shell command was completed. # - # @param command [String] The final shell command that was emitted. + # @param command [String] + # The final shell command that was emitted. # - # @param command_index [Integer] The index of the shell command that was completed. + # @param command_index [Integer] + # The index of the shell command that was completed. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param type [Symbol, :"response.shell_call_command.done"] The type of the event, always `response.shell_call_command.done`. + # @param type [Symbol, :"response.shell_call_command.done"] + # The type of the event, always `response.shell_call_command.done`. end end end diff --git a/lib/openai/models/responses/response_shell_call_output_content_delta_event.rb b/lib/openai/models/responses/response_shell_call_output_content_delta_event.rb index 22e9ef836..92d2f66f8 100644 --- a/lib/openai/models/responses/response_shell_call_output_content_delta_event.rb +++ b/lib/openai/models/responses/response_shell_call_output_content_delta_event.rb @@ -43,17 +43,23 @@ class ResponseShellCallOutputContentDeltaEvent < OpenAI::Internal::Type::BaseMod # @!method initialize(command_index:, delta:, item_id:, output_index:, sequence_number:, type: :"response.shell_call_output_content.delta") # A streaming event that indicated shell call output was incrementally added. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param delta [OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent::Delta] The stdout/stderr delta that was emitted. + # @param delta [OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent::Delta] + # The stdout/stderr delta that was emitted. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param type [Symbol, :"response.shell_call_output_content.delta"] The type of the event, always `response.shell_call_output_content.delta`. + # @param type [Symbol, :"response.shell_call_output_content.delta"] + # The type of the event, always `response.shell_call_output_content.delta`. # @see OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent#delta class Delta < OpenAI::Internal::Type::BaseModel @@ -72,9 +78,11 @@ class Delta < OpenAI::Internal::Type::BaseModel # @!method initialize(stderr: nil, stdout: nil) # The stdout/stderr delta that was emitted. # - # @param stderr [String] The stderr delta that was emitted. + # @param stderr [String] + # The stderr delta that was emitted. # - # @param stdout [String] The stdout delta that was emitted. + # @param stdout [String] + # The stdout delta that was emitted. end end end diff --git a/lib/openai/models/responses/response_shell_call_output_content_done_event.rb b/lib/openai/models/responses/response_shell_call_output_content_done_event.rb index e94859250..7ee60a6d1 100644 --- a/lib/openai/models/responses/response_shell_call_output_content_done_event.rb +++ b/lib/openai/models/responses/response_shell_call_output_content_done_event.rb @@ -46,18 +46,23 @@ class ResponseShellCallOutputContentDoneEvent < OpenAI::Internal::Type::BaseMode # @!method initialize(command_index:, item_id:, output:, output_index:, sequence_number:, type: :"response.shell_call_output_content.done") # A streaming event that indicated shell call output was completed. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output [Array] The output contents emitted for the shell command. + # @param output [Array] + # The output contents emitted for the shell command. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param type [Symbol, :"response.shell_call_output_content.done"] The type of the event, always `response.shell_call_output_content.done`. - + # @param type [Symbol, :"response.shell_call_output_content.done"] + # The type of the event, always `response.shell_call_output_content.done`. class Output < OpenAI::Internal::Type::BaseModel # @!attribute outcome # Represents either an exit outcome (with an exit code) or a timeout outcome for a @@ -88,19 +93,20 @@ class Output < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(outcome:, stderr:, stdout:, created_by: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent::Output} for - # more details. - # # The content of a shell tool call output that was emitted. # - # @param outcome [OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent::Output::Outcome::Exit] Represents either an exit outcome (with an exit code) or a timeout outcome for a + # @param outcome [OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent::Output::Outcome::Exit] + # Represents either an exit outcome (with an exit code) or a timeout outcome for a + # shell call output chunk. # - # @param stderr [String] The standard error output that was captured. + # @param stderr [String] + # The standard error output that was captured. # - # @param stdout [String] The standard output that was captured. + # @param stdout [String] + # The standard output that was captured. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # Represents either an exit outcome (with an exit code) or a timeout outcome for a # shell call output chunk. @@ -130,7 +136,8 @@ class Timeout < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :timeout) # Indicates that the shell call exceeded its configured time limit. # - # @param type [Symbol, :timeout] The outcome type. Always `timeout`. + # @param type [Symbol, :timeout] + # The outcome type. Always `timeout`. end class Exit < OpenAI::Internal::Type::BaseModel @@ -149,9 +156,11 @@ class Exit < OpenAI::Internal::Type::BaseModel # @!method initialize(exit_code:, type: :exit) # Indicates that the shell commands finished and returned an exit code. # - # @param exit_code [Integer] Exit code from the shell process. + # @param exit_code [Integer] + # Exit code from the shell process. # - # @param type [Symbol, :exit] The outcome type. Always `exit`. + # @param type [Symbol, :exit] + # The outcome type. Always `exit`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_steer_accepted_event.rb b/lib/openai/models/responses/response_steer_accepted_event.rb index 9d648aff5..54d231bdd 100644 --- a/lib/openai/models/responses/response_steer_accepted_event.rb +++ b/lib/openai/models/responses/response_steer_accepted_event.rb @@ -30,9 +30,6 @@ class ResponseSteerAcceptedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(sequence_number:, steer:, stream_id: nil, type: :"response.steer.accepted") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerAcceptedEvent} for more details. - # # Emitted when steering input has been validated and queued. Acceptance means the # server owns the input, not that it has been applied. The successor's # `response.created` event is the commit point. If accepted input cannot be @@ -44,13 +41,18 @@ class ResponseSteerAcceptedEvent < OpenAI::Internal::Type::BaseModel # results and send one matching explicit `response.create` per parent. Do not # resend accepted input while it is still queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Responses::ResponseSteerAcceptedEvent::Steer] The accepted steering submission. + # @param steer [OpenAI::Models::Responses::ResponseSteerAcceptedEvent::Steer] + # The accepted steering submission. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # target response's `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.accepted"] The event discriminator. Always `response.steer.accepted`. + # @param type [Symbol, :"response.steer.accepted"] + # The event discriminator. Always `response.steer.accepted`. # @see OpenAI::Models::Responses::ResponseSteerAcceptedEvent#steer class Steer < OpenAI::Internal::Type::BaseModel @@ -69,9 +71,11 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, previous_response_id:) # The accepted steering submission. # - # @param id [String] The ID assigned to the steering submission. + # @param id [String] + # The ID assigned to the steering submission. # - # @param previous_response_id [String] The ID of the response being steered. + # @param previous_response_id [String] + # The ID of the response being steered. end end end diff --git a/lib/openai/models/responses/response_steer_event.rb b/lib/openai/models/responses/response_steer_event.rb index 100d0b51f..f39066d93 100644 --- a/lib/openai/models/responses/response_steer_event.rb +++ b/lib/openai/models/responses/response_steer_event.rb @@ -31,9 +31,6 @@ class ResponseSteerEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.steer" # @!method initialize(input:, previous_response_id:, type: :"response.steer") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerEvent} for more details. - # # Queues user input to steer a response on this WebSocket connection. Input can # contain text, images, and files. Steering is supported only for single-agent # responses on models and execution modes that support steering. Responses bound @@ -62,11 +59,22 @@ class ResponseSteerEvent < OpenAI::Internal::Type::BaseModel # This event accepts only `type`, `previous_response_id`, and `input`. Do not send # `stream_id`; the target response determines the WebSocket lane. # - # @param input [String, ArrayObject}>] Input to queue for a continuation of the response. Uses the same string or + # @param input [String, ArrayObject}>] + # Input to queue for a continuation of the response. Uses the same string or + # input-item shape as `response.create.input`, with a non-empty array when + # supplying input items. + # + # Steering accepts only messages with the `user` role. Each message may contain + # only `type`, `role`, and `content`, with `content` as a string or an array of + # `input_text`, `input_image`, and `input_file` parts. The optional `type` must be + # `message`. Other roles, tool outputs, and item types are not supported for + # steering. # - # @param previous_response_id [String] The ID of the response to steer on this WebSocket connection. + # @param previous_response_id [String] + # The ID of the response to steer on this WebSocket connection. # - # @param type [Symbol, :"response.steer"] The event discriminator. Always `response.steer`. + # @param type [Symbol, :"response.steer"] + # The event discriminator. Always `response.steer`. end end end diff --git a/lib/openai/models/responses/response_steer_failed_event.rb b/lib/openai/models/responses/response_steer_failed_event.rb index da0c6e52e..ffecba11c 100644 --- a/lib/openai/models/responses/response_steer_failed_event.rb +++ b/lib/openai/models/responses/response_steer_failed_event.rb @@ -36,9 +36,6 @@ class ResponseSteerFailedEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(error:, sequence_number:, steer:, stream_id: nil, type: :"response.steer.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerFailedEvent} for more details. - # # Emitted when steering input is rejected or cannot be committed to a successor # response. Returns the original, uncommitted input so the client can carry it # into `response.create` when appropriate. Invalid input must be corrected before @@ -48,15 +45,21 @@ class ResponseSteerFailedEvent < OpenAI::Internal::Type::BaseModel # allocated omit `steer.id`. A lost connection or missing acknowledgement leaves # the outcome unknown; it is not proof that the input was rejected. # - # @param error [OpenAI::Models::Responses::ResponseSteerFailedEvent::Error] Information about why the input could not be committed. + # @param error [OpenAI::Models::Responses::ResponseSteerFailedEvent::Error] + # Information about why the input could not be committed. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Responses::ResponseSteerFailedEvent::Steer] The steering submission that could not be committed. + # @param steer [OpenAI::Models::Responses::ResponseSteerFailedEvent::Steer] + # The steering submission that could not be committed. # - # @param stream_id [String] The WebSocket lane that emitted this event, when the target response is + # @param stream_id [String] + # The WebSocket lane that emitted this event, when the target response is + # available and its `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.failed"] The event discriminator. Always `response.steer.failed`. + # @param type [Symbol, :"response.steer.failed"] + # The event discriminator. Always `response.steer.failed`. # @see OpenAI::Models::Responses::ResponseSteerFailedEvent#error class Error < OpenAI::Internal::Type::BaseModel @@ -91,16 +94,28 @@ class Error < OpenAI::Internal::Type::BaseModel required :type, const: :invalid_request_error # @!method initialize(code:, message:, type: :invalid_request_error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerFailedEvent::Error} for more details. - # # Information about why the input could not be committed. # - # @param code [Symbol, String, OpenAI::Models::Responses::ResponseSteerErrorCode] A machine-readable steering error code. Clients should handle unknown - # - # @param message [String] A human-readable description of the error. - # - # @param type [Symbol, :invalid_request_error] The error type. Always `invalid_request_error`. + # @param code [Symbol, String, OpenAI::Models::Responses::ResponseSteerErrorCode] + # A machine-readable steering error code. Clients should handle unknown values + # because additional codes may be introduced. Known values include: + # + # - `response_not_found`: The target response is not available on this connection. + # - `invalid_input`: The event or input failed validation. + # - `steering_not_supported`: The model or response execution mode does not + # support steering. + # - `too_many_pending_steers`: Too much steering input is pending for the + # response. + # - `response_already_completed`: The response completed and is no longer + # accepting steering input. + # - `response_not_active`: The response is no longer accepting steering input. + # - `successor_creation_failed`: The successor response could not be created. + # + # @param message [String] + # A human-readable description of the error. + # + # @param type [Symbol, :invalid_request_error] + # The error type. Always `invalid_request_error`. end # @see OpenAI::Models::Responses::ResponseSteerFailedEvent#steer @@ -132,16 +147,24 @@ class Steer < OpenAI::Internal::Type::BaseModel optional :id, String # @!method initialize(input:, previous_response_id:, id: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerFailedEvent::Steer} for more details. - # # The steering submission that could not be committed. # - # @param input [String, ArrayObject}>] Input to queue for a continuation of the response. Uses the same string or + # @param input [String, ArrayObject}>] + # Input to queue for a continuation of the response. Uses the same string or + # input-item shape as `response.create.input`, with a non-empty array when + # supplying input items. + # + # Steering accepts only messages with the `user` role. Each message may contain + # only `type`, `role`, and `content`, with `content` as a string or an array of + # `input_text`, `input_image`, and `input_file` parts. The optional `type` must be + # `message`. Other roles, tool outputs, and item types are not supported for + # steering. # - # @param previous_response_id [String] The ID of the response that was targeted for steering. + # @param previous_response_id [String] + # The ID of the response that was targeted for steering. # - # @param id [String] The ID assigned to the steering submission, if one was allocated. + # @param id [String] + # The ID assigned to the steering submission, if one was allocated. end end end diff --git a/lib/openai/models/responses/response_steer_input.rb b/lib/openai/models/responses/response_steer_input.rb index d7dbc2736..02f7f6fdc 100644 --- a/lib/openai/models/responses/response_steer_input.rb +++ b/lib/openai/models/responses/response_steer_input.rb @@ -70,15 +70,20 @@ class Message < OpenAI::Internal::Type::BaseModel optional :status, String, nil?: true # @!method initialize(content:, id: nil, status: nil, role: :user, type: :message) - # @param content [Array, String] The message content, as an array of content parts. + # @param content [Array, String] + # The message content, as an array of content parts. # - # @param id [String, nil] The unique ID of this message item. + # @param id [String, nil] + # The unique ID of this message item. # - # @param status [String, nil] The status of the message item. + # @param status [String, nil] + # The status of the message item. # - # @param role [Symbol, :user] The message role. Always `user`. + # @param role [Symbol, :user] + # The message role. Always `user`. # - # @param type [Symbol, :message] The item type. Always `message`. + # @param type [Symbol, :message] + # The item type. Always `message`. # The message content, as an array of content parts. # @@ -175,27 +180,33 @@ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel ) # @!method initialize(output:, id: nil, call_id: nil, caller_: nil, name: nil, namespace: nil, status: nil, type: :function_call_output) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput} - # for more details. - # # The output of a function tool call. # - # @param output [String, Array] Text, image, or file output of the function tool call. + # @param output [String, Array] + # Text, image, or file output of the function tool call. # - # @param id [String, nil] The unique ID of the function tool call output. Populated when this item is retu + # @param id [String, nil] + # The unique ID of the function tool call output. Populated when this item is + # returned via API. # - # @param call_id [String, nil] The unique ID of the function tool call generated by the model. + # @param call_id [String, nil] + # The unique ID of the function tool call generated by the model. # - # @param caller_ [OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Program, nil] The execution context that produced this tool call. + # @param caller_ [OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Direct, OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Caller::Program, nil] + # The execution context that produced this tool call. # - # @param name [String, nil] The name of the tool that produced the output. + # @param name [String, nil] + # The name of the tool that produced the output. # - # @param namespace [String, nil] The namespace of the tool that produced the output. + # @param namespace [String, nil] + # The namespace of the tool that produced the output. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Status, nil] The status of the item. One of `in_progress`, `completed`, or `incomplete`. Popu + # @param status [Symbol, OpenAI::Models::Responses::ResponseSteerInput::ResponseSteerInputItemList::FunctionCallOutput::Status, nil] + # The status of the item. One of `in_progress`, `completed`, or `incomplete`. + # Populated when items are returned via API. # - # @param type [Symbol, :function_call_output] The type of the function tool call output. Always `function_call_output`. + # @param type [Symbol, :function_call_output] + # The type of the function tool call output. Always `function_call_output`. # Text, image, or file output of the function tool call. # @@ -243,7 +254,8 @@ class Direct < OpenAI::Internal::Type::BaseModel required :type, const: :direct # @!method initialize(type: :direct) - # @param type [Symbol, :direct] The caller type. Always `direct`. + # @param type [Symbol, :direct] + # The caller type. Always `direct`. end class Program < OpenAI::Internal::Type::BaseModel @@ -260,9 +272,11 @@ class Program < OpenAI::Internal::Type::BaseModel required :type, const: :program # @!method initialize(caller_id:, type: :program) - # @param caller_id [String] The call ID of the program item that produced this tool call. + # @param caller_id [String] + # The call ID of the program item that produced this tool call. # - # @param type [Symbol, :program] The caller type. Always `program`. + # @param type [Symbol, :program] + # The caller type. Always `program`. end # @!method self.variants diff --git a/lib/openai/models/responses/response_steer_input_content.rb b/lib/openai/models/responses/response_steer_input_content.rb index d06f80894..538b28035 100644 --- a/lib/openai/models/responses/response_steer_input_content.rb +++ b/lib/openai/models/responses/response_steer_input_content.rb @@ -12,7 +12,7 @@ module ResponseSteerInputContent # A text input to the model. variant :input_text, -> { OpenAI::Responses::ResponseInputTextContent } - # An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + # An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision) variant :input_image, -> { OpenAI::Responses::ResponseInputImageContent } # A file input to the model. diff --git a/lib/openai/models/responses/response_steer_pending_event.rb b/lib/openai/models/responses/response_steer_pending_event.rb index 84c11d5ca..f027b785d 100644 --- a/lib/openai/models/responses/response_steer_pending_event.rb +++ b/lib/openai/models/responses/response_steer_pending_event.rb @@ -52,9 +52,6 @@ class ResponseSteerPendingEvent < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(reason:, required_input:, sequence_number:, steer:, stream_id: nil, type: :"response.steer.pending") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseSteerPendingEvent} for more details. - # # Emitted when accepted steering input remains queued after the target response # completes. The server still owns the input. Do not resend it. The successor's # `response.created` event is the commit point. @@ -72,17 +69,31 @@ class ResponseSteerPendingEvent < OpenAI::Internal::Type::BaseModel # submissions for the same parent can report the same required inputs; they do not # each require a separate continuation. # - # @param reason [Symbol, :waiting_for_required_input, String] An extensible enum describing why accepted steering input is still queued. + # @param reason [Symbol, :waiting_for_required_input, String] + # An extensible enum describing why accepted steering input is still queued. + # Clients should handle unknown values because additional reasons may be + # introduced. Known values include: + # + # - `waiting_for_required_input`: The response is waiting for the tool results or + # approval decisions identified by `required_input`. # - # @param required_input [Array] Input stubs identifying outstanding client-owned tool results or + # @param required_input [Array] + # Input stubs identifying outstanding client-owned tool results or approval + # decisions. Each stub contains identifying fields only; the client supplies the + # result before including it in `response.create`. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param steer [OpenAI::Models::Responses::ResponseSteerPendingEvent::Steer] The steering submission that remains queued. + # @param steer [OpenAI::Models::Responses::ResponseSteerPendingEvent::Steer] + # The steering submission that remains queued. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # target response's `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.steer.pending"] The event discriminator. Always `response.steer.pending`. + # @param type [Symbol, :"response.steer.pending"] + # The event discriminator. Always `response.steer.pending`. # @see OpenAI::Models::Responses::ResponseSteerPendingEvent#steer class Steer < OpenAI::Internal::Type::BaseModel @@ -101,9 +112,11 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, previous_response_id:) # The steering submission that remains queued. # - # @param id [String] The ID assigned to the steering submission. + # @param id [String] + # The ID assigned to the steering submission. # - # @param previous_response_id [String] The ID of the response being steered. + # @param previous_response_id [String] + # The ID of the response being steered. end end end diff --git a/lib/openai/models/responses/response_text_config.rb b/lib/openai/models/responses/response_text_config.rb index f108358f8..94d35e715 100644 --- a/lib/openai/models/responses/response_text_config.rb +++ b/lib/openai/models/responses/response_text_config.rb @@ -9,7 +9,7 @@ class ResponseTextConfig < OpenAI::Internal::Type::BaseModel # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -32,18 +32,32 @@ class ResponseTextConfig < OpenAI::Internal::Type::BaseModel optional :verbosity, enum: -> { OpenAI::Responses::ResponseTextConfig::Verbosity }, nil?: true # @!method initialize(format_: nil, verbosity: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseTextConfig} for more details. - # # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which + # ensures the model will match your supplied JSON schema. Learn more in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # The default format is `{ "type": "text" }` with no additional options. + # + # **Not recommended for gpt-4o and newer models:** # - # @param format_ [OpenAI::Models::ResponseFormatText, OpenAI::Models::Responses::ResponseFormatTextJSONSchemaConfig, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. # - # @param verbosity [Symbol, OpenAI::Models::Responses::ResponseTextConfig::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in + # @param verbosity [Symbol, OpenAI::Models::Responses::ResponseTextConfig::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose diff --git a/lib/openai/models/responses/response_text_delta_event.rb b/lib/openai/models/responses/response_text_delta_event.rb index a7fb0ddbb..89112f718 100644 --- a/lib/openai/models/responses/response_text_delta_event.rb +++ b/lib/openai/models/responses/response_text_delta_event.rb @@ -50,25 +50,28 @@ class ResponseTextDeltaEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.output_text.delta" # @!method initialize(content_index:, delta:, item_id:, logprobs:, output_index:, sequence_number:, type: :"response.output_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseTextDeltaEvent} for more details. - # # Emitted when there is an additional text delta. # - # @param content_index [Integer] The index of the content part that the text delta was added to. + # @param content_index [Integer] + # The index of the content part that the text delta was added to. # - # @param delta [String] The text delta that was added. + # @param delta [String] + # The text delta that was added. # - # @param item_id [String] The ID of the output item that the text delta was added to. + # @param item_id [String] + # The ID of the output item that the text delta was added to. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text delta was added to. + # @param output_index [Integer] + # The index of the output item that the text delta was added to. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param type [Symbol, :"response.output_text.delta"] The type of the event. Always `response.output_text.delta`. - + # @param type [Symbol, :"response.output_text.delta"] + # The type of the event. Always `response.output_text.delta`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -92,19 +95,18 @@ class Logprob < OpenAI::Internal::Type::BaseModel ) # @!method initialize(token:, logprob:, top_logprobs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseTextDeltaEvent::Logprob} for more details. - # # A logprob is the logarithmic probability that the model assigns to producing a # particular token at a given position in the sequence. Less-negative (higher) # logprob values indicate greater model confidence in that token choice. # - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. # - # @param top_logprobs [Array] The log probabilities of up to 20 of the most likely tokens. - + # @param top_logprobs [Array] + # The log probabilities of up to 20 of the most likely tokens. class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -119,9 +121,11 @@ class TopLogprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, logprob: nil) - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. end end end diff --git a/lib/openai/models/responses/response_text_done_event.rb b/lib/openai/models/responses/response_text_done_event.rb index 1daff0160..d6e2823db 100644 --- a/lib/openai/models/responses/response_text_done_event.rb +++ b/lib/openai/models/responses/response_text_done_event.rb @@ -50,25 +50,28 @@ class ResponseTextDoneEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.output_text.done" # @!method initialize(content_index:, item_id:, logprobs:, output_index:, sequence_number:, text:, type: :"response.output_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseTextDoneEvent} for more details. - # # Emitted when text content is finalized. # - # @param content_index [Integer] The index of the content part that the text content is finalized. + # @param content_index [Integer] + # The index of the content part that the text content is finalized. # - # @param item_id [String] The ID of the output item that the text content is finalized. + # @param item_id [String] + # The ID of the output item that the text content is finalized. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text content is finalized. + # @param output_index [Integer] + # The index of the output item that the text content is finalized. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param text [String] The text content that is finalized. + # @param text [String] + # The text content that is finalized. # - # @param type [Symbol, :"response.output_text.done"] The type of the event. Always `response.output_text.done`. - + # @param type [Symbol, :"response.output_text.done"] + # The type of the event. Always `response.output_text.done`. class Logprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -92,19 +95,18 @@ class Logprob < OpenAI::Internal::Type::BaseModel ) # @!method initialize(token:, logprob:, top_logprobs: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseTextDoneEvent::Logprob} for more details. - # # A logprob is the logarithmic probability that the model assigns to producing a # particular token at a given position in the sequence. Less-negative (higher) # logprob values indicate greater model confidence in that token choice. # - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. # - # @param top_logprobs [Array] The log probabilities of up to 20 of the most likely tokens. - + # @param top_logprobs [Array] + # The log probabilities of up to 20 of the most likely tokens. class TopLogprob < OpenAI::Internal::Type::BaseModel # @!attribute token # A possible text token. @@ -119,9 +121,11 @@ class TopLogprob < OpenAI::Internal::Type::BaseModel optional :logprob, Float # @!method initialize(token: nil, logprob: nil) - # @param token [String] A possible text token. + # @param token [String] + # A possible text token. # - # @param logprob [Float] The log probability of this token. + # @param logprob [Float] + # The log probability of this token. end end end diff --git a/lib/openai/models/responses/response_tool_search_call.rb b/lib/openai/models/responses/response_tool_search_call.rb index 9e1023e17..055e0a1b3 100644 --- a/lib/openai/models/responses/response_tool_search_call.rb +++ b/lib/openai/models/responses/response_tool_search_call.rb @@ -47,19 +47,26 @@ class ResponseToolSearchCall < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, arguments:, call_id:, execution:, status:, created_by: nil, type: :tool_search_call) - # @param id [String] The unique ID of the tool search call item. + # @param id [String] + # The unique ID of the tool search call item. # - # @param arguments [Object] Arguments used for the tool search call. + # @param arguments [Object] + # Arguments used for the tool search call. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchCall::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchCall::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchCall::Status] The status of the tool search call item that was recorded. + # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchCall::Status] + # The status of the tool search call item that was recorded. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :tool_search_call] The type of the item. Always `tool_search_call`. + # @param type [Symbol, :tool_search_call] + # The type of the item. Always `tool_search_call`. # Whether tool search was executed by the server or by the client. # diff --git a/lib/openai/models/responses/response_tool_search_output_item.rb b/lib/openai/models/responses/response_tool_search_output_item.rb index 8fdb6a410..57c56d43b 100644 --- a/lib/openai/models/responses/response_tool_search_output_item.rb +++ b/lib/openai/models/responses/response_tool_search_output_item.rb @@ -47,19 +47,26 @@ class ResponseToolSearchOutputItem < OpenAI::Internal::Type::BaseModel optional :created_by, String # @!method initialize(id:, call_id:, execution:, status:, tools:, created_by: nil, type: :tool_search_output) - # @param id [String] The unique ID of the tool search output item. + # @param id [String] + # The unique ID of the tool search output item. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItem::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItem::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItem::Status] The status of the tool search output item that was recorded. + # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItem::Status] + # The status of the tool search output item that was recorded. # - # @param tools [Array] The loaded tool definitions returned by tool search. + # @param tools [Array] + # The loaded tool definitions returned by tool search. # - # @param created_by [String] The identifier of the actor that created the item. + # @param created_by [String] + # The identifier of the actor that created the item. # - # @param type [Symbol, :tool_search_output] The type of the item. Always `tool_search_output`. + # @param type [Symbol, :tool_search_output] + # The type of the item. Always `tool_search_output`. # Whether tool search was executed by the server or by the client. # diff --git a/lib/openai/models/responses/response_tool_search_output_item_param.rb b/lib/openai/models/responses/response_tool_search_output_item_param.rb index e0ab555bc..470784306 100644 --- a/lib/openai/models/responses/response_tool_search_output_item_param.rb +++ b/lib/openai/models/responses/response_tool_search_output_item_param.rb @@ -47,17 +47,23 @@ class ResponseToolSearchOutputItemParam < OpenAI::Internal::Type::BaseModel ) # @!method initialize(tools:, id: nil, call_id: nil, execution: nil, status: nil, type: :tool_search_output) - # @param tools [Array] The loaded tool definitions returned by the tool search output. + # @param tools [Array] + # The loaded tool definitions returned by the tool search output. # - # @param id [String, nil] The unique ID of this tool search output. + # @param id [String, nil] + # The unique ID of this tool search output. # - # @param call_id [String, nil] The unique ID of the tool search call generated by the model. + # @param call_id [String, nil] + # The unique ID of the tool search call generated by the model. # - # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam::Execution] Whether tool search was executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam::Execution] + # Whether tool search was executed by the server or by the client. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam::Status, nil] The status of the tool search output. + # @param status [Symbol, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam::Status, nil] + # The status of the tool search output. # - # @param type [Symbol, :tool_search_output] The item type. Always `tool_search_output`. + # @param type [Symbol, :tool_search_output] + # The item type. Always `tool_search_output`. # Whether tool search was executed by the server or by the client. # diff --git a/lib/openai/models/responses/response_usage.rb b/lib/openai/models/responses/response_usage.rb index 5cca17488..6a552ee84 100644 --- a/lib/openai/models/responses/response_usage.rb +++ b/lib/openai/models/responses/response_usage.rb @@ -38,15 +38,20 @@ class ResponseUsage < OpenAI::Internal::Type::BaseModel # Represents token usage details including input tokens, output tokens, a # breakdown of output tokens, and the total tokens used. # - # @param input_tokens [Integer] The number of input tokens. + # @param input_tokens [Integer] + # The number of input tokens. # - # @param input_tokens_details [OpenAI::Models::Responses::ResponseUsage::InputTokensDetails] A detailed breakdown of the input tokens. + # @param input_tokens_details [OpenAI::Models::Responses::ResponseUsage::InputTokensDetails] + # A detailed breakdown of the input tokens. # - # @param output_tokens [Integer] The number of output tokens. + # @param output_tokens [Integer] + # The number of output tokens. # - # @param output_tokens_details [OpenAI::Models::Responses::ResponseUsage::OutputTokensDetails] A detailed breakdown of the output tokens. + # @param output_tokens_details [OpenAI::Models::Responses::ResponseUsage::OutputTokensDetails] + # A detailed breakdown of the output tokens. # - # @param total_tokens [Integer] The total number of tokens used. + # @param total_tokens [Integer] + # The total number of tokens used. # @see OpenAI::Models::Responses::ResponseUsage#input_tokens_details class InputTokensDetails < OpenAI::Internal::Type::BaseModel @@ -58,20 +63,20 @@ class InputTokensDetails < OpenAI::Internal::Type::BaseModel # @!attribute cached_tokens # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [Integer] required :cached_tokens, Integer # @!method initialize(cache_write_tokens:, cached_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseUsage::InputTokensDetails} for more details. - # # A detailed breakdown of the input tokens. # - # @param cache_write_tokens [Integer] The number of input tokens that were written to the cache. + # @param cache_write_tokens [Integer] + # The number of input tokens that were written to the cache. # - # @param cached_tokens [Integer] The number of tokens that were retrieved from the cache. + # @param cached_tokens [Integer] + # The number of tokens that were retrieved from the cache. + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). end # @see OpenAI::Models::Responses::ResponseUsage#output_tokens_details @@ -85,7 +90,8 @@ class OutputTokensDetails < OpenAI::Internal::Type::BaseModel # @!method initialize(reasoning_tokens:) # A detailed breakdown of the output tokens. # - # @param reasoning_tokens [Integer] The number of reasoning tokens. + # @param reasoning_tokens [Integer] + # The number of reasoning tokens. end end end diff --git a/lib/openai/models/responses/response_web_search_call_completed_event.rb b/lib/openai/models/responses/response_web_search_call_completed_event.rb index 91ae2f375..257a74d3e 100644 --- a/lib/openai/models/responses/response_web_search_call_completed_event.rb +++ b/lib/openai/models/responses/response_web_search_call_completed_event.rb @@ -29,19 +29,19 @@ class ResponseWebSearchCallCompletedEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.web_search_call.completed" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.web_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseWebSearchCallCompletedEvent} for more - # details. - # # Emitted when a web search call is completed. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param type [Symbol, :"response.web_search_call.completed"] The type of the event. Always `response.web_search_call.completed`. + # @param type [Symbol, :"response.web_search_call.completed"] + # The type of the event. Always `response.web_search_call.completed`. end end end diff --git a/lib/openai/models/responses/response_web_search_call_in_progress_event.rb b/lib/openai/models/responses/response_web_search_call_in_progress_event.rb index f00f81c0e..d78afce50 100644 --- a/lib/openai/models/responses/response_web_search_call_in_progress_event.rb +++ b/lib/openai/models/responses/response_web_search_call_in_progress_event.rb @@ -29,19 +29,19 @@ class ResponseWebSearchCallInProgressEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.web_search_call.in_progress" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.web_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseWebSearchCallInProgressEvent} for more - # details. - # # Emitted when a web search call is initiated. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param type [Symbol, :"response.web_search_call.in_progress"] The type of the event. Always `response.web_search_call.in_progress`. + # @param type [Symbol, :"response.web_search_call.in_progress"] + # The type of the event. Always `response.web_search_call.in_progress`. end end end diff --git a/lib/openai/models/responses/response_web_search_call_searching_event.rb b/lib/openai/models/responses/response_web_search_call_searching_event.rb index d1552a076..bd571bf2f 100644 --- a/lib/openai/models/responses/response_web_search_call_searching_event.rb +++ b/lib/openai/models/responses/response_web_search_call_searching_event.rb @@ -29,19 +29,19 @@ class ResponseWebSearchCallSearchingEvent < OpenAI::Internal::Type::BaseModel required :type, const: :"response.web_search_call.searching" # @!method initialize(item_id:, output_index:, sequence_number:, type: :"response.web_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseWebSearchCallSearchingEvent} for more - # details. - # # Emitted when a web search call is executing. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param type [Symbol, :"response.web_search_call.searching"] The type of the event. Always `response.web_search_call.searching`. + # @param type [Symbol, :"response.web_search_call.searching"] + # The type of the event. Always `response.web_search_call.searching`. end end end diff --git a/lib/openai/models/responses/responses_client_event.rb b/lib/openai/models/responses/responses_client_event.rb index 9d1f9d690..8ac4cd08e 100644 --- a/lib/openai/models/responses/responses_client_event.rb +++ b/lib/openai/models/responses/responses_client_event.rb @@ -58,7 +58,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute background # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @return [Boolean, nil] optional :background, OpenAI::Internal::Type::Boolean, nil?: true @@ -122,11 +122,11 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @return [String, Array, nil] optional :input, union: -> { OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input } @@ -144,7 +144,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute max_output_tokens # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). # # @return [Integer, nil] optional :max_output_tokens, Integer, nil?: true @@ -173,8 +173,8 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # # @return [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel, nil] optional :model, union: -> { OpenAI::ResponsesModel } @@ -198,7 +198,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute previous_response_id # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. # # @return [String, nil] @@ -206,7 +206,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute prompt # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). # # @return [OpenAI::Models::Responses::ResponsePrompt, nil] optional :prompt, -> { OpenAI::Responses::ResponsePrompt }, nil?: true @@ -214,7 +214,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute prompt_cache_key # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). # # @return [String, nil] optional :prompt_cache_key, String, nil?: true @@ -227,7 +227,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # # @return [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions, nil] @@ -244,7 +244,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -266,7 +266,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # @!attribute reasoning # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). # # @return [OpenAI::Models::Reasoning, nil] optional :reasoning, -> { OpenAI::Reasoning }, nil?: true @@ -277,7 +277,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :safety_identifier, String, nil?: true @@ -290,13 +290,15 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -319,7 +321,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). # # @return [Boolean, nil] optional :store, OpenAI::Internal::Type::Boolean, nil?: true @@ -329,7 +331,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. # # @return [Boolean, nil] @@ -368,8 +370,8 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) # # @return [OpenAI::Models::Responses::ResponseTextConfig, nil] optional :text, -> { OpenAI::Responses::ResponseTextConfig } @@ -390,17 +392,18 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. # # @return [Array, nil] @@ -449,16 +452,12 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @return [String, nil] optional :user, String # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate} for more - # details. - # # Client event for creating a response over a persistent WebSocket connection. # This payload uses the same top-level fields as `POST /v1/responses`, plus # WebSocket-only envelope metadata. @@ -469,72 +468,268 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # - `background` is not supported over WebSocket. # - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`. # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream [Boolean, nil] If set to true, the model response data will be streamed to the client - # - # @param stream_id [String] The WebSocket lane for this response. Requests with the same - # - # @param stream_options [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param type [Symbol, :"response.create"] The type of the client event. Always `response.create`. - + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream [Boolean, nil] + # If set to true, the model response data will be streamed to the client as it is + # generated using + # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). + # See the + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) + # for more information. + # + # @param stream_id [String] + # The WebSocket lane for this response. Requests with the same `stream_id` are + # processed FIFO, and events for the response echo the same `stream_id`. + # + # `stream_id` controls routing; `previous_response_id` controls conversation + # lineage, so a new lane can fork from a response created on another lane. + # + # @param stream_options [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Responses::ResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param type [Symbol, :"response.create"] + # The type of the client event. Always `response.create`. class ContextManagement < OpenAI::Internal::Type::BaseModel # @!attribute type # The context management entry type. Currently only 'compaction' is supported. @@ -549,9 +744,11 @@ class ContextManagement < OpenAI::Internal::Type::BaseModel optional :compact_threshold, Integer, nil?: true # @!method initialize(type:, compact_threshold: nil) - # @param type [String] The context management entry type. Currently only 'compaction' is supported. + # @param type [String] + # The context management entry type. Currently only 'compaction' is supported. # - # @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry. + # @param compact_threshold [Integer, nil] + # Token threshold at which compaction should be triggered for this entry. end # The conversation that this response belongs to. Items from this conversation are @@ -577,11 +774,11 @@ module Conversation # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) # # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate#input module Input @@ -619,15 +816,14 @@ class Moderation < OpenAI::Internal::Type::BaseModel ) # @!method initialize(model:, policy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation} - # for more details. - # # Configuration for running moderation on the input and output of this response. # - # @param model [String] The moderation model to use for moderated completions, e.g. 'omni-moderation-lat + # @param model [String] + # The moderation model to use for moderated completions, e.g. + # 'omni-moderation-latest'. # - # @param policy [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy, nil] The policy to apply to moderated response input and output. + # @param policy [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy, nil] + # The policy to apply to moderated response input and output. # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation#policy class Policy < OpenAI::Internal::Type::BaseModel @@ -658,9 +854,11 @@ class Policy < OpenAI::Internal::Type::BaseModel # @!method initialize(input: nil, output: nil) # The policy to apply to moderated response input and output. # - # @param input [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input, nil] The moderation policy for the response input. + # @param input [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input, nil] + # The moderation policy for the response input. # - # @param output [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output, nil] The moderation policy for the response output. + # @param output [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output, nil] + # The moderation policy for the response output. # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy#input class Input < OpenAI::Internal::Type::BaseModel @@ -755,10 +953,6 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel ) # @!method initialize(comparison_response_id: nil, mode: nil, ttl: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions} - # for more details. - # # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each @@ -766,14 +960,25 @@ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. # - # @param comparison_response_id [String, nil] The ID of a response to compare when diagnosing prompt cache reuse. Supplying th + # @param comparison_response_id [String, nil] + # The ID of a response to compare when diagnosing prompt cache reuse. Supplying + # this field requests prompt cache diagnostics when the feature is enabled. # - # @param mode [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode] Controls whether OpenAI automatically creates an implicit cache breakpoint. Defa + # @param mode [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode] + # Controls whether OpenAI automatically creates an implicit cache breakpoint. + # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint + # and writes up to the latest three explicit breakpoints in the request. With + # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the + # latest four explicit breakpoints. If there are no explicit breakpoints, the + # request does not use prompt caching. # - # @param ttl [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl] The minimum lifetime applied to every implicit and explicit cache breakpoint wri + # @param ttl [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl] + # The minimum lifetime applied to every implicit and explicit cache breakpoint + # written by the request. Defaults to `30m`, which is currently the only supported + # value. The backend may retain cache entries for longer. # Controls whether OpenAI automatically creates an implicit cache breakpoint. # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint @@ -815,7 +1020,7 @@ module Ttl # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -846,13 +1051,15 @@ module PromptCacheRetention # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -894,13 +1101,15 @@ class StreamOptions < OpenAI::Internal::Type::BaseModel optional :include_obfuscation, OpenAI::Internal::Type::Boolean # @!method initialize(include_obfuscation: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions} - # for more details. - # # Options for streaming responses. Only set this when you set `stream: true`. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. end # How the model should select which tool (or tools) to use when generating a @@ -925,7 +1134,7 @@ module ToolChoice variant -> { OpenAI::Responses::ToolChoiceAllowed } # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). variant -> { OpenAI::Responses::ToolChoiceTypes } # Use this option to force the model to call a specific function. @@ -957,7 +1166,8 @@ class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The tool to call. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The tool to call. Always `programmatic_tool_calling`. end # @!method self.variants diff --git a/lib/openai/models/responses/responses_server_event.rb b/lib/openai/models/responses/responses_server_event.rb index 16c45a3d2..e002f76d2 100644 --- a/lib/openai/models/responses/responses_server_event.rb +++ b/lib/openai/models/responses/responses_server_event.rb @@ -371,19 +371,20 @@ class ResponseAudioWsDelta < OpenAI::Models::Responses::ResponseAudioDeltaEvent optional :stream_id, String # @!method initialize(delta:, sequence_number:, stream_id: nil, type: :"response.audio.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseAudioWsDelta} for more - # details. - # # Emitted when there is a partial audio response. # - # @param delta [String] A chunk of Base64 encoded response audio bytes. + # @param delta [String] + # A chunk of Base64 encoded response audio bytes. # - # @param sequence_number [Integer] A sequence number for this chunk of the stream response. + # @param sequence_number [Integer] + # A sequence number for this chunk of the stream response. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.delta"] The type of the event. Always `response.audio.delta`. + # @param type [Symbol, :"response.audio.delta"] + # The type of the event. Always `response.audio.delta`. end class ResponseAudioWsDone < OpenAI::Models::Responses::ResponseAudioDoneEvent @@ -395,17 +396,17 @@ class ResponseAudioWsDone < OpenAI::Models::Responses::ResponseAudioDoneEvent optional :stream_id, String # @!method initialize(sequence_number:, stream_id: nil, type: :"response.audio.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseAudioWsDone} for more - # details. - # # Emitted when the audio response is complete. # - # @param sequence_number [Integer] The sequence number of the delta. + # @param sequence_number [Integer] + # The sequence number of the delta. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.done"] The type of the event. Always `response.audio.done`. + # @param type [Symbol, :"response.audio.done"] + # The type of the event. Always `response.audio.done`. end class ResponseAudioTranscriptWsDelta < OpenAI::Models::Responses::ResponseAudioTranscriptDeltaEvent @@ -417,19 +418,20 @@ class ResponseAudioTranscriptWsDelta < OpenAI::Models::Responses::ResponseAudioT optional :stream_id, String # @!method initialize(delta:, sequence_number:, stream_id: nil, type: :"response.audio.transcript.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseAudioTranscriptWsDelta} - # for more details. - # # Emitted when there is a partial transcript of audio. # - # @param delta [String] The partial transcript of the audio response. + # @param delta [String] + # The partial transcript of the audio response. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.transcript.delta"] The type of the event. Always `response.audio.transcript.delta`. + # @param type [Symbol, :"response.audio.transcript.delta"] + # The type of the event. Always `response.audio.transcript.delta`. end class ResponseAudioTranscriptWsDone < OpenAI::Models::Responses::ResponseAudioTranscriptDoneEvent @@ -441,17 +443,17 @@ class ResponseAudioTranscriptWsDone < OpenAI::Models::Responses::ResponseAudioTr optional :stream_id, String # @!method initialize(sequence_number:, stream_id: nil, type: :"response.audio.transcript.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseAudioTranscriptWsDone} - # for more details. - # # Emitted when the full audio transcript is completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.audio.transcript.done"] The type of the event. Always `response.audio.transcript.done`. + # @param type [Symbol, :"response.audio.transcript.done"] + # The type of the event. Always `response.audio.transcript.done`. end class ResponseCodeInterpreterCallCodeWsDelta < OpenAI::Models::Responses::ResponseCodeInterpreterCallCodeDeltaEvent @@ -463,23 +465,27 @@ class ResponseCodeInterpreterCallCodeWsDelta < OpenAI::Models::Responses::Respon optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.code_interpreter_call_code.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCodeInterpreterCallCodeWsDelta} - # for more details. - # # Emitted when a partial code snippet is streamed by the code interpreter. # - # @param delta [String] The partial code snippet being streamed by the code interpreter. + # @param delta [String] + # The partial code snippet being streamed by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is being streame + # @param output_index [Integer] + # The index of the output item in the response for which the code is being + # streamed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call_code.delta"] The type of the event. Always `response.code_interpreter_call_code.delta`. + # @param type [Symbol, :"response.code_interpreter_call_code.delta"] + # The type of the event. Always `response.code_interpreter_call_code.delta`. end class ResponseCodeInterpreterCallCodeWsDone < OpenAI::Models::Responses::ResponseCodeInterpreterCallCodeDoneEvent @@ -491,23 +497,26 @@ class ResponseCodeInterpreterCallCodeWsDone < OpenAI::Models::Responses::Respons optional :stream_id, String # @!method initialize(code:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.code_interpreter_call_code.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCodeInterpreterCallCodeWsDone} - # for more details. - # # Emitted when the code snippet is finalized by the code interpreter. # - # @param code [String] The final code snippet output by the code interpreter. + # @param code [String] + # The final code snippet output by the code interpreter. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code is finalized. + # @param output_index [Integer] + # The index of the output item in the response for which the code is finalized. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call_code.done"] The type of the event. Always `response.code_interpreter_call_code.done`. + # @param type [Symbol, :"response.code_interpreter_call_code.done"] + # The type of the event. Always `response.code_interpreter_call_code.done`. end class ResponseCodeInterpreterCallWsCompleted < OpenAI::Models::Responses::ResponseCodeInterpreterCallCompletedEvent @@ -519,21 +528,24 @@ class ResponseCodeInterpreterCallWsCompleted < OpenAI::Models::Responses::Respon optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.code_interpreter_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCodeInterpreterCallWsCompleted} - # for more details. - # # Emitted when the code interpreter call is completed. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is completed. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.completed"] The type of the event. Always `response.code_interpreter_call.completed`. + # @param type [Symbol, :"response.code_interpreter_call.completed"] + # The type of the event. Always `response.code_interpreter_call.completed`. end class ResponseCodeInterpreterCallInWsProgress < OpenAI::Models::Responses::ResponseCodeInterpreterCallInProgressEvent @@ -545,21 +557,24 @@ class ResponseCodeInterpreterCallInWsProgress < OpenAI::Models::Responses::Respo optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.code_interpreter_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCodeInterpreterCallInWsProgress} - # for more details. - # # Emitted when a code interpreter call is in progress. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter call + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter call + # is in progress. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.in_progress"] The type of the event. Always `response.code_interpreter_call.in_progress`. + # @param type [Symbol, :"response.code_interpreter_call.in_progress"] + # The type of the event. Always `response.code_interpreter_call.in_progress`. end class ResponseCodeInterpreterCallWsInterpreting < OpenAI::Models::Responses::ResponseCodeInterpreterCallInterpretingEvent @@ -571,21 +586,24 @@ class ResponseCodeInterpreterCallWsInterpreting < OpenAI::Models::Responses::Res optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.code_interpreter_call.interpreting") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCodeInterpreterCallWsInterpreting} - # for more details. - # # Emitted when the code interpreter is actively interpreting the code snippet. # - # @param item_id [String] The unique identifier of the code interpreter tool call item. + # @param item_id [String] + # The unique identifier of the code interpreter tool call item. # - # @param output_index [Integer] The index of the output item in the response for which the code interpreter is i + # @param output_index [Integer] + # The index of the output item in the response for which the code interpreter is + # interpreting code. # - # @param sequence_number [Integer] The sequence number of this event, used to order streaming events. + # @param sequence_number [Integer] + # The sequence number of this event, used to order streaming events. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.code_interpreter_call.interpreting"] The type of the event. Always `response.code_interpreter_call.interpreting`. + # @param type [Symbol, :"response.code_interpreter_call.interpreting"] + # The type of the event. Always `response.code_interpreter_call.interpreting`. end class ResponseWsCompleted < OpenAI::Models::Responses::ResponseCompletedEvent @@ -597,19 +615,20 @@ class ResponseWsCompleted < OpenAI::Models::Responses::ResponseCompletedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsCompleted} for more - # details. - # # Emitted when the model response is complete. # - # @param response [OpenAI::Models::Responses::Response] Properties of the completed response. + # @param response [OpenAI::Models::Responses::Response] + # Properties of the completed response. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.completed"] The type of the event. Always `response.completed`. + # @param type [Symbol, :"response.completed"] + # The type of the event. Always `response.completed`. end class ResponseContentPartWsAdded < OpenAI::Models::Responses::ResponseContentPartAddedEvent @@ -621,25 +640,29 @@ class ResponseContentPartWsAdded < OpenAI::Models::Responses::ResponseContentPar optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, stream_id: nil, type: :"response.content_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseContentPartWsAdded} - # for more details. - # # Emitted when a new content part is added. # - # @param content_index [Integer] The index of the content part that was added. + # @param content_index [Integer] + # The index of the content part that was added. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added. + # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] + # The content part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.content_part.added"] The type of the event. Always `response.content_part.added`. + # @param type [Symbol, :"response.content_part.added"] + # The type of the event. Always `response.content_part.added`. end class ResponseContentPartWsDone < OpenAI::Models::Responses::ResponseContentPartDoneEvent @@ -651,25 +674,29 @@ class ResponseContentPartWsDone < OpenAI::Models::Responses::ResponseContentPart optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, part:, sequence_number:, stream_id: nil, type: :"response.content_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseContentPartWsDone} for - # more details. - # # Emitted when a content part is done. # - # @param content_index [Integer] The index of the content part that is done. + # @param content_index [Integer] + # The index of the content part that is done. # - # @param item_id [String] The ID of the output item that the content part was added to. + # @param item_id [String] + # The ID of the output item that the content part was added to. # - # @param output_index [Integer] The index of the output item that the content part was added to. + # @param output_index [Integer] + # The index of the output item that the content part was added to. # - # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done. + # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] + # The content part that is done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.content_part.done"] The type of the event. Always `response.content_part.done`. + # @param type [Symbol, :"response.content_part.done"] + # The type of the event. Always `response.content_part.done`. end class ResponseWsCreated < OpenAI::Models::Responses::ResponseCreatedEvent @@ -681,19 +708,20 @@ class ResponseWsCreated < OpenAI::Models::Responses::ResponseCreatedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.created") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsCreated} for more - # details. - # # An event that is emitted when a response is created. # - # @param response [OpenAI::Models::Responses::Response] The response that was created. + # @param response [OpenAI::Models::Responses::Response] + # The response that was created. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.created"] The type of the event. Always `response.created`. + # @param type [Symbol, :"response.created"] + # The type of the event. Always `response.created`. end class ResponseFileSearchCallWsCompleted < OpenAI::Models::Responses::ResponseFileSearchCallCompletedEvent @@ -705,21 +733,23 @@ class ResponseFileSearchCallWsCompleted < OpenAI::Models::Responses::ResponseFil optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.file_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseFileSearchCallWsCompleted} - # for more details. - # # Emitted when a file search call is completed (results found). # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.completed"] The type of the event. Always `response.file_search_call.completed`. + # @param type [Symbol, :"response.file_search_call.completed"] + # The type of the event. Always `response.file_search_call.completed`. end class ResponseFileSearchCallInWsProgress < OpenAI::Models::Responses::ResponseFileSearchCallInProgressEvent @@ -731,21 +761,23 @@ class ResponseFileSearchCallInWsProgress < OpenAI::Models::Responses::ResponseFi optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.file_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseFileSearchCallInWsProgress} - # for more details. - # # Emitted when a file search call is initiated. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is initiated. + # @param output_index [Integer] + # The index of the output item that the file search call is initiated. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.in_progress"] The type of the event. Always `response.file_search_call.in_progress`. + # @param type [Symbol, :"response.file_search_call.in_progress"] + # The type of the event. Always `response.file_search_call.in_progress`. end class ResponseFileSearchCallWsSearching < OpenAI::Models::Responses::ResponseFileSearchCallSearchingEvent @@ -757,21 +789,23 @@ class ResponseFileSearchCallWsSearching < OpenAI::Models::Responses::ResponseFil optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.file_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseFileSearchCallWsSearching} - # for more details. - # # Emitted when a file search is currently searching. # - # @param item_id [String] The ID of the output item that the file search call is initiated. + # @param item_id [String] + # The ID of the output item that the file search call is initiated. # - # @param output_index [Integer] The index of the output item that the file search call is searching. + # @param output_index [Integer] + # The index of the output item that the file search call is searching. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.file_search_call.searching"] The type of the event. Always `response.file_search_call.searching`. + # @param type [Symbol, :"response.file_search_call.searching"] + # The type of the event. Always `response.file_search_call.searching`. end class ResponseFunctionCallArgumentsWsDelta < OpenAI::Models::Responses::ResponseFunctionCallArgumentsDeltaEvent @@ -783,23 +817,26 @@ class ResponseFunctionCallArgumentsWsDelta < OpenAI::Models::Responses::Response optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.function_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseFunctionCallArgumentsWsDelta} - # for more details. - # # Emitted when there is a partial function-call arguments delta. # - # @param delta [String] The function-call arguments delta that is added. + # @param delta [String] + # The function-call arguments delta that is added. # - # @param item_id [String] The ID of the output item that the function-call arguments delta is added to. + # @param item_id [String] + # The ID of the output item that the function-call arguments delta is added to. # - # @param output_index [Integer] The index of the output item that the function-call arguments delta is added to. + # @param output_index [Integer] + # The index of the output item that the function-call arguments delta is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.function_call_arguments.delta"] The type of the event. Always `response.function_call_arguments.delta`. + # @param type [Symbol, :"response.function_call_arguments.delta"] + # The type of the event. Always `response.function_call_arguments.delta`. end class ResponseFunctionCallArgumentsWsDone < OpenAI::Models::Responses::ResponseFunctionCallArgumentsDoneEvent @@ -811,21 +848,23 @@ class ResponseFunctionCallArgumentsWsDone < OpenAI::Models::Responses::ResponseF optional :stream_id, String # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.function_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseFunctionCallArgumentsWsDone} - # for more details. - # # Emitted when function-call arguments are finalized. # - # @param arguments [String] The function-call arguments. + # @param arguments [String] + # The function-call arguments. # - # @param item_id [String] The ID of the item. + # @param item_id [String] + # The ID of the item. # - # @param output_index [Integer] The index of the output item. + # @param output_index [Integer] + # The index of the output item. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # # @param type [Symbol, :"response.function_call_arguments.done"] end @@ -839,23 +878,26 @@ class ResponseShellCallCommandWsAdded < OpenAI::Models::Responses::ResponseShell optional :stream_id, String # @!method initialize(command:, command_index:, output_index:, sequence_number:, stream_id: nil, type: :"response.shell_call_command.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseShellCallCommandWsAdded} - # for more details. - # # A streaming event that indicated a shell command was added to a tool call. # - # @param command [String] The shell command that was added. + # @param command [String] + # The shell command that was added. # - # @param command_index [Integer] The index of the shell command that was added. + # @param command_index [Integer] + # The index of the shell command that was added. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.added"] The type of the event, always `response.shell_call_command.added`. + # @param type [Symbol, :"response.shell_call_command.added"] + # The type of the event, always `response.shell_call_command.added`. end class ResponseShellCallCommandWsDelta < OpenAI::Models::Responses::ResponseShellCallCommandDeltaEvent @@ -867,25 +909,29 @@ class ResponseShellCallCommandWsDelta < OpenAI::Models::Responses::ResponseShell optional :stream_id, String # @!method initialize(command_index:, delta:, output_index:, sequence_number:, obfuscation: nil, stream_id: nil, type: :"response.shell_call_command.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseShellCallCommandWsDelta} - # for more details. - # # A streaming event that indicated a shell command was incrementally updated. # - # @param command_index [Integer] The index of the shell command that was updated. + # @param command_index [Integer] + # The index of the shell command that was updated. # - # @param delta [String] The shell command delta that was appended. + # @param delta [String] + # The shell command delta that was appended. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param obfuscation [String] An obfuscation string that was added to pad the event payload. + # @param obfuscation [String] + # An obfuscation string that was added to pad the event payload. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.delta"] The type of the event, always `response.shell_call_command.delta`. + # @param type [Symbol, :"response.shell_call_command.delta"] + # The type of the event, always `response.shell_call_command.delta`. end class ResponseShellCallCommandWsDone < OpenAI::Models::Responses::ResponseShellCallCommandDoneEvent @@ -897,23 +943,26 @@ class ResponseShellCallCommandWsDone < OpenAI::Models::Responses::ResponseShellC optional :stream_id, String # @!method initialize(command:, command_index:, output_index:, sequence_number:, stream_id: nil, type: :"response.shell_call_command.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseShellCallCommandWsDone} - # for more details. - # # A streaming event that indicated a shell command was completed. # - # @param command [String] The final shell command that was emitted. + # @param command [String] + # The final shell command that was emitted. # - # @param command_index [Integer] The index of the shell command that was completed. + # @param command_index [Integer] + # The index of the shell command that was completed. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_command.done"] The type of the event, always `response.shell_call_command.done`. + # @param type [Symbol, :"response.shell_call_command.done"] + # The type of the event, always `response.shell_call_command.done`. end class ResponseShellCallOutputContentWsDelta < OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent @@ -925,25 +974,29 @@ class ResponseShellCallOutputContentWsDelta < OpenAI::Models::Responses::Respons optional :stream_id, String # @!method initialize(command_index:, delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.shell_call_output_content.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseShellCallOutputContentWsDelta} - # for more details. - # # A streaming event that indicated shell call output was incrementally added. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param delta [OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent::Delta] The stdout/stderr delta that was emitted. + # @param delta [OpenAI::Models::Responses::ResponseShellCallOutputContentDeltaEvent::Delta] + # The stdout/stderr delta that was emitted. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_output_content.delta"] The type of the event, always `response.shell_call_output_content.delta`. + # @param type [Symbol, :"response.shell_call_output_content.delta"] + # The type of the event, always `response.shell_call_output_content.delta`. end class ResponseShellCallOutputContentWsDone < OpenAI::Models::Responses::ResponseShellCallOutputContentDoneEvent @@ -955,25 +1008,29 @@ class ResponseShellCallOutputContentWsDone < OpenAI::Models::Responses::Response optional :stream_id, String # @!method initialize(command_index:, item_id:, output:, output_index:, sequence_number:, stream_id: nil, type: :"response.shell_call_output_content.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseShellCallOutputContentWsDone} - # for more details. - # # A streaming event that indicated shell call output was completed. # - # @param command_index [Integer] The index of the shell command that produced output. + # @param command_index [Integer] + # The index of the shell command that produced output. # - # @param item_id [String] The ID of the output item that was updated. + # @param item_id [String] + # The ID of the output item that was updated. # - # @param output [Array] The output contents emitted for the shell command. + # @param output [Array] + # The output contents emitted for the shell command. # - # @param output_index [Integer] The index of the output item that was updated. + # @param output_index [Integer] + # The index of the output item that was updated. # - # @param sequence_number [Integer] The sequence number of the event that was emitted. + # @param sequence_number [Integer] + # The sequence number of the event that was emitted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.shell_call_output_content.done"] The type of the event, always `response.shell_call_output_content.done`. + # @param type [Symbol, :"response.shell_call_output_content.done"] + # The type of the event, always `response.shell_call_output_content.done`. end class ResponseInWsProgress < OpenAI::Models::Responses::ResponseInProgressEvent @@ -985,19 +1042,20 @@ class ResponseInWsProgress < OpenAI::Models::Responses::ResponseInProgressEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseInWsProgress} for more - # details. - # # Emitted when the response is in progress. # - # @param response [OpenAI::Models::Responses::Response] The response that is in progress. + # @param response [OpenAI::Models::Responses::Response] + # The response that is in progress. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.in_progress"] The type of the event. Always `response.in_progress`. + # @param type [Symbol, :"response.in_progress"] + # The type of the event. Always `response.in_progress`. end class ResponseWsFailed < OpenAI::Models::Responses::ResponseFailedEvent @@ -1009,19 +1067,20 @@ class ResponseWsFailed < OpenAI::Models::Responses::ResponseFailedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsFailed} for more - # details. - # # An event that is emitted when a response fails. # - # @param response [OpenAI::Models::Responses::Response] The response that failed. + # @param response [OpenAI::Models::Responses::Response] + # The response that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.failed"] The type of the event. Always `response.failed`. + # @param type [Symbol, :"response.failed"] + # The type of the event. Always `response.failed`. end class ResponseWsIncomplete < OpenAI::Models::Responses::ResponseIncompleteEvent @@ -1033,23 +1092,24 @@ class ResponseWsIncomplete < OpenAI::Models::Responses::ResponseIncompleteEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsIncomplete} for more - # details. - # # An event that is emitted when a response finishes as incomplete. # # Over WebSocket, steering can finish a response with # `response.incomplete_details.reason` set to `steered`, followed automatically by # a successor `response.created` that commits the queued steering input. # - # @param response [OpenAI::Models::Responses::Response] The response that was incomplete. + # @param response [OpenAI::Models::Responses::Response] + # The response that was incomplete. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.incomplete"] The type of the event. Always `response.incomplete`. + # @param type [Symbol, :"response.incomplete"] + # The type of the event. Always `response.incomplete`. end class ResponseOutputItemWsAdded < OpenAI::Models::Responses::ResponseOutputItemAddedEvent @@ -1061,21 +1121,26 @@ class ResponseOutputItemWsAdded < OpenAI::Models::Responses::ResponseOutputItemA optional :stream_id, String # @!method initialize(item:, output_index:, sequence_number:, stream_id: nil, type: :"response.output_item.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseOutputItemWsAdded} for - # more details. - # # Emitted when a new output item is added. # - # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] The output item that was added. For reasoning items, `encrypted_content` + # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] + # The output item that was added. For reasoning items, `encrypted_content` may be + # incomplete while the item is in progress. Use the reasoning item from the + # corresponding `response.output_item.done` event when passing it as input to a + # subsequent request. # - # @param output_index [Integer] The index of the output item that was added. + # @param output_index [Integer] + # The index of the output item that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_item.added"] The type of the event. Always `response.output_item.added`. + # @param type [Symbol, :"response.output_item.added"] + # The type of the event. Always `response.output_item.added`. end class ResponseOutputItemWsDone < OpenAI::Models::Responses::ResponseOutputItemDoneEvent @@ -1087,21 +1152,23 @@ class ResponseOutputItemWsDone < OpenAI::Models::Responses::ResponseOutputItemDo optional :stream_id, String # @!method initialize(item:, output_index:, sequence_number:, stream_id: nil, type: :"response.output_item.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseOutputItemWsDone} for - # more details. - # # Emitted when an output item is marked done. # - # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] The output item that was marked done. + # @param item [OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseOutputItem::Program, OpenAI::Models::Responses::ResponseOutputItem::ProgramOutput, OpenAI::Models::Responses::ResponseToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItem, OpenAI::Models::Responses::ResponseOutputItem::AdditionalTools, OpenAI::Models::Responses::ResponseCompactionItem, OpenAI::Models::Responses::ResponseOutputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCall, OpenAI::Models::Responses::ResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseFunctionShellToolCall, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput, OpenAI::Models::Responses::ResponseApplyPatchToolCall, OpenAI::Models::Responses::ResponseApplyPatchToolCallOutput, OpenAI::Models::Responses::ResponseOutputItem::McpCall, OpenAI::Models::Responses::ResponseOutputItem::McpListTools, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseOutputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseCustomToolCallOutputItem] + # The output item that was marked done. # - # @param output_index [Integer] The index of the output item that was marked done. + # @param output_index [Integer] + # The index of the output item that was marked done. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_item.done"] The type of the event. Always `response.output_item.done`. + # @param type [Symbol, :"response.output_item.done"] + # The type of the event. Always `response.output_item.done`. end class ResponseReasoningSummaryPartWsAdded < OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent @@ -1113,25 +1180,29 @@ class ResponseReasoningSummaryPartWsAdded < OpenAI::Models::Responses::ResponseR optional :stream_id, String # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, stream_id: nil, type: :"response.reasoning_summary_part.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningSummaryPartWsAdded} - # for more details. - # # Emitted when a new reasoning summary part is added. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent::Part] The summary part that was added. + # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartAddedEvent::Part] + # The summary part that was added. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_part.added"] The type of the event. Always `response.reasoning_summary_part.added`. + # @param type [Symbol, :"response.reasoning_summary_part.added"] + # The type of the event. Always `response.reasoning_summary_part.added`. end class ResponseReasoningSummaryPartWsDone < OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent @@ -1143,27 +1214,33 @@ class ResponseReasoningSummaryPartWsDone < OpenAI::Models::Responses::ResponseRe optional :stream_id, String # @!method initialize(item_id:, output_index:, part:, sequence_number:, summary_index:, status: nil, stream_id: nil, type: :"response.reasoning_summary_part.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningSummaryPartWsDone} - # for more details. - # # Emitted when a reasoning summary part is completed. # - # @param item_id [String] The ID of the item this summary part is associated with. + # @param item_id [String] + # The ID of the item this summary part is associated with. # - # @param output_index [Integer] The index of the output item this summary part is associated with. + # @param output_index [Integer] + # The index of the output item this summary part is associated with. # - # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Part] The completed summary part. + # @param part [OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Part] + # The completed summary part. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Status] The completion status of the summary part. Omitted when the part completed + # @param status [Symbol, OpenAI::Models::Responses::ResponseReasoningSummaryPartDoneEvent::Status] + # The completion status of the summary part. Omitted when the part completed + # normally and set to `incomplete` when generation was interrupted. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_part.done"] The type of the event. Always `response.reasoning_summary_part.done`. + # @param type [Symbol, :"response.reasoning_summary_part.done"] + # The type of the event. Always `response.reasoning_summary_part.done`. end class ResponseReasoningSummaryTextWsDelta < OpenAI::Models::Responses::ResponseReasoningSummaryTextDeltaEvent @@ -1175,25 +1252,29 @@ class ResponseReasoningSummaryTextWsDelta < OpenAI::Models::Responses::ResponseR optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, summary_index:, stream_id: nil, type: :"response.reasoning_summary_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningSummaryTextWsDelta} - # for more details. - # # Emitted when a delta is added to a reasoning summary text. # - # @param delta [String] The text delta that was added to the summary. + # @param delta [String] + # The text delta that was added to the summary. # - # @param item_id [String] The ID of the item this summary text delta is associated with. + # @param item_id [String] + # The ID of the item this summary text delta is associated with. # - # @param output_index [Integer] The index of the output item this summary text delta is associated with. + # @param output_index [Integer] + # The index of the output item this summary text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_text.delta"] The type of the event. Always `response.reasoning_summary_text.delta`. + # @param type [Symbol, :"response.reasoning_summary_text.delta"] + # The type of the event. Always `response.reasoning_summary_text.delta`. end class ResponseReasoningSummaryTextWsDone < OpenAI::Models::Responses::ResponseReasoningSummaryTextDoneEvent @@ -1205,25 +1286,29 @@ class ResponseReasoningSummaryTextWsDone < OpenAI::Models::Responses::ResponseRe optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, summary_index:, text:, stream_id: nil, type: :"response.reasoning_summary_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningSummaryTextWsDone} - # for more details. - # # Emitted when a reasoning summary text is completed. # - # @param item_id [String] The ID of the item this summary text is associated with. + # @param item_id [String] + # The ID of the item this summary text is associated with. # - # @param output_index [Integer] The index of the output item this summary text is associated with. + # @param output_index [Integer] + # The index of the output item this summary text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param summary_index [Integer] The index of the summary part within the reasoning summary. + # @param summary_index [Integer] + # The index of the summary part within the reasoning summary. # - # @param text [String] The full text of the completed reasoning summary. + # @param text [String] + # The full text of the completed reasoning summary. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_summary_text.done"] The type of the event. Always `response.reasoning_summary_text.done`. + # @param type [Symbol, :"response.reasoning_summary_text.done"] + # The type of the event. Always `response.reasoning_summary_text.done`. end class ResponseReasoningTextWsDelta < OpenAI::Models::Responses::ResponseReasoningTextDeltaEvent @@ -1235,25 +1320,29 @@ class ResponseReasoningTextWsDelta < OpenAI::Models::Responses::ResponseReasonin optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.reasoning_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningTextWsDelta} - # for more details. - # # Emitted when a delta is added to a reasoning text. # - # @param content_index [Integer] The index of the reasoning content part this delta is associated with. + # @param content_index [Integer] + # The index of the reasoning content part this delta is associated with. # - # @param delta [String] The text delta that was added to the reasoning content. + # @param delta [String] + # The text delta that was added to the reasoning content. # - # @param item_id [String] The ID of the item this reasoning text delta is associated with. + # @param item_id [String] + # The ID of the item this reasoning text delta is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text delta is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text delta is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_text.delta"] The type of the event. Always `response.reasoning_text.delta`. + # @param type [Symbol, :"response.reasoning_text.delta"] + # The type of the event. Always `response.reasoning_text.delta`. end class ResponseReasoningTextWsDone < OpenAI::Models::Responses::ResponseReasoningTextDoneEvent @@ -1265,25 +1354,29 @@ class ResponseReasoningTextWsDone < OpenAI::Models::Responses::ResponseReasoning optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, sequence_number:, text:, stream_id: nil, type: :"response.reasoning_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseReasoningTextWsDone} - # for more details. - # # Emitted when a reasoning text is completed. # - # @param content_index [Integer] The index of the reasoning content part. + # @param content_index [Integer] + # The index of the reasoning content part. # - # @param item_id [String] The ID of the item this reasoning text is associated with. + # @param item_id [String] + # The ID of the item this reasoning text is associated with. # - # @param output_index [Integer] The index of the output item this reasoning text is associated with. + # @param output_index [Integer] + # The index of the output item this reasoning text is associated with. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param text [String] The full text of the completed reasoning content. + # @param text [String] + # The full text of the completed reasoning content. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.reasoning_text.done"] The type of the event. Always `response.reasoning_text.done`. + # @param type [Symbol, :"response.reasoning_text.done"] + # The type of the event. Always `response.reasoning_text.done`. end class ResponseRefusalWsDelta < OpenAI::Models::Responses::ResponseRefusalDeltaEvent @@ -1295,25 +1388,29 @@ class ResponseRefusalWsDelta < OpenAI::Models::Responses::ResponseRefusalDeltaEv optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.refusal.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseRefusalWsDelta} for - # more details. - # # Emitted when there is a partial refusal text. # - # @param content_index [Integer] The index of the content part that the refusal text is added to. + # @param content_index [Integer] + # The index of the content part that the refusal text is added to. # - # @param delta [String] The refusal text that is added. + # @param delta [String] + # The refusal text that is added. # - # @param item_id [String] The ID of the output item that the refusal text is added to. + # @param item_id [String] + # The ID of the output item that the refusal text is added to. # - # @param output_index [Integer] The index of the output item that the refusal text is added to. + # @param output_index [Integer] + # The index of the output item that the refusal text is added to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.refusal.delta"] The type of the event. Always `response.refusal.delta`. + # @param type [Symbol, :"response.refusal.delta"] + # The type of the event. Always `response.refusal.delta`. end class ResponseRefusalWsDone < OpenAI::Models::Responses::ResponseRefusalDoneEvent @@ -1325,25 +1422,29 @@ class ResponseRefusalWsDone < OpenAI::Models::Responses::ResponseRefusalDoneEven optional :stream_id, String # @!method initialize(content_index:, item_id:, output_index:, refusal:, sequence_number:, stream_id: nil, type: :"response.refusal.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseRefusalWsDone} for - # more details. - # # Emitted when refusal text is finalized. # - # @param content_index [Integer] The index of the content part that the refusal text is finalized. + # @param content_index [Integer] + # The index of the content part that the refusal text is finalized. # - # @param item_id [String] The ID of the output item that the refusal text is finalized. + # @param item_id [String] + # The ID of the output item that the refusal text is finalized. # - # @param output_index [Integer] The index of the output item that the refusal text is finalized. + # @param output_index [Integer] + # The index of the output item that the refusal text is finalized. # - # @param refusal [String] The refusal text that is finalized. + # @param refusal [String] + # The refusal text that is finalized. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.refusal.done"] The type of the event. Always `response.refusal.done`. + # @param type [Symbol, :"response.refusal.done"] + # The type of the event. Always `response.refusal.done`. end class ResponseTextWsDelta < OpenAI::Models::Responses::ResponseTextDeltaEvent @@ -1355,27 +1456,32 @@ class ResponseTextWsDelta < OpenAI::Models::Responses::ResponseTextDeltaEvent optional :stream_id, String # @!method initialize(content_index:, delta:, item_id:, logprobs:, output_index:, sequence_number:, stream_id: nil, type: :"response.output_text.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseTextWsDelta} for more - # details. - # # Emitted when there is an additional text delta. # - # @param content_index [Integer] The index of the content part that the text delta was added to. + # @param content_index [Integer] + # The index of the content part that the text delta was added to. # - # @param delta [String] The text delta that was added. + # @param delta [String] + # The text delta that was added. # - # @param item_id [String] The ID of the output item that the text delta was added to. + # @param item_id [String] + # The ID of the output item that the text delta was added to. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text delta was added to. + # @param output_index [Integer] + # The index of the output item that the text delta was added to. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.delta"] The type of the event. Always `response.output_text.delta`. + # @param type [Symbol, :"response.output_text.delta"] + # The type of the event. Always `response.output_text.delta`. end class ResponseTextWsDone < OpenAI::Models::Responses::ResponseTextDoneEvent @@ -1387,27 +1493,32 @@ class ResponseTextWsDone < OpenAI::Models::Responses::ResponseTextDoneEvent optional :stream_id, String # @!method initialize(content_index:, item_id:, logprobs:, output_index:, sequence_number:, text:, stream_id: nil, type: :"response.output_text.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseTextWsDone} for more - # details. - # # Emitted when text content is finalized. # - # @param content_index [Integer] The index of the content part that the text content is finalized. + # @param content_index [Integer] + # The index of the content part that the text content is finalized. # - # @param item_id [String] The ID of the output item that the text content is finalized. + # @param item_id [String] + # The ID of the output item that the text content is finalized. # - # @param logprobs [Array] The log probabilities of the tokens in the delta. + # @param logprobs [Array] + # The log probabilities of the tokens in the delta. # - # @param output_index [Integer] The index of the output item that the text content is finalized. + # @param output_index [Integer] + # The index of the output item that the text content is finalized. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param text [String] The text content that is finalized. + # @param text [String] + # The text content that is finalized. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.done"] The type of the event. Always `response.output_text.done`. + # @param type [Symbol, :"response.output_text.done"] + # The type of the event. Always `response.output_text.done`. end class ResponseWebSearchCallWsCompleted < OpenAI::Models::Responses::ResponseWebSearchCallCompletedEvent @@ -1419,21 +1530,23 @@ class ResponseWebSearchCallWsCompleted < OpenAI::Models::Responses::ResponseWebS optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.web_search_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWebSearchCallWsCompleted} - # for more details. - # # Emitted when a web search call is completed. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.completed"] The type of the event. Always `response.web_search_call.completed`. + # @param type [Symbol, :"response.web_search_call.completed"] + # The type of the event. Always `response.web_search_call.completed`. end class ResponseWebSearchCallInWsProgress < OpenAI::Models::Responses::ResponseWebSearchCallInProgressEvent @@ -1445,21 +1558,23 @@ class ResponseWebSearchCallInWsProgress < OpenAI::Models::Responses::ResponseWeb optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.web_search_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWebSearchCallInWsProgress} - # for more details. - # # Emitted when a web search call is initiated. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.in_progress"] The type of the event. Always `response.web_search_call.in_progress`. + # @param type [Symbol, :"response.web_search_call.in_progress"] + # The type of the event. Always `response.web_search_call.in_progress`. end class ResponseWebSearchCallWsSearching < OpenAI::Models::Responses::ResponseWebSearchCallSearchingEvent @@ -1471,21 +1586,23 @@ class ResponseWebSearchCallWsSearching < OpenAI::Models::Responses::ResponseWebS optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.web_search_call.searching") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWebSearchCallWsSearching} - # for more details. - # # Emitted when a web search call is executing. # - # @param item_id [String] Unique ID for the output item associated with the web search call. + # @param item_id [String] + # Unique ID for the output item associated with the web search call. # - # @param output_index [Integer] The index of the output item that the web search call is associated with. + # @param output_index [Integer] + # The index of the output item that the web search call is associated with. # - # @param sequence_number [Integer] The sequence number of the web search call being processed. + # @param sequence_number [Integer] + # The sequence number of the web search call being processed. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.web_search_call.searching"] The type of the event. Always `response.web_search_call.searching`. + # @param type [Symbol, :"response.web_search_call.searching"] + # The type of the event. Always `response.web_search_call.searching`. end class ResponseImageGenCallWsCompleted < OpenAI::Models::Responses::ResponseImageGenCallCompletedEvent @@ -1497,22 +1614,24 @@ class ResponseImageGenCallWsCompleted < OpenAI::Models::Responses::ResponseImage optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.image_generation_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseImageGenCallWsCompleted} - # for more details. - # # Emitted when an image generation tool call has completed and the final image is # available. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.completed"] The type of the event. Always 'response.image_generation_call.completed'. + # @param type [Symbol, :"response.image_generation_call.completed"] + # The type of the event. Always 'response.image_generation_call.completed'. end class ResponseImageGenCallWsGenerating < OpenAI::Models::Responses::ResponseImageGenCallGeneratingEvent @@ -1524,22 +1643,24 @@ class ResponseImageGenCallWsGenerating < OpenAI::Models::Responses::ResponseImag optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.image_generation_call.generating") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseImageGenCallWsGenerating} - # for more details. - # # Emitted when an image generation tool call is actively generating an image # (intermediate state). # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.generating"] The type of the event. Always 'response.image_generation_call.generating'. + # @param type [Symbol, :"response.image_generation_call.generating"] + # The type of the event. Always 'response.image_generation_call.generating'. end class ResponseImageGenCallInWsProgress < OpenAI::Models::Responses::ResponseImageGenCallInProgressEvent @@ -1551,21 +1672,23 @@ class ResponseImageGenCallInWsProgress < OpenAI::Models::Responses::ResponseImag optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.image_generation_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseImageGenCallInWsProgress} - # for more details. - # # Emitted when an image generation tool call is in progress. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.in_progress"] The type of the event. Always 'response.image_generation_call.in_progress'. + # @param type [Symbol, :"response.image_generation_call.in_progress"] + # The type of the event. Always 'response.image_generation_call.in_progress'. end class ResponseImageGenCallPartialWsImage < OpenAI::Models::Responses::ResponseImageGenCallPartialImageEvent @@ -1577,33 +1700,42 @@ class ResponseImageGenCallPartialWsImage < OpenAI::Models::Responses::ResponseIm optional :stream_id, String # @!method initialize(item_id:, output_index:, partial_image_b64:, partial_image_index:, sequence_number:, background: nil, output_format: nil, quality: nil, size: nil, stream_id: nil, type: :"response.image_generation_call.partial_image") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseImageGenCallPartialWsImage} - # for more details. - # # Emitted when a partial image is available during image generation streaming. # - # @param item_id [String] The unique identifier of the image generation item being processed. + # @param item_id [String] + # The unique identifier of the image generation item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param partial_image_b64 [String] Base64-encoded partial image data, suitable for rendering as an image. + # @param partial_image_b64 [String] + # Base64-encoded partial image data, suitable for rendering as an image. # - # @param partial_image_index [Integer] 0-based index for the partial image (backend is 1-based, but this is 0-based for + # @param partial_image_index [Integer] + # 0-based index for the partial image (backend is 1-based, but this is 0-based for + # the user). # - # @param sequence_number [Integer] The sequence number of the image generation item being processed. + # @param sequence_number [Integer] + # The sequence number of the image generation item being processed. # - # @param background [String] The background setting that was used. + # @param background [String] + # The background setting that was used. # - # @param output_format [String] The output format that was used. + # @param output_format [String] + # The output format that was used. # - # @param quality [String] The image quality that was used. + # @param quality [String] + # The image quality that was used. # - # @param size [String] The image size that was used. + # @param size [String] + # The image size that was used. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.image_generation_call.partial_image"] The type of the event. Always 'response.image_generation_call.partial_image'. + # @param type [Symbol, :"response.image_generation_call.partial_image"] + # The type of the event. Always 'response.image_generation_call.partial_image'. end class ResponseMcpCallArgumentsWsDelta < OpenAI::Models::Responses::ResponseMcpCallArgumentsDeltaEvent @@ -1615,24 +1747,28 @@ class ResponseMcpCallArgumentsWsDelta < OpenAI::Models::Responses::ResponseMcpCa optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_call_arguments.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpCallArgumentsWsDelta} - # for more details. - # # Emitted when there is a delta (partial update) to the arguments of an MCP tool # call. # - # @param delta [String] A JSON string containing the partial update to the arguments for the MCP tool ca + # @param delta [String] + # A JSON string containing the partial update to the arguments for the MCP tool + # call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call_arguments.delta"] The type of the event. Always 'response.mcp_call_arguments.delta'. + # @param type [Symbol, :"response.mcp_call_arguments.delta"] + # The type of the event. Always 'response.mcp_call_arguments.delta'. end class ResponseMcpCallArgumentsWsDone < OpenAI::Models::Responses::ResponseMcpCallArgumentsDoneEvent @@ -1644,23 +1780,26 @@ class ResponseMcpCallArgumentsWsDone < OpenAI::Models::Responses::ResponseMcpCal optional :stream_id, String # @!method initialize(arguments:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_call_arguments.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpCallArgumentsWsDone} - # for more details. - # # Emitted when the arguments for an MCP tool call are finalized. # - # @param arguments [String] A JSON string containing the finalized arguments for the MCP tool call. + # @param arguments [String] + # A JSON string containing the finalized arguments for the MCP tool call. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call_arguments.done"] The type of the event. Always 'response.mcp_call_arguments.done'. + # @param type [Symbol, :"response.mcp_call_arguments.done"] + # The type of the event. Always 'response.mcp_call_arguments.done'. end class ResponseMcpCallWsCompleted < OpenAI::Models::Responses::ResponseMcpCallCompletedEvent @@ -1672,21 +1811,23 @@ class ResponseMcpCallWsCompleted < OpenAI::Models::Responses::ResponseMcpCallCom optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_call.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpCallWsCompleted} - # for more details. - # # Emitted when an MCP tool call has completed successfully. # - # @param item_id [String] The ID of the MCP tool call item that completed. + # @param item_id [String] + # The ID of the MCP tool call item that completed. # - # @param output_index [Integer] The index of the output item that completed. + # @param output_index [Integer] + # The index of the output item that completed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.completed"] The type of the event. Always 'response.mcp_call.completed'. + # @param type [Symbol, :"response.mcp_call.completed"] + # The type of the event. Always 'response.mcp_call.completed'. end class ResponseMcpCallWsFailed < OpenAI::Models::Responses::ResponseMcpCallFailedEvent @@ -1698,21 +1839,23 @@ class ResponseMcpCallWsFailed < OpenAI::Models::Responses::ResponseMcpCallFailed optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_call.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpCallWsFailed} for - # more details. - # # Emitted when an MCP tool call has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.failed"] The type of the event. Always 'response.mcp_call.failed'. + # @param type [Symbol, :"response.mcp_call.failed"] + # The type of the event. Always 'response.mcp_call.failed'. end class ResponseMcpCallInWsProgress < OpenAI::Models::Responses::ResponseMcpCallInProgressEvent @@ -1724,21 +1867,23 @@ class ResponseMcpCallInWsProgress < OpenAI::Models::Responses::ResponseMcpCallIn optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_call.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpCallInWsProgress} - # for more details. - # # Emitted when an MCP tool call is in progress. # - # @param item_id [String] The unique identifier of the MCP tool call item being processed. + # @param item_id [String] + # The unique identifier of the MCP tool call item being processed. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_call.in_progress"] The type of the event. Always 'response.mcp_call.in_progress'. + # @param type [Symbol, :"response.mcp_call.in_progress"] + # The type of the event. Always 'response.mcp_call.in_progress'. end class ResponseMcpListToolsWsCompleted < OpenAI::Models::Responses::ResponseMcpListToolsCompletedEvent @@ -1750,21 +1895,23 @@ class ResponseMcpListToolsWsCompleted < OpenAI::Models::Responses::ResponseMcpLi optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_list_tools.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpListToolsWsCompleted} - # for more details. - # # Emitted when the list of available MCP tools has been successfully retrieved. # - # @param item_id [String] The ID of the MCP tool call item that produced this output. + # @param item_id [String] + # The ID of the MCP tool call item that produced this output. # - # @param output_index [Integer] The index of the output item that was processed. + # @param output_index [Integer] + # The index of the output item that was processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.completed"] The type of the event. Always 'response.mcp_list_tools.completed'. + # @param type [Symbol, :"response.mcp_list_tools.completed"] + # The type of the event. Always 'response.mcp_list_tools.completed'. end class ResponseMcpListToolsWsFailed < OpenAI::Models::Responses::ResponseMcpListToolsFailedEvent @@ -1776,21 +1923,23 @@ class ResponseMcpListToolsWsFailed < OpenAI::Models::Responses::ResponseMcpListT optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_list_tools.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpListToolsWsFailed} - # for more details. - # # Emitted when the attempt to list available MCP tools has failed. # - # @param item_id [String] The ID of the MCP tool call item that failed. + # @param item_id [String] + # The ID of the MCP tool call item that failed. # - # @param output_index [Integer] The index of the output item that failed. + # @param output_index [Integer] + # The index of the output item that failed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.failed"] The type of the event. Always 'response.mcp_list_tools.failed'. + # @param type [Symbol, :"response.mcp_list_tools.failed"] + # The type of the event. Always 'response.mcp_list_tools.failed'. end class ResponseMcpListToolsInWsProgress < OpenAI::Models::Responses::ResponseMcpListToolsInProgressEvent @@ -1802,22 +1951,24 @@ class ResponseMcpListToolsInWsProgress < OpenAI::Models::Responses::ResponseMcpL optional :stream_id, String # @!method initialize(item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.mcp_list_tools.in_progress") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseMcpListToolsInWsProgress} - # for more details. - # # Emitted when the system is in the process of retrieving the list of available # MCP tools. # - # @param item_id [String] The ID of the MCP tool call item that is being processed. + # @param item_id [String] + # The ID of the MCP tool call item that is being processed. # - # @param output_index [Integer] The index of the output item that is being processed. + # @param output_index [Integer] + # The index of the output item that is being processed. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.mcp_list_tools.in_progress"] The type of the event. Always 'response.mcp_list_tools.in_progress'. + # @param type [Symbol, :"response.mcp_list_tools.in_progress"] + # The type of the event. Always 'response.mcp_list_tools.in_progress'. end class ResponseOutputTextAnnotationWsAdded < OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent @@ -1829,27 +1980,32 @@ class ResponseOutputTextAnnotationWsAdded < OpenAI::Models::Responses::ResponseO optional :stream_id, String # @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.output_text.annotation.added") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseOutputTextAnnotationWsAdded} - # for more details. - # # Emitted when an annotation is added to output text content. # - # @param annotation [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text. + # @param annotation [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] + # An annotation that applies to a span of output text. # - # @param annotation_index [Integer] The index of the annotation within the content part. + # @param annotation_index [Integer] + # The index of the annotation within the content part. # - # @param content_index [Integer] The index of the content part within the output item. + # @param content_index [Integer] + # The index of the content part within the output item. # - # @param item_id [String] The unique identifier of the item to which the annotation is being added. + # @param item_id [String] + # The unique identifier of the item to which the annotation is being added. # - # @param output_index [Integer] The index of the output item in the response's output array. + # @param output_index [Integer] + # The index of the output item in the response's output array. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'. + # @param type [Symbol, :"response.output_text.annotation.added"] + # The type of the event. Always 'response.output_text.annotation.added'. end class ResponseWsQueued < OpenAI::Models::Responses::ResponseQueuedEvent @@ -1861,19 +2017,20 @@ class ResponseWsQueued < OpenAI::Models::Responses::ResponseQueuedEvent optional :stream_id, String # @!method initialize(response:, sequence_number:, stream_id: nil, type: :"response.queued") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsQueued} for more - # details. - # # Emitted when a response is queued and waiting to be processed. # - # @param response [OpenAI::Models::Responses::Response] The full response object that is queued. + # @param response [OpenAI::Models::Responses::Response] + # The full response object that is queued. # - # @param sequence_number [Integer] The sequence number for this event. + # @param sequence_number [Integer] + # The sequence number for this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.queued"] The type of the event. Always 'response.queued'. + # @param type [Symbol, :"response.queued"] + # The type of the event. Always 'response.queued'. end class ResponseCustomToolCallInputWsDelta < OpenAI::Models::Responses::ResponseCustomToolCallInputDeltaEvent @@ -1885,23 +2042,26 @@ class ResponseCustomToolCallInputWsDelta < OpenAI::Models::Responses::ResponseCu optional :stream_id, String # @!method initialize(delta:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.custom_tool_call_input.delta") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCustomToolCallInputWsDelta} - # for more details. - # # Event representing a delta (partial update) to the input of a custom tool call. # - # @param delta [String] The incremental input data (delta) for the custom tool call. + # @param delta [String] + # The incremental input data (delta) for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this delta applies to. + # @param output_index [Integer] + # The index of the output this delta applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.custom_tool_call_input.delta"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.delta"] + # The event type identifier. end class ResponseCustomToolCallInputWsDone < OpenAI::Models::Responses::ResponseCustomToolCallInputDoneEvent @@ -1913,23 +2073,26 @@ class ResponseCustomToolCallInputWsDone < OpenAI::Models::Responses::ResponseCus optional :stream_id, String # @!method initialize(input:, item_id:, output_index:, sequence_number:, stream_id: nil, type: :"response.custom_tool_call_input.done") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseCustomToolCallInputWsDone} - # for more details. - # # Event indicating that input for a custom tool call is complete. # - # @param input [String] The complete input data for the custom tool call. + # @param input [String] + # The complete input data for the custom tool call. # - # @param item_id [String] Unique identifier for the API item associated with this event. + # @param item_id [String] + # Unique identifier for the API item associated with this event. # - # @param output_index [Integer] The index of the output this event applies to. + # @param output_index [Integer] + # The index of the output this event applies to. # - # @param sequence_number [Integer] The sequence number of this event. + # @param sequence_number [Integer] + # The sequence number of this event. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :"response.custom_tool_call_input.done"] The event type identifier. + # @param type [Symbol, :"response.custom_tool_call_input.done"] + # The event type identifier. end class ResponseWsError < OpenAI::Internal::Type::BaseModel @@ -1965,21 +2128,23 @@ class ResponseWsError < OpenAI::Internal::Type::BaseModel optional :stream_id, String # @!method initialize(error:, sequence_number: nil, status: nil, stream_id: nil, type: :error) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError} for more - # details. - # # Emitted when an error occurs while processing a Responses WebSocket request. # - # @param error [OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error] Details about the error. + # @param error [OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error] + # Details about the error. # - # @param sequence_number [Integer] The sequence number of an error emitted by the response stream. + # @param sequence_number [Integer] + # The sequence number of an error emitted by the response stream. # - # @param status [Integer] The HTTP status code associated with a WebSocket protocol error. + # @param status [Integer] + # The HTTP status code associated with a WebSocket protocol error. # - # @param stream_id [String] The WebSocket lane that emitted this event. This field is present when the + # @param stream_id [String] + # The WebSocket lane that emitted this event. This field is present when the + # originating `response.create` event supplied a `stream_id`. # - # @param type [Symbol, :error] The type of the event. Always `error`. + # @param type [Symbol, :error] + # The type of the event. Always `error`. # @see OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError#error class Error < OpenAI::Internal::Type::BaseModel @@ -2024,15 +2189,20 @@ class Error < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, param:, type:, headers: nil, misalignment: nil) # Details about the error. # - # @param code [String, nil] The error code that was emitted, if any. + # @param code [String, nil] + # The error code that was emitted, if any. # - # @param message [String] The human-readable error message that was emitted. + # @param message [String] + # The human-readable error message that was emitted. # - # @param param [String, nil] The parameter name that was associated with the error, if any. + # @param param [String, nil] + # The parameter name that was associated with the error, if any. # - # @param type [String] The error type that was emitted. + # @param type [String] + # The error type that was emitted. # - # @param headers [Hash{Symbol=>String}] The response headers that were emitted with the error, if any. + # @param headers [Hash{Symbol=>String}] + # The response headers that were emitted with the error, if any. # # @param misalignment [OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment] @@ -2063,11 +2233,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel ) # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -2134,7 +2307,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end diff --git a/lib/openai/models/responses/skill_reference.rb b/lib/openai/models/responses/skill_reference.rb index f87d0d465..018c0af79 100644 --- a/lib/openai/models/responses/skill_reference.rb +++ b/lib/openai/models/responses/skill_reference.rb @@ -23,11 +23,14 @@ class SkillReference < OpenAI::Internal::Type::BaseModel optional :version, String # @!method initialize(skill_id:, version: nil, type: :skill_reference) - # @param skill_id [String] The ID of the referenced skill. + # @param skill_id [String] + # The ID of the referenced skill. # - # @param version [String] Optional skill version. Use a positive integer or 'latest'. Omit for default. + # @param version [String] + # Optional skill version. Use a positive integer or 'latest'. Omit for default. # - # @param type [Symbol, :skill_reference] References a skill created with the /v1/skills endpoint. + # @param type [Symbol, :skill_reference] + # References a skill created with the /v1/skills endpoint. end end end diff --git a/lib/openai/models/responses/tool.rb b/lib/openai/models/responses/tool.rb index 887ae884b..f0bf2d96a 100644 --- a/lib/openai/models/responses/tool.rb +++ b/lib/openai/models/responses/tool.rb @@ -9,22 +9,22 @@ module Tool discriminator :type - # Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + # Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling). variant :function, -> { OpenAI::Responses::FunctionTool } variant -> { OpenAI::StructuredOutput::JsonSchemaConverter } - # A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). variant :file_search, -> { OpenAI::Responses::FileSearchTool } - # A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). variant :computer, -> { OpenAI::Responses::ComputerTool } - # A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). variant :computer_use_preview, -> { OpenAI::Responses::ComputerUsePreviewTool } # Give the model access to additional tools via remote Model Context Protocol - # (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). variant :mcp, -> { OpenAI::Responses::Tool::Mcp } # A tool that runs Python code to help generate a response to a prompt. @@ -41,7 +41,7 @@ module Tool # A tool that allows the model to execute shell commands. variant :shell, -> { OpenAI::Responses::FunctionShellTool } - # A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # A custom tool that processes input using a specified format. Learn more about [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) variant :custom, -> { OpenAI::Responses::CustomTool } # Groups function/custom tools under a shared namespace. @@ -54,10 +54,10 @@ module Tool variant :apply_patch, -> { OpenAI::Responses::ApplyPatchTool } # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). variant -> { OpenAI::Responses::WebSearchTool } - # This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). variant -> { OpenAI::Responses::WebSearchPreviewTool } class Mcp < OpenAI::Internal::Type::BaseModel @@ -101,7 +101,7 @@ class Mcp < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -157,37 +157,64 @@ class Mcp < OpenAI::Internal::Type::BaseModel optional :tunnel_id, String # @!method initialize(server_label:, allowed_callers: nil, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::Mcp} for more details. - # # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - # @param server_label [String] A label for this MCP server, used to identify it in tool calls. + # @param server_label [String] + # A label for this MCP server, used to identify it in tool calls. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param allowed_tools [Array, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object. + # @param allowed_tools [Array, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter, nil] + # List of allowed tool names or a filter object. # - # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either + # @param authorization [String] + # An OAuth access token that can be used with a remote MCP server, either with a + # custom MCP server URL or a service connector. Your application must handle the + # OAuth authorization flow and provide the token here. # - # @param connector_id [Symbol, OpenAI::Models::Responses::Tool::Mcp::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of + # @param connector_id [Symbol, OpenAI::Models::Responses::Tool::Mcp::ConnectorID] + # Identifier for service connectors, like those available in ChatGPT. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about + # service connectors + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # - # @param defer_loading [Boolean] Whether this MCP tool is deferred and discovered via tool search. + # Currently supported `connector_id` values are: # - # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication + # - Dropbox: `connector_dropbox` + # - Gmail: `connector_gmail` + # - Google Calendar: `connector_googlecalendar` + # - Google Drive: `connector_googledrive` + # - Microsoft Teams: `connector_microsoftteams` + # - Outlook Calendar: `connector_outlookcalendar` + # - Outlook Email: `connector_outlookemail` + # - SharePoint: `connector_sharepoint` # - # @param require_approval [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval. + # @param defer_loading [Boolean] + # Whether this MCP tool is deferred and discovered via tool search. # - # @param server_description [String] Optional description of the MCP server, used to provide more context. + # @param headers [Hash{Symbol=>String}, nil] + # Optional HTTP headers to send to the MCP server. Use for authentication or other + # purposes. # - # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or + # @param require_approval [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalSetting, nil] + # Specify which of the MCP server's tools require approval. # - # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # @param server_description [String] + # Optional description of the MCP server, used to provide more context. # - # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`. - + # @param server_url [String] + # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id` + # must be provided. + # + # @param tunnel_id [String] + # The Secure MCP Tunnel ID to use instead of a direct server URL. One of + # `server_url`, `connector_id`, or `tunnel_id` must be provided. + # + # @param type [Symbol, :mcp] + # The type of the MCP tool. Always `mcp`. module AllowedCaller extend OpenAI::Internal::Type::Enum @@ -227,15 +254,16 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter} for more - # details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @!method self.variants @@ -248,7 +276,7 @@ class McpToolFilter < OpenAI::Internal::Type::BaseModel # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -308,16 +336,14 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel optional :never, -> { OpenAI::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never } # @!method initialize(always: nil, never: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter} - # for more details. - # # Specify which of the MCP server's tools require approval. Can be `always`, # `never`, or a filter object associated with tools that require approval. # - # @param always [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed. + # @param always [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always] + # A filter object to specify which tools are allowed. # - # @param never [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed. + # @param never [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never] + # A filter object to specify which tools are allowed. # @see OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter#always class Always < OpenAI::Internal::Type::BaseModel @@ -337,15 +363,16 @@ class Always < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end # @see OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter#never @@ -366,15 +393,16 @@ class Never < OpenAI::Internal::Type::BaseModel optional :tool_names, OpenAI::Internal::Type::ArrayOf[String] # @!method initialize(read_only: nil, tool_names: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never} - # for more details. - # # A filter object to specify which tools are allowed. # - # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an + # @param read_only [Boolean] + # Indicates whether or not a tool modifies data or is read-only. If an MCP server + # is + # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + # it will match this filter. # - # @param tool_names [Array] List of allowed tool names. + # @param tool_names [Array] + # List of allowed tool names. end end @@ -424,16 +452,18 @@ class CodeInterpreter < OpenAI::Internal::Type::BaseModel ) # @!method initialize(container:, allowed_callers: nil, type: :code_interpreter) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::CodeInterpreter} for more details. - # # A tool that runs Python code to help generate a response to a prompt. # - # @param container [String, OpenAI::Models::Responses::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto] The code interpreter container. Can be a container ID or an object that + # @param container [String, OpenAI::Models::Responses::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto] + # The code interpreter container. Can be a container ID or an object that + # specifies uploaded file IDs to make available to your code, along with an + # optional `memory_limit` setting. # - # @param allowed_callers [Array, nil] The tool invocation context(s). + # @param allowed_callers [Array, nil] + # The tool invocation context(s). # - # @param type [Symbol, :code_interpreter] The type of the code interpreter tool. Always `code_interpreter`. + # @param type [Symbol, :code_interpreter] + # The type of the code interpreter tool. Always `code_interpreter`. # The code interpreter container. Can be a container ID or an object that # specifies uploaded file IDs to make available to your code, along with an @@ -489,13 +519,17 @@ class CodeInterpreterToolAuto < OpenAI::Internal::Type::BaseModel # Configuration for a code interpreter container. Optionally specify the IDs of # the files to run the code on. # - # @param file_ids [Array] An optional list of uploaded files to make available to your code. + # @param file_ids [Array] + # An optional list of uploaded files to make available to your code. # - # @param memory_limit [Symbol, OpenAI::Models::Responses::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit, nil] The memory limit for the code interpreter container. + # @param memory_limit [Symbol, OpenAI::Models::Responses::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit, nil] + # The memory limit for the code interpreter container. # - # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param type [Symbol, :auto] Always `auto`. + # @param type [Symbol, :auto] + # Always `auto`. # The memory limit for the code interpreter container. # @@ -552,7 +586,8 @@ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel required :type, const: :programmatic_tool_calling # @!method initialize(type: :programmatic_tool_calling) - # @param type [Symbol, :programmatic_tool_calling] The type of the tool. Always `programmatic_tool_calling`. + # @param type [Symbol, :programmatic_tool_calling] + # The type of the tool. Always `programmatic_tool_calling`. end class ImageGeneration < OpenAI::Internal::Type::BaseModel @@ -667,34 +702,75 @@ class ImageGeneration < OpenAI::Internal::Type::BaseModel optional :size, union: -> { OpenAI::Responses::Tool::ImageGeneration::Size } # @!method initialize(action: nil, background: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, type: :image_generation) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::ImageGeneration} for more details. - # # A tool that generates images using the GPT image models. # - # @param action [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Action] Whether to generate a new image or edit an existing image. Default: `auto`. - # - # @param background [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Background] Allows to set transparency for the background of the generated image(s). Must - # - # @param input_fidelity [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es - # - # @param input_image_mask [OpenAI::Models::Responses::Tool::ImageGeneration::InputImageMask] Optional mask for inpainting. Contains `image_url` - # - # @param model [String, Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Model] The image generation model to use. One of `gpt-image-1`, - # - # @param moderation [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Moderation] Moderation level for the generated image. Default: `auto`. - # - # @param output_compression [Integer] Compression level for the output image. Default: 100. - # - # @param output_format [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::OutputFormat] The output format of the generated image. One of `png`, `webp`, or - # - # @param partial_images [Integer] Number of partial images to generate in streaming mode, from 0 (default value) t - # - # @param quality [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Quality] The quality of the generated image. The GPT image models support `low`, - # - # @param size [String, Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Size] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param type [Symbol, :image_generation] The type of the image generation tool. Always `image_generation`. + # @param action [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Action] + # Whether to generate a new image or edit an existing image. Default: `auto`. + # + # @param background [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Background] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param input_fidelity [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::InputFidelity, nil] + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. This parameter is only supported + # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for + # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + # + # @param input_image_mask [OpenAI::Models::Responses::Tool::ImageGeneration::InputImageMask] + # Optional mask for inpainting. Contains `image_url` (string, optional) and + # `file_id` (string, optional). + # + # @param model [String, Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Model] + # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, + # `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or + # `chatgpt-image-latest`. Default: `gpt-image-1`. + # + # @param moderation [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Moderation] + # Moderation level for the generated image. Default: `auto`. + # + # @param output_compression [Integer] + # Compression level for the output image. Default: 100. + # + # @param output_format [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::OutputFormat] + # The output format of the generated image. One of `png`, `webp`, or `jpeg`. + # Default: `png`. + # + # @param partial_images [Integer] + # Number of partial images to generate in streaming mode, from 0 (default value) + # to 3. + # + # @param quality [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Quality] + # The quality of the generated image. The GPT image models support `low`, + # `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, + # including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default: + # `auto`. + # + # @param size [String, Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Size] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param type [Symbol, :image_generation] + # The type of the image generation tool. Always `image_generation`. # Whether to generate a new image or edit an existing image. Default: `auto`. # @@ -763,16 +839,14 @@ class InputImageMask < OpenAI::Internal::Type::BaseModel optional :image_url, String # @!method initialize(file_id: nil, image_url: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::Tool::ImageGeneration::InputImageMask} for more - # details. - # # Optional mask for inpainting. Contains `image_url` (string, optional) and # `file_id` (string, optional). # - # @param file_id [String] File ID for the mask image. + # @param file_id [String] + # File ID for the mask image. # - # @param image_url [String] Base64-encoded mask image. + # @param image_url [String] + # Base64-encoded mask image. end # The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`, @@ -937,7 +1011,8 @@ class LocalShell < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :local_shell) # A tool that allows the model to execute shell commands in a local environment. # - # @param type [Symbol, :local_shell] The type of the local shell tool. Always `local_shell`. + # @param type [Symbol, :local_shell] + # The type of the local shell tool. Always `local_shell`. end # @!method self.variants diff --git a/lib/openai/models/responses/tool_choice_allowed.rb b/lib/openai/models/responses/tool_choice_allowed.rb index 27080a0ea..16e989f02 100644 --- a/lib/openai/models/responses/tool_choice_allowed.rb +++ b/lib/openai/models/responses/tool_choice_allowed.rb @@ -41,16 +41,31 @@ class ToolChoiceAllowed < OpenAI::Internal::Type::BaseModel required :type, const: :allowed_tools # @!method initialize(mode:, tools:, type: :allowed_tools) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ToolChoiceAllowed} for more details. - # # Constrains the tools available to the model to a pre-defined set. # - # @param mode [Symbol, OpenAI::Models::Responses::ToolChoiceAllowed::Mode] Constrains the tools available to the model to a pre-defined set. + # @param mode [Symbol, OpenAI::Models::Responses::ToolChoiceAllowed::Mode] + # Constrains the tools available to the model to a pre-defined set. + # + # `auto` allows the model to pick from among the allowed tools and generate a + # message. + # + # `required` requires the model to call one or more of the allowed tools. + # + # @param tools [ArrayObject}>] + # A list of tool definitions that the model should be allowed to call. + # + # For the Responses API, the list of tool definitions might look like: # - # @param tools [ArrayObject}>] A list of tool definitions that the model should be allowed to call. + # ```json + # [ + # { "type": "function", "name": "get_weather" }, + # { "type": "mcp", "server_label": "deepwiki" }, + # { "type": "image_generation" } + # ] + # ``` # - # @param type [Symbol, :allowed_tools] Allowed tool configuration type. Always `allowed_tools`. + # @param type [Symbol, :allowed_tools] + # Allowed tool configuration type. Always `allowed_tools`. # Constrains the tools available to the model to a pre-defined set. # diff --git a/lib/openai/models/responses/tool_choice_apply_patch.rb b/lib/openai/models/responses/tool_choice_apply_patch.rb index bab518dfc..5aa650d92 100644 --- a/lib/openai/models/responses/tool_choice_apply_patch.rb +++ b/lib/openai/models/responses/tool_choice_apply_patch.rb @@ -13,7 +13,8 @@ class ToolChoiceApplyPatch < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :apply_patch) # Forces the model to call the apply_patch tool when executing a tool call. # - # @param type [Symbol, :apply_patch] The tool to call. Always `apply_patch`. + # @param type [Symbol, :apply_patch] + # The tool to call. Always `apply_patch`. end end end diff --git a/lib/openai/models/responses/tool_choice_custom.rb b/lib/openai/models/responses/tool_choice_custom.rb index 310413ed9..d1b23d1ed 100644 --- a/lib/openai/models/responses/tool_choice_custom.rb +++ b/lib/openai/models/responses/tool_choice_custom.rb @@ -19,9 +19,11 @@ class ToolChoiceCustom < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, type: :custom) # Use this option to force the model to call a specific custom tool. # - # @param name [String] The name of the custom tool to call. + # @param name [String] + # The name of the custom tool to call. # - # @param type [Symbol, :custom] For custom tool calling, the type is always `custom`. + # @param type [Symbol, :custom] + # For custom tool calling, the type is always `custom`. end end end diff --git a/lib/openai/models/responses/tool_choice_function.rb b/lib/openai/models/responses/tool_choice_function.rb index 67f007502..e71e5dd80 100644 --- a/lib/openai/models/responses/tool_choice_function.rb +++ b/lib/openai/models/responses/tool_choice_function.rb @@ -19,9 +19,11 @@ class ToolChoiceFunction < OpenAI::Internal::Type::BaseModel # @!method initialize(name:, type: :function) # Use this option to force the model to call a specific function. # - # @param name [String] The name of the function to call. + # @param name [String] + # The name of the function to call. # - # @param type [Symbol, :function] For function calling, the type is always `function`. + # @param type [Symbol, :function] + # For function calling, the type is always `function`. end end end diff --git a/lib/openai/models/responses/tool_choice_mcp.rb b/lib/openai/models/responses/tool_choice_mcp.rb index 1ced8a012..2d1608969 100644 --- a/lib/openai/models/responses/tool_choice_mcp.rb +++ b/lib/openai/models/responses/tool_choice_mcp.rb @@ -23,17 +23,17 @@ class ToolChoiceMcp < OpenAI::Internal::Type::BaseModel optional :name, String, nil?: true # @!method initialize(server_label:, name: nil, type: :mcp) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ToolChoiceMcp} for more details. - # # Use this option to force the model to call a specific tool on a remote MCP # server. # - # @param server_label [String] The label of the MCP server to use. + # @param server_label [String] + # The label of the MCP server to use. # - # @param name [String, nil] The name of the tool to call on the server. + # @param name [String, nil] + # The name of the tool to call on the server. # - # @param type [Symbol, :mcp] For MCP tools, the type is always `mcp`. + # @param type [Symbol, :mcp] + # For MCP tools, the type is always `mcp`. end end end diff --git a/lib/openai/models/responses/tool_choice_shell.rb b/lib/openai/models/responses/tool_choice_shell.rb index 20aa36454..bd14ad633 100644 --- a/lib/openai/models/responses/tool_choice_shell.rb +++ b/lib/openai/models/responses/tool_choice_shell.rb @@ -13,7 +13,8 @@ class ToolChoiceShell < OpenAI::Internal::Type::BaseModel # @!method initialize(type: :shell) # Forces the model to call the shell tool when a tool call is required. # - # @param type [Symbol, :shell] The tool to call. Always `shell`. + # @param type [Symbol, :shell] + # The tool to call. Always `shell`. end end end diff --git a/lib/openai/models/responses/tool_choice_types.rb b/lib/openai/models/responses/tool_choice_types.rb index 882a3d114..b85da8ca1 100644 --- a/lib/openai/models/responses/tool_choice_types.rb +++ b/lib/openai/models/responses/tool_choice_types.rb @@ -6,7 +6,7 @@ module Responses class ToolChoiceTypes < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -22,16 +22,25 @@ class ToolChoiceTypes < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Responses::ToolChoiceTypes::Type } # @!method initialize(type:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ToolChoiceTypes} for more details. - # # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). + # + # @param type [Symbol, OpenAI::Models::Responses::ToolChoiceTypes::Type] + # The type of hosted tool the model should to use. Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # + # Allowed values are: # - # @param type [Symbol, OpenAI::Models::Responses::ToolChoiceTypes::Type] The type of hosted tool the model should to use. Learn more about + # - `file_search` + # - `web_search_preview` + # - `computer` + # - `computer_use_preview` + # - `computer_use` + # - `code_interpreter` + # - `image_generation` # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # diff --git a/lib/openai/models/responses/tool_search_tool.rb b/lib/openai/models/responses/tool_search_tool.rb index d9b4a43f6..f67d390e7 100644 --- a/lib/openai/models/responses/tool_search_tool.rb +++ b/lib/openai/models/responses/tool_search_tool.rb @@ -31,13 +31,17 @@ class ToolSearchTool < OpenAI::Internal::Type::BaseModel # @!method initialize(description: nil, execution: nil, parameters: nil, type: :tool_search) # Hosted or BYOT tool search configuration for deferred tools. # - # @param description [String, nil] Description shown to the model for a client-executed tool search tool. + # @param description [String, nil] + # Description shown to the model for a client-executed tool search tool. # - # @param execution [Symbol, OpenAI::Models::Responses::ToolSearchTool::Execution] Whether tool search is executed by the server or by the client. + # @param execution [Symbol, OpenAI::Models::Responses::ToolSearchTool::Execution] + # Whether tool search is executed by the server or by the client. # - # @param parameters [Object, nil] Parameter schema for a client-executed tool search tool. + # @param parameters [Object, nil] + # Parameter schema for a client-executed tool search tool. # - # @param type [Symbol, :tool_search] The type of the tool. Always `tool_search`. + # @param type [Symbol, :tool_search] + # The type of the tool. Always `tool_search`. # Whether tool search is executed by the server or by the client. # diff --git a/lib/openai/models/responses/web_search_preview_tool.rb b/lib/openai/models/responses/web_search_preview_tool.rb index 6383c48a2..0af6d0585 100644 --- a/lib/openai/models/responses/web_search_preview_tool.rb +++ b/lib/openai/models/responses/web_search_preview_tool.rb @@ -33,20 +33,22 @@ class WebSearchPreviewTool < OpenAI::Internal::Type::BaseModel optional :user_location, -> { OpenAI::Responses::WebSearchPreviewTool::UserLocation }, nil?: true # @!method initialize(type:, search_content_types: nil, search_context_size: nil, user_location: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::WebSearchPreviewTool} for more details. - # # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param type [Symbol, OpenAI::Models::Responses::WebSearchPreviewTool::Type] The type of the web search tool. One of `web_search_preview` or `web_search_prev + # @param type [Symbol, OpenAI::Models::Responses::WebSearchPreviewTool::Type] + # The type of the web search tool. One of `web_search_preview` or + # `web_search_preview_2025_03_11`. # # @param search_content_types [Array] # - # @param search_context_size [Symbol, OpenAI::Models::Responses::WebSearchPreviewTool::SearchContextSize] High level guidance for the amount of context window space to use for the search + # @param search_context_size [Symbol, OpenAI::Models::Responses::WebSearchPreviewTool::SearchContextSize] + # High level guidance for the amount of context window space to use for the + # search. One of `low`, `medium`, or `high`. `medium` is the default. # - # @param user_location [OpenAI::Models::Responses::WebSearchPreviewTool::UserLocation, nil] The user's location. + # @param user_location [OpenAI::Models::Responses::WebSearchPreviewTool::UserLocation, nil] + # The user's location. # The type of the web search tool. One of `web_search_preview` or # `web_search_preview_2025_03_11`. @@ -122,21 +124,24 @@ class UserLocation < OpenAI::Internal::Type::BaseModel optional :timezone, String, nil?: true # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::WebSearchPreviewTool::UserLocation} for more - # details. - # # The user's location. # - # @param city [String, nil] Free text input for the city of the user, e.g. `San Francisco`. + # @param city [String, nil] + # Free text input for the city of the user, e.g. `San Francisco`. # - # @param country [String, nil] The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of t + # @param country [String, nil] + # The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of + # the user, e.g. `US`. # - # @param region [String, nil] Free text input for the region of the user, e.g. `California`. + # @param region [String, nil] + # Free text input for the region of the user, e.g. `California`. # - # @param timezone [String, nil] The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user + # @param timezone [String, nil] + # The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the + # user, e.g. `America/Los_Angeles`. # - # @param type [Symbol, :approximate] The type of location approximation. Always `approximate`. + # @param type [Symbol, :approximate] + # The type of location approximation. Always `approximate`. end end end diff --git a/lib/openai/models/responses/web_search_tool.rb b/lib/openai/models/responses/web_search_tool.rb index c2ac4fe18..fe891cb7c 100644 --- a/lib/openai/models/responses/web_search_tool.rb +++ b/lib/openai/models/responses/web_search_tool.rb @@ -38,21 +38,26 @@ class WebSearchTool < OpenAI::Internal::Type::BaseModel optional :user_location, -> { OpenAI::Responses::WebSearchTool::UserLocation }, nil?: true # @!method initialize(type:, external_web_access: nil, filters: nil, search_context_size: nil, user_location: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::WebSearchTool} for more details. - # # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # - # @param type [Symbol, OpenAI::Models::Responses::WebSearchTool::Type] The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + # @param type [Symbol, OpenAI::Models::Responses::WebSearchTool::Type] + # The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. # - # @param external_web_access [Boolean] Allow live internet access for web search. Defaults to true when omitted. When f + # @param external_web_access [Boolean] + # Allow live internet access for web search. Defaults to true when omitted. When + # false, the web search tool runs in offline/cache-only mode and will not fetch + # new external content. # - # @param filters [OpenAI::Models::Responses::WebSearchTool::Filters, nil] Filters for the search. + # @param filters [OpenAI::Models::Responses::WebSearchTool::Filters, nil] + # Filters for the search. # - # @param search_context_size [Symbol, OpenAI::Models::Responses::WebSearchTool::SearchContextSize] High level guidance for the amount of context window space to use for the search + # @param search_context_size [Symbol, OpenAI::Models::Responses::WebSearchTool::SearchContextSize] + # High level guidance for the amount of context window space to use for the + # search. One of `low`, `medium`, or `high`. `medium` is the default. # - # @param user_location [OpenAI::Models::Responses::WebSearchTool::UserLocation, nil] The approximate location of the user. + # @param user_location [OpenAI::Models::Responses::WebSearchTool::UserLocation, nil] + # The approximate location of the user. # The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. # @@ -79,12 +84,13 @@ class Filters < OpenAI::Internal::Type::BaseModel optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(allowed_domains: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::WebSearchTool::Filters} for more details. - # # Filters for the search. # - # @param allowed_domains [Array, nil] Allowed domains for the search. If not provided, all domains are allowed. + # @param allowed_domains [Array, nil] + # Allowed domains for the search. If not provided, all domains are allowed. + # Subdomains of the provided domains are allowed as well. + # + # Example: `["pubmed.ncbi.nlm.nih.gov"]` end # High level guidance for the amount of context window space to use for the @@ -137,20 +143,24 @@ class UserLocation < OpenAI::Internal::Type::BaseModel optional :type, enum: -> { OpenAI::Responses::WebSearchTool::UserLocation::Type } # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::WebSearchTool::UserLocation} for more details. - # # The approximate location of the user. # - # @param city [String, nil] Free text input for the city of the user, e.g. `San Francisco`. + # @param city [String, nil] + # Free text input for the city of the user, e.g. `San Francisco`. # - # @param country [String, nil] The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of t + # @param country [String, nil] + # The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of + # the user, e.g. `US`. # - # @param region [String, nil] Free text input for the region of the user, e.g. `California`. + # @param region [String, nil] + # Free text input for the region of the user, e.g. `California`. # - # @param timezone [String, nil] The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user + # @param timezone [String, nil] + # The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the + # user, e.g. `America/Los_Angeles`. # - # @param type [Symbol, OpenAI::Models::Responses::WebSearchTool::UserLocation::Type] The type of location approximation. Always `approximate`. + # @param type [Symbol, OpenAI::Models::Responses::WebSearchTool::UserLocation::Type] + # The type of location approximation. Always `approximate`. # The type of location approximation. Always `approximate`. # diff --git a/lib/openai/models/safety/alert_retrieve_params.rb b/lib/openai/models/safety/alert_retrieve_params.rb index e979fe375..2b094e236 100644 --- a/lib/openai/models/safety/alert_retrieve_params.rb +++ b/lib/openai/models/safety/alert_retrieve_params.rb @@ -15,7 +15,8 @@ class AlertRetrieveParams < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:, request_options: {}) - # @param id [String] Project safety alert ID + # @param id [String] + # Project safety alert ID # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/safety/safety_alert.rb b/lib/openai/models/safety/safety_alert.rb index 31b11c0a4..09f96400a 100644 --- a/lib/openai/models/safety/safety_alert.rb +++ b/lib/openai/models/safety/safety_alert.rb @@ -55,9 +55,6 @@ class SafetyAlert < OpenAI::Internal::Type::BaseModel required :response_id, String # @!method initialize(id:, created_at:, error_type:, model:, reason:, request_id:, request_paused:, response_id:, object: :"safety.alert") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Safety::SafetyAlert} for more details. - # # @param id [String] # # @param created_at [Integer] @@ -66,11 +63,15 @@ class SafetyAlert < OpenAI::Internal::Type::BaseModel # # @param model [String] # - # @param reason [String, nil] A customer-safe description derived from error_type, or null for zero data reten + # @param reason [String, nil] + # A customer-safe description derived from error_type, or null for zero data + # retention requests. # # @param request_id [String] # - # @param request_paused [Boolean] Whether block registration succeeded for this request. This does not confirm tha + # @param request_paused [Boolean] + # Whether block registration succeeded for this request. This does not confirm + # that response execution stopped. # # @param response_id [String] # diff --git a/lib/openai/models/skill.rb b/lib/openai/models/skill.rb index fdf0a1575..421bc5bf3 100644 --- a/lib/openai/models/skill.rb +++ b/lib/openai/models/skill.rb @@ -47,19 +47,26 @@ class Skill < OpenAI::Internal::Type::BaseModel required :object, const: :skill # @!method initialize(id:, created_at:, default_version:, description:, latest_version:, name:, object: :skill) - # @param id [String] Unique identifier for the skill. + # @param id [String] + # Unique identifier for the skill. # - # @param created_at [Integer] Unix timestamp (seconds) for when the skill was created. + # @param created_at [Integer] + # Unix timestamp (seconds) for when the skill was created. # - # @param default_version [String] Default version for the skill. + # @param default_version [String] + # Default version for the skill. # - # @param description [String] Description of the skill. + # @param description [String] + # Description of the skill. # - # @param latest_version [String] Latest version for the skill. + # @param latest_version [String] + # Latest version for the skill. # - # @param name [String] Name of the skill. + # @param name [String] + # Name of the skill. # - # @param object [Symbol, :skill] The object type, which is `skill`. + # @param object [Symbol, :skill] + # The object type, which is `skill`. end end end diff --git a/lib/openai/models/skill_create_params.rb b/lib/openai/models/skill_create_params.rb index f95c93908..41795efbd 100644 --- a/lib/openai/models/skill_create_params.rb +++ b/lib/openai/models/skill_create_params.rb @@ -18,7 +18,12 @@ class SkillCreateParams < OpenAI::Internal::Type::BaseModel optional :files, union: -> { OpenAI::SkillCreateParams::Files } # @!method initialize(files: nil, request_options: {}) - # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] Skill files to upload (directory upload) or a single zip file. + # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] + # Skill files to upload (directory upload) or a single zip file. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/skill_list.rb b/lib/openai/models/skill_list.rb index ad0acb088..ac552a79e 100644 --- a/lib/openai/models/skill_list.rb +++ b/lib/openai/models/skill_list.rb @@ -34,15 +34,20 @@ class SkillList < OpenAI::Internal::Type::BaseModel required :object, const: :list # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) - # @param data [Array] A list of items + # @param data [Array] + # A list of items # - # @param first_id [String, nil] The ID of the first item in the list. + # @param first_id [String, nil] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String, nil] The ID of the last item in the list. + # @param last_id [String, nil] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. end end end diff --git a/lib/openai/models/skill_list_params.rb b/lib/openai/models/skill_list_params.rb index de87e3c3b..c6fc5ddf1 100644 --- a/lib/openai/models/skill_list_params.rb +++ b/lib/openai/models/skill_list_params.rb @@ -27,14 +27,15 @@ class SkillListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::SkillListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::SkillListParams} for more details. + # @param after [String] + # Identifier for the last item from the previous pagination request # - # @param after [String] Identifier for the last item from the previous pagination request + # @param limit [Integer] + # Number of items to retrieve # - # @param limit [Integer] Number of items to retrieve - # - # @param order [Symbol, OpenAI::Models::SkillListParams::Order] Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # @param order [Symbol, OpenAI::Models::SkillListParams::Order] + # Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/skill_update_params.rb b/lib/openai/models/skill_update_params.rb index ba92845af..fa34ccd0d 100644 --- a/lib/openai/models/skill_update_params.rb +++ b/lib/openai/models/skill_update_params.rb @@ -21,7 +21,8 @@ class SkillUpdateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, default_version:, request_options: {}) # @param skill_id [String] # - # @param default_version [String] The skill version number to set as default. + # @param default_version [String] + # The skill version number to set as default. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/skills/deleted_skill_version.rb b/lib/openai/models/skills/deleted_skill_version.rb index 0c56baa5e..366320bf8 100644 --- a/lib/openai/models/skills/deleted_skill_version.rb +++ b/lib/openai/models/skills/deleted_skill_version.rb @@ -31,7 +31,8 @@ class DeletedSkillVersion < OpenAI::Internal::Type::BaseModel # # @param deleted [Boolean] # - # @param version [String] The deleted skill version. + # @param version [String] + # The deleted skill version. # # @param object [Symbol, :"skill.version.deleted"] end diff --git a/lib/openai/models/skills/skill_version.rb b/lib/openai/models/skills/skill_version.rb index 54cc9e8f9..562d69a12 100644 --- a/lib/openai/models/skills/skill_version.rb +++ b/lib/openai/models/skills/skill_version.rb @@ -48,19 +48,26 @@ class SkillVersion < OpenAI::Internal::Type::BaseModel required :version, String # @!method initialize(id:, created_at:, description:, name:, skill_id:, version:, object: :"skill.version") - # @param id [String] Unique identifier for the skill version. + # @param id [String] + # Unique identifier for the skill version. # - # @param created_at [Integer] Unix timestamp (seconds) for when the version was created. + # @param created_at [Integer] + # Unix timestamp (seconds) for when the version was created. # - # @param description [String] Description of the skill version. + # @param description [String] + # Description of the skill version. # - # @param name [String] Name of the skill version. + # @param name [String] + # Name of the skill version. # - # @param skill_id [String] Identifier of the skill for this version. + # @param skill_id [String] + # Identifier of the skill for this version. # - # @param version [String] Version number for this skill. + # @param version [String] + # Version number for this skill. # - # @param object [Symbol, :"skill.version"] The object type, which is `skill.version`. + # @param object [Symbol, :"skill.version"] + # The object type, which is `skill.version`. end end diff --git a/lib/openai/models/skills/skill_version_list.rb b/lib/openai/models/skills/skill_version_list.rb index 55cfaa734..bb6e67dad 100644 --- a/lib/openai/models/skills/skill_version_list.rb +++ b/lib/openai/models/skills/skill_version_list.rb @@ -35,15 +35,20 @@ class SkillVersionList < OpenAI::Internal::Type::BaseModel required :object, const: :list # @!method initialize(data:, first_id:, has_more:, last_id:, object: :list) - # @param data [Array] A list of items + # @param data [Array] + # A list of items # - # @param first_id [String, nil] The ID of the first item in the list. + # @param first_id [String, nil] + # The ID of the first item in the list. # - # @param has_more [Boolean] Whether there are more items available. + # @param has_more [Boolean] + # Whether there are more items available. # - # @param last_id [String, nil] The ID of the last item in the list. + # @param last_id [String, nil] + # The ID of the last item in the list. # - # @param object [Symbol, :list] The type of object returned, must be `list`. + # @param object [Symbol, :list] + # The type of object returned, must be `list`. end end diff --git a/lib/openai/models/skills/version_create_params.rb b/lib/openai/models/skills/version_create_params.rb index eda784996..789a2e346 100644 --- a/lib/openai/models/skills/version_create_params.rb +++ b/lib/openai/models/skills/version_create_params.rb @@ -32,9 +32,15 @@ class VersionCreateParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, default: nil, files: nil, request_options: {}) # @param skill_id [String] # - # @param default [Boolean] Whether to set this version as the default. + # @param default [Boolean] + # Whether to set this version as the default. # - # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] Skill files to upload (directory upload) or a single zip file. + # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] + # Skill files to upload (directory upload) or a single zip file. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/skills/version_delete_params.rb b/lib/openai/models/skills/version_delete_params.rb index f503cf473..bc5bc2597 100644 --- a/lib/openai/models/skills/version_delete_params.rb +++ b/lib/openai/models/skills/version_delete_params.rb @@ -22,7 +22,8 @@ class VersionDeleteParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, version:, request_options: {}) # @param skill_id [String] # - # @param version [String] The skill version number. + # @param version [String] + # The skill version number. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/skills/version_list_params.rb b/lib/openai/models/skills/version_list_params.rb index 80e842034..e339fe3e6 100644 --- a/lib/openai/models/skills/version_list_params.rb +++ b/lib/openai/models/skills/version_list_params.rb @@ -34,11 +34,14 @@ class VersionListParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, after: nil, limit: nil, order: nil, request_options: {}) # @param skill_id [String] # - # @param after [String] The skill version ID to start after. + # @param after [String] + # The skill version ID to start after. # - # @param limit [Integer] Number of versions to retrieve. + # @param limit [Integer] + # Number of versions to retrieve. # - # @param order [Symbol, OpenAI::Models::Skills::VersionListParams::Order] Sort order of results by version number. + # @param order [Symbol, OpenAI::Models::Skills::VersionListParams::Order] + # Sort order of results by version number. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/skills/version_retrieve_params.rb b/lib/openai/models/skills/version_retrieve_params.rb index 98e0e5705..ea42eca28 100644 --- a/lib/openai/models/skills/version_retrieve_params.rb +++ b/lib/openai/models/skills/version_retrieve_params.rb @@ -22,7 +22,8 @@ class VersionRetrieveParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, version:, request_options: {}) # @param skill_id [String] # - # @param version [String] The version number to retrieve. + # @param version [String] + # The version number to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/skills/versions/content_retrieve_params.rb b/lib/openai/models/skills/versions/content_retrieve_params.rb index 579792498..3fc69cb16 100644 --- a/lib/openai/models/skills/versions/content_retrieve_params.rb +++ b/lib/openai/models/skills/versions/content_retrieve_params.rb @@ -23,7 +23,8 @@ class ContentRetrieveParams < OpenAI::Internal::Type::BaseModel # @!method initialize(skill_id:, version:, request_options: {}) # @param skill_id [String] # - # @param version [String] The skill version number. + # @param version [String] + # The skill version number. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/static_file_chunking_strategy.rb b/lib/openai/models/static_file_chunking_strategy.rb index ac676b5d4..4257c7dbd 100644 --- a/lib/openai/models/static_file_chunking_strategy.rb +++ b/lib/openai/models/static_file_chunking_strategy.rb @@ -19,12 +19,14 @@ class StaticFileChunkingStrategy < OpenAI::Internal::Type::BaseModel required :max_chunk_size_tokens, Integer # @!method initialize(chunk_overlap_tokens:, max_chunk_size_tokens:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::StaticFileChunkingStrategy} for more details. + # @param chunk_overlap_tokens [Integer] + # The number of tokens that overlap between chunks. The default value is `400`. # - # @param chunk_overlap_tokens [Integer] The number of tokens that overlap between chunks. The default value is `400`. + # Note that the overlap must not exceed half of `max_chunk_size_tokens`. # - # @param max_chunk_size_tokens [Integer] The maximum number of tokens in each chunk. The default value is `800`. The mini + # @param max_chunk_size_tokens [Integer] + # The maximum number of tokens in each chunk. The default value is `800`. The + # minimum value is `100` and the maximum value is `4096`. end end end diff --git a/lib/openai/models/static_file_chunking_strategy_object.rb b/lib/openai/models/static_file_chunking_strategy_object.rb index 43c0f303a..e85b583c1 100644 --- a/lib/openai/models/static_file_chunking_strategy_object.rb +++ b/lib/openai/models/static_file_chunking_strategy_object.rb @@ -17,7 +17,8 @@ class StaticFileChunkingStrategyObject < OpenAI::Internal::Type::BaseModel # @!method initialize(static:, type: :static) # @param static [OpenAI::Models::StaticFileChunkingStrategy] # - # @param type [Symbol, :static] Always `static`. + # @param type [Symbol, :static] + # Always `static`. end end end diff --git a/lib/openai/models/static_file_chunking_strategy_object_param.rb b/lib/openai/models/static_file_chunking_strategy_object_param.rb index 3368e144e..70303bae6 100644 --- a/lib/openai/models/static_file_chunking_strategy_object_param.rb +++ b/lib/openai/models/static_file_chunking_strategy_object_param.rb @@ -19,7 +19,8 @@ class StaticFileChunkingStrategyObjectParam < OpenAI::Internal::Type::BaseModel # # @param static [OpenAI::Models::StaticFileChunkingStrategy] # - # @param type [Symbol, :static] Always `static`. + # @param type [Symbol, :static] + # Always `static`. end end end diff --git a/lib/openai/models/upload.rb b/lib/openai/models/upload.rb index e51974b26..411d49e58 100644 --- a/lib/openai/models/upload.rb +++ b/lib/openai/models/upload.rb @@ -42,7 +42,7 @@ class Upload < OpenAI::Internal::Type::BaseModel # @!attribute purpose # The intended purpose of the file. - # [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) + # [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) # for acceptable values. # # @return [String] @@ -61,28 +61,36 @@ class Upload < OpenAI::Internal::Type::BaseModel optional :file, -> { OpenAI::FileObject }, nil?: true # @!method initialize(id:, bytes:, created_at:, expires_at:, filename:, purpose:, status:, file: nil, object: :upload) - # Some parameter documentations has been truncated, see {OpenAI::Models::Upload} - # for more details. - # # The Upload object can accept byte chunks in the form of Parts. # - # @param id [String] The Upload unique identifier, which can be referenced in API endpoints. + # @param id [String] + # The Upload unique identifier, which can be referenced in API endpoints. # - # @param bytes [Integer] The intended number of bytes to be uploaded. + # @param bytes [Integer] + # The intended number of bytes to be uploaded. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the Upload was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the Upload was created. # - # @param expires_at [Integer] The Unix timestamp (in seconds) for when the Upload will expire. + # @param expires_at [Integer] + # The Unix timestamp (in seconds) for when the Upload will expire. # - # @param filename [String] The name of the file to be uploaded. + # @param filename [String] + # The name of the file to be uploaded. # - # @param purpose [String] The intended purpose of the file. [Please refer here](https://platform.openai.co + # @param purpose [String] + # The intended purpose of the file. + # [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) + # for acceptable values. # - # @param status [Symbol, OpenAI::Models::Upload::Status] The status of the Upload. + # @param status [Symbol, OpenAI::Models::Upload::Status] + # The status of the Upload. # - # @param file [OpenAI::Models::FileObject, nil] The `File` object represents a document that has been uploaded to OpenAI. + # @param file [OpenAI::Models::FileObject, nil] + # The `File` object represents a document that has been uploaded to OpenAI. # - # @param object [Symbol, :upload] The object type, which is always "upload". + # @param object [Symbol, :upload] + # The object type, which is always "upload". # The status of the Upload. # diff --git a/lib/openai/models/upload_complete_params.rb b/lib/openai/models/upload_complete_params.rb index 09d22b51b..cdca693db 100644 --- a/lib/openai/models/upload_complete_params.rb +++ b/lib/openai/models/upload_complete_params.rb @@ -26,14 +26,14 @@ class UploadCompleteParams < OpenAI::Internal::Type::BaseModel optional :md5, String # @!method initialize(upload_id:, part_ids:, md5: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCompleteParams} for more details. - # # @param upload_id [String] # - # @param part_ids [Array] The ordered list of Part IDs. + # @param part_ids [Array] + # The ordered list of Part IDs. # - # @param md5 [String] The optional md5 checksum for the file contents to verify if the bytes uploaded + # @param md5 [String] + # The optional md5 checksum for the file contents to verify if the bytes uploaded + # matches what you expect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/upload_create_params.rb b/lib/openai/models/upload_create_params.rb index 2431059ee..72d114c45 100644 --- a/lib/openai/models/upload_create_params.rb +++ b/lib/openai/models/upload_create_params.rb @@ -32,7 +32,7 @@ class UploadCreateParams < OpenAI::Internal::Type::BaseModel # The intended purpose of the uploaded file. # # See the - # [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). # # @return [Symbol, OpenAI::Models::FilePurpose] required :purpose, enum: -> { OpenAI::FilePurpose } @@ -45,18 +45,27 @@ class UploadCreateParams < OpenAI::Internal::Type::BaseModel optional :expires_after, -> { OpenAI::UploadCreateParams::ExpiresAfter } # @!method initialize(bytes:, filename:, mime_type:, purpose:, expires_after: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCreateParams} for more details. + # @param bytes [Integer] + # The number of bytes in the file you are uploading. # - # @param bytes [Integer] The number of bytes in the file you are uploading. + # @param filename [String] + # The name of the file to upload. # - # @param filename [String] The name of the file to upload. + # @param mime_type [String] + # The MIME type of the file. # - # @param mime_type [String] The MIME type of the file. + # This must fall within the supported MIME types for your file purpose. See the + # supported MIME types for assistants and vision. # - # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. + # @param purpose [Symbol, OpenAI::Models::FilePurpose] + # The intended purpose of the uploaded file. # - # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire + # See the + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). + # + # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] + # The expiration policy for a file. By default, files with `purpose=batch` expire + # after 30 days and all other files are persisted until they are manually deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -76,15 +85,16 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :seconds, Integer # @!method initialize(seconds:, anchor: :created_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCreateParams::ExpiresAfter} for more details. - # # The expiration policy for a file. By default, files with `purpose=batch` expire # after 30 days and all other files are persisted until they are manually deleted. # - # @param seconds [Integer] The number of seconds after the anchor time that the file will expire. Must be b + # @param seconds [Integer] + # The number of seconds after the anchor time that the file will expire. Must be + # between 3600 (1 hour) and 2592000 (30 days). # - # @param anchor [Symbol, :created_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :created_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `created_at`. end end end diff --git a/lib/openai/models/uploads/part_create_params.rb b/lib/openai/models/uploads/part_create_params.rb index 87f33b7f0..7bfcd2353 100644 --- a/lib/openai/models/uploads/part_create_params.rb +++ b/lib/openai/models/uploads/part_create_params.rb @@ -24,12 +24,14 @@ class PartCreateParams < OpenAI::Internal::Type::BaseModel required :data, OpenAI::Internal::Type::FileInput # @!method initialize(upload_id:, data:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Uploads::PartCreateParams} for more details. - # # @param upload_id [String] # - # @param data [Pathname, StringIO, IO, String, OpenAI::FilePart] The chunk of bytes for this Part. + # @param data [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The chunk of bytes for this Part. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/uploads/upload_part.rb b/lib/openai/models/uploads/upload_part.rb index f0b618757..5e68449c4 100644 --- a/lib/openai/models/uploads/upload_part.rb +++ b/lib/openai/models/uploads/upload_part.rb @@ -32,13 +32,17 @@ class UploadPart < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, upload_id:, object: :"upload.part") # The upload Part represents a chunk of bytes we can add to an Upload object. # - # @param id [String] The upload Part unique identifier, which can be referenced in API endpoints. + # @param id [String] + # The upload Part unique identifier, which can be referenced in API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the Part was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the Part was created. # - # @param upload_id [String] The ID of the Upload object that this Part was added to. + # @param upload_id [String] + # The ID of the Upload object that this Part was added to. # - # @param object [Symbol, :"upload.part"] The object type, which is always `upload.part`. + # @param object [Symbol, :"upload.part"] + # The object type, which is always `upload.part`. end end diff --git a/lib/openai/models/vector_store.rb b/lib/openai/models/vector_store.rb index 6a9300671..6dfeb78ac 100644 --- a/lib/openai/models/vector_store.rb +++ b/lib/openai/models/vector_store.rb @@ -77,33 +77,47 @@ class VectorStore < OpenAI::Internal::Type::BaseModel optional :expires_at, Integer, nil?: true # @!method initialize(id:, created_at:, file_counts:, last_active_at:, metadata:, name:, status:, usage_bytes:, expires_after: nil, expires_at: nil, object: :vector_store) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStore} for more details. - # # A vector store is a collection of processed files can be used by the # `file_search` tool. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the vector store was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the vector store was created. # # @param file_counts [OpenAI::Models::VectorStore::FileCounts] # - # @param last_active_at [Integer, nil] The Unix timestamp (in seconds) for when the vector store was last active. + # @param last_active_at [Integer, nil] + # The Unix timestamp (in seconds) for when the vector store was last active. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the vector store. + # @param name [String] + # The name of the vector store. # - # @param status [Symbol, OpenAI::Models::VectorStore::Status] The status of the vector store, which can be either `expired`, `in_progress`, or + # @param status [Symbol, OpenAI::Models::VectorStore::Status] + # The status of the vector store, which can be either `expired`, `in_progress`, or + # `completed`. A status of `completed` indicates that the vector store is ready + # for use. # - # @param usage_bytes [Integer] The total number of bytes used by the files in the vector store. + # @param usage_bytes [Integer] + # The total number of bytes used by the files in the vector store. # - # @param expires_after [OpenAI::Models::VectorStore::ExpiresAfter] The expiration policy for a vector store. + # @param expires_after [OpenAI::Models::VectorStore::ExpiresAfter] + # The expiration policy for a vector store. # - # @param expires_at [Integer, nil] The Unix timestamp (in seconds) for when the vector store will expire. + # @param expires_at [Integer, nil] + # The Unix timestamp (in seconds) for when the vector store will expire. # - # @param object [Symbol, :vector_store] The object type, which is always `vector_store`. + # @param object [Symbol, :vector_store] + # The object type, which is always `vector_store`. # @see OpenAI::Models::VectorStore#file_counts class FileCounts < OpenAI::Internal::Type::BaseModel @@ -138,15 +152,20 @@ class FileCounts < OpenAI::Internal::Type::BaseModel required :total, Integer # @!method initialize(cancelled:, completed:, failed:, in_progress:, total:) - # @param cancelled [Integer] The number of files that were cancelled. + # @param cancelled [Integer] + # The number of files that were cancelled. # - # @param completed [Integer] The number of files that have been successfully processed. + # @param completed [Integer] + # The number of files that have been successfully processed. # - # @param failed [Integer] The number of files that have failed to process. + # @param failed [Integer] + # The number of files that have failed to process. # - # @param in_progress [Integer] The number of files that are currently being processed. + # @param in_progress [Integer] + # The number of files that are currently being processed. # - # @param total [Integer] The total number of files. + # @param total [Integer] + # The total number of files. end # The status of the vector store, which can be either `expired`, `in_progress`, or @@ -181,14 +200,14 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :days, Integer # @!method initialize(days:, anchor: :last_active_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStore::ExpiresAfter} for more details. - # # The expiration policy for a vector store. # - # @param days [Integer] The number of days after the anchor time that the vector store will expire. + # @param days [Integer] + # The number of days after the anchor time that the vector store will expire. # - # @param anchor [Symbol, :last_active_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :last_active_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `last_active_at`. end end end diff --git a/lib/openai/models/vector_store_create_params.rb b/lib/openai/models/vector_store_create_params.rb index 57971237b..eaca71974 100644 --- a/lib/openai/models/vector_store_create_params.rb +++ b/lib/openai/models/vector_store_create_params.rb @@ -28,9 +28,9 @@ class VectorStoreCreateParams < OpenAI::Internal::Type::BaseModel optional :expires_after, -> { OpenAI::VectorStoreCreateParams::ExpiresAfter } # @!attribute file_ids - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] @@ -53,20 +53,32 @@ class VectorStoreCreateParams < OpenAI::Internal::Type::BaseModel optional :name, String # @!method initialize(chunking_strategy: nil, description: nil, expires_after: nil, file_ids: nil, metadata: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreCreateParams} for more details. + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param description [String] + # A description for the vector store. Can be used to describe the vector store's + # purpose. # - # @param description [String] A description for the vector store. Can be used to describe the vector store's p + # @param expires_after [OpenAI::Models::VectorStoreCreateParams::ExpiresAfter] + # The expiration policy for a vector store. # - # @param expires_after [OpenAI::Models::VectorStoreCreateParams::ExpiresAfter] The expiration policy for a vector store. + # @param file_ids [Array] + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. # - # @param file_ids [Array] A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the vector store. + # @param name [String] + # The name of the vector store. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -85,14 +97,14 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :days, Integer # @!method initialize(days:, anchor: :last_active_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreCreateParams::ExpiresAfter} for more details. - # # The expiration policy for a vector store. # - # @param days [Integer] The number of days after the anchor time that the vector store will expire. + # @param days [Integer] + # The number of days after the anchor time that the vector store will expire. # - # @param anchor [Symbol, :last_active_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :last_active_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `last_active_at`. end end end diff --git a/lib/openai/models/vector_store_list_params.rb b/lib/openai/models/vector_store_list_params.rb index fcdc7d406..abe304eeb 100644 --- a/lib/openai/models/vector_store_list_params.rb +++ b/lib/openai/models/vector_store_list_params.rb @@ -40,16 +40,25 @@ class VectorStoreListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::VectorStoreListParams::Order } # @!method initialize(after: nil, before: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreListParams} for more details. + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 - # - # @param order [Symbol, OpenAI::Models::VectorStoreListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::VectorStoreListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/vector_store_search_params.rb b/lib/openai/models/vector_store_search_params.rb index ba406046b..f04d0a150 100644 --- a/lib/openai/models/vector_store_search_params.rb +++ b/lib/openai/models/vector_store_search_params.rb @@ -44,20 +44,23 @@ class VectorStoreSearchParams < OpenAI::Internal::Type::BaseModel optional :rewrite_query, OpenAI::Internal::Type::Boolean # @!method initialize(vector_store_id:, query:, filters: nil, max_num_results: nil, ranking_options: nil, rewrite_query: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreSearchParams} for more details. - # # @param vector_store_id [String] # - # @param query [String, Array] A query string for a search + # @param query [String, Array] + # A query string for a search # - # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter] A filter to apply based on file attributes. + # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter] + # A filter to apply based on file attributes. # - # @param max_num_results [Integer] The maximum number of results to return. This number should be between 1 and 50 + # @param max_num_results [Integer] + # The maximum number of results to return. This number should be between 1 and 50 + # inclusive. # - # @param ranking_options [OpenAI::Models::VectorStoreSearchParams::RankingOptions] Ranking options for search. + # @param ranking_options [OpenAI::Models::VectorStoreSearchParams::RankingOptions] + # Ranking options for search. # - # @param rewrite_query [Boolean] Whether to rewrite the natural language query for vector search. + # @param rewrite_query [Boolean] + # Whether to rewrite the natural language query for vector search. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -105,7 +108,8 @@ class RankingOptions < OpenAI::Internal::Type::BaseModel # @!method initialize(ranker: nil, score_threshold: nil) # Ranking options for search. # - # @param ranker [Symbol, OpenAI::Models::VectorStoreSearchParams::RankingOptions::Ranker] Enable re-ranking; set to `none` to disable, which can help reduce latency. + # @param ranker [Symbol, OpenAI::Models::VectorStoreSearchParams::RankingOptions::Ranker] + # Enable re-ranking; set to `none` to disable, which can help reduce latency. # # @param score_threshold [Float] diff --git a/lib/openai/models/vector_store_search_response.rb b/lib/openai/models/vector_store_search_response.rb index e212f3d0e..e9b5a0530 100644 --- a/lib/openai/models/vector_store_search_response.rb +++ b/lib/openai/models/vector_store_search_response.rb @@ -46,19 +46,24 @@ class VectorStoreSearchResponse < OpenAI::Internal::Type::BaseModel required :score, Float # @!method initialize(attributes:, content:, file_id:, filename:, score:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreSearchResponse} for more details. + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param content [Array] + # Content chunks from the file. # - # @param content [Array] Content chunks from the file. + # @param file_id [String] + # The ID of the vector store file. # - # @param file_id [String] The ID of the vector store file. + # @param filename [String] + # The name of the vector store file. # - # @param filename [String] The name of the vector store file. - # - # @param score [Float] The similarity score for the result. - + # @param score [Float] + # The similarity score for the result. module Attribute extend OpenAI::Internal::Type::Union @@ -86,9 +91,11 @@ class Content < OpenAI::Internal::Type::BaseModel required :type, enum: -> { OpenAI::Models::VectorStoreSearchResponse::Content::Type } # @!method initialize(text:, type:) - # @param text [String] The text content returned from search. + # @param text [String] + # The text content returned from search. # - # @param type [Symbol, OpenAI::Models::VectorStoreSearchResponse::Content::Type] The type of content. + # @param type [Symbol, OpenAI::Models::VectorStoreSearchResponse::Content::Type] + # The type of content. # The type of content. # diff --git a/lib/openai/models/vector_store_update_params.rb b/lib/openai/models/vector_store_update_params.rb index 2817106d8..41d392f53 100644 --- a/lib/openai/models/vector_store_update_params.rb +++ b/lib/openai/models/vector_store_update_params.rb @@ -36,16 +36,21 @@ class VectorStoreUpdateParams < OpenAI::Internal::Type::BaseModel optional :name, String, nil?: true # @!method initialize(vector_store_id:, expires_after: nil, metadata: nil, name: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreUpdateParams} for more details. - # # @param vector_store_id [String] # - # @param expires_after [OpenAI::Models::VectorStoreUpdateParams::ExpiresAfter, nil] The expiration policy for a vector store. + # @param expires_after [OpenAI::Models::VectorStoreUpdateParams::ExpiresAfter, nil] + # The expiration policy for a vector store. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String, nil] The name of the vector store. + # @param name [String, nil] + # The name of the vector store. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -64,14 +69,14 @@ class ExpiresAfter < OpenAI::Internal::Type::BaseModel required :days, Integer # @!method initialize(days:, anchor: :last_active_at) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreUpdateParams::ExpiresAfter} for more details. - # # The expiration policy for a vector store. # - # @param days [Integer] The number of days after the anchor time that the vector store will expire. + # @param days [Integer] + # The number of days after the anchor time that the vector store will expire. # - # @param anchor [Symbol, :last_active_at] Anchor timestamp after which the expiration policy applies. Supported anchors: ` + # @param anchor [Symbol, :last_active_at] + # Anchor timestamp after which the expiration policy applies. Supported anchors: + # `last_active_at`. end end end diff --git a/lib/openai/models/vector_stores/file_batch_create_params.rb b/lib/openai/models/vector_stores/file_batch_create_params.rb index e6c3b4130..39721b5ca 100644 --- a/lib/openai/models/vector_stores/file_batch_create_params.rb +++ b/lib/openai/models/vector_stores/file_batch_create_params.rb @@ -37,12 +37,12 @@ class FileBatchCreateParams < OpenAI::Internal::Type::BaseModel optional :chunking_strategy, union: -> { OpenAI::FileChunkingStrategyParam } # @!attribute file_ids - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. If `attributes` or `chunking_strategy` are provided, they will be applied - # to all files in the batch. The maximum batch size is 2000 files. This endpoint - # is recommended for multi-file ingestion and helps reduce per-vector-store write - # request pressure. Mutually exclusive with `files`. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. # # @return [Array, nil] optional :file_ids, OpenAI::Internal::Type::ArrayOf[String] @@ -59,18 +59,34 @@ class FileBatchCreateParams < OpenAI::Internal::Type::BaseModel optional :files, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::VectorStores::FileBatchCreateParams::File] } # @!method initialize(vector_store_id:, attributes: nil, chunking_strategy: nil, file_ids: nil, files: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileBatchCreateParams} for more details. - # # @param vector_store_id [String] # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. # - # @param file_ids [Array] A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that + # @param file_ids [Array] + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. # - # @param files [Array] A list of objects that each include a `file_id` plus optional `attributes` or `c + # @param files [Array] + # A list of objects that each include a `file_id` plus optional `attributes` or + # `chunking_strategy`. Use this when you need to override metadata for specific + # files. The global `attributes` or `chunking_strategy` will be ignored and must + # be specified for each file. The maximum batch size is 2000 files. This endpoint + # is recommended for multi-file ingestion and helps reduce per-vector-store write + # request pressure. Mutually exclusive with `file_ids`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -89,10 +105,10 @@ module Attribute class File < OpenAI::Internal::Type::BaseModel # @!attribute file_id - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. # # @return [String] @@ -122,15 +138,23 @@ class File < OpenAI::Internal::Type::BaseModel optional :chunking_strategy, union: -> { OpenAI::FileChunkingStrategyParam } # @!method initialize(file_id:, attributes: nil, chunking_strategy: nil) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileBatchCreateParams::File} for more details. + # @param file_id [String] + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access + # files. For multi-file ingestion, we recommend + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) + # to minimize per-vector-store write requests. # - # @param file_id [String] A [File](https://platform.openai.com/docs/api-reference/files) ID that the vecto + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` - + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. module Attribute extend OpenAI::Internal::Type::Union diff --git a/lib/openai/models/vector_stores/file_batch_list_files_params.rb b/lib/openai/models/vector_stores/file_batch_list_files_params.rb index 047ab7706..c825fe838 100644 --- a/lib/openai/models/vector_stores/file_batch_list_files_params.rb +++ b/lib/openai/models/vector_stores/file_batch_list_files_params.rb @@ -57,22 +57,32 @@ class FileBatchListFilesParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::VectorStores::FileBatchListFilesParams::Order } # @!method initialize(vector_store_id:, batch_id:, after: nil, before: nil, filter: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileBatchListFilesParams} for more details. - # # @param vector_store_id [String] # # @param batch_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param filter [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Filter] Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. + # @param filter [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Filter] + # Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/vector_stores/file_content_response.rb b/lib/openai/models/vector_stores/file_content_response.rb index 8c9f595aa..efa0cfe83 100644 --- a/lib/openai/models/vector_stores/file_content_response.rb +++ b/lib/openai/models/vector_stores/file_content_response.rb @@ -18,9 +18,11 @@ class FileContentResponse < OpenAI::Internal::Type::BaseModel optional :type, String # @!method initialize(text: nil, type: nil) - # @param text [String] The text content + # @param text [String] + # The text content # - # @param type [String] The content type (currently only `"text"`) + # @param type [String] + # The content type (currently only `"text"`) end end end diff --git a/lib/openai/models/vector_stores/file_create_params.rb b/lib/openai/models/vector_stores/file_create_params.rb index 00f41d422..9517d4381 100644 --- a/lib/openai/models/vector_stores/file_create_params.rb +++ b/lib/openai/models/vector_stores/file_create_params.rb @@ -14,10 +14,10 @@ class FileCreateParams < OpenAI::Internal::Type::BaseModel required :vector_store_id, String # @!attribute file_id - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. # # @return [String] @@ -47,16 +47,25 @@ class FileCreateParams < OpenAI::Internal::Type::BaseModel optional :chunking_strategy, union: -> { OpenAI::FileChunkingStrategyParam } # @!method initialize(vector_store_id:, file_id:, attributes: nil, chunking_strategy: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileCreateParams} for more details. - # # @param vector_store_id [String] # - # @param file_id [String] A [File](https://platform.openai.com/docs/api-reference/files) ID that the vecto + # @param file_id [String] + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access + # files. For multi-file ingestion, we recommend + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) + # to minimize per-vector-store write requests. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/vector_stores/file_list_params.rb b/lib/openai/models/vector_stores/file_list_params.rb index 64924d2fa..b96206a70 100644 --- a/lib/openai/models/vector_stores/file_list_params.rb +++ b/lib/openai/models/vector_stores/file_list_params.rb @@ -52,20 +52,30 @@ class FileListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::VectorStores::FileListParams::Order } # @!method initialize(vector_store_id:, after: nil, before: nil, filter: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileListParams} for more details. - # # @param vector_store_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param filter [Symbol, OpenAI::Models::VectorStores::FileListParams::Filter] Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. + # @param filter [Symbol, OpenAI::Models::VectorStores::FileListParams::Filter] + # Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::VectorStores::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::VectorStores::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/vector_stores/file_update_params.rb b/lib/openai/models/vector_stores/file_update_params.rb index e5ebe2922..534c09b41 100644 --- a/lib/openai/models/vector_stores/file_update_params.rb +++ b/lib/openai/models/vector_stores/file_update_params.rb @@ -35,14 +35,16 @@ class FileUpdateParams < OpenAI::Internal::Type::BaseModel ) # @!method initialize(vector_store_id:, file_id:, attributes:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileUpdateParams} for more details. - # # @param vector_store_id [String] # # @param file_id [String] # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/vector_stores/vector_store_file.rb b/lib/openai/models/vector_stores/vector_store_file.rb index 841fd0f7e..a4f7014f8 100644 --- a/lib/openai/models/vector_stores/vector_store_file.rb +++ b/lib/openai/models/vector_stores/vector_store_file.rb @@ -47,8 +47,8 @@ class VectorStoreFile < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_id # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. # # @return [String] @@ -77,28 +77,45 @@ class VectorStoreFile < OpenAI::Internal::Type::BaseModel optional :chunking_strategy, union: -> { OpenAI::FileChunkingStrategy } # @!method initialize(id:, created_at:, last_error:, status:, usage_bytes:, vector_store_id:, attributes: nil, chunking_strategy: nil, object: :"vector_store.file") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::VectorStoreFile} for more details. - # # A list of files attached to a vector store. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the vector store file was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the vector store file was created. # - # @param last_error [OpenAI::Models::VectorStores::VectorStoreFile::LastError, nil] The last error associated with this vector store file. Will be `null` if there a + # @param last_error [OpenAI::Models::VectorStores::VectorStoreFile::LastError, nil] + # The last error associated with this vector store file. Will be `null` if there + # are no errors. # - # @param status [Symbol, OpenAI::Models::VectorStores::VectorStoreFile::Status] The status of the vector store file, which can be either `in_progress`, `complet + # @param status [Symbol, OpenAI::Models::VectorStores::VectorStoreFile::Status] + # The status of the vector store file, which can be either `in_progress`, + # `completed`, `cancelled`, or `failed`. The status `completed` indicates that the + # vector store file is ready for use. # - # @param usage_bytes [Integer] The total vector store usage in bytes. Note that this may be different from the + # @param usage_bytes [Integer] + # The total vector store usage in bytes. Note that this may be different from the + # original file size. # - # @param vector_store_id [String] The ID of the [vector store](https://platform.openai.com/docs/api-reference/vect + # @param vector_store_id [String] + # The ID of the + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is + # attached to. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param chunking_strategy [OpenAI::Models::StaticFileChunkingStrategyObject, OpenAI::Models::OtherFileChunkingStrategyObject] The strategy used to chunk the file. + # @param chunking_strategy [OpenAI::Models::StaticFileChunkingStrategyObject, OpenAI::Models::OtherFileChunkingStrategyObject] + # The strategy used to chunk the file. # - # @param object [Symbol, :"vector_store.file"] The object type, which is always `vector_store.file`. + # @param object [Symbol, :"vector_store.file"] + # The object type, which is always `vector_store.file`. # @see OpenAI::Models::VectorStores::VectorStoreFile#last_error class LastError < OpenAI::Internal::Type::BaseModel @@ -118,9 +135,11 @@ class LastError < OpenAI::Internal::Type::BaseModel # The last error associated with this vector store file. Will be `null` if there # are no errors. # - # @param code [Symbol, OpenAI::Models::VectorStores::VectorStoreFile::LastError::Code] One of `server_error`, `unsupported_file`, or `invalid_file`. + # @param code [Symbol, OpenAI::Models::VectorStores::VectorStoreFile::LastError::Code] + # One of `server_error`, `unsupported_file`, or `invalid_file`. # - # @param message [String] A human-readable description of the error. + # @param message [String] + # A human-readable description of the error. # One of `server_error`, `unsupported_file`, or `invalid_file`. # diff --git a/lib/openai/models/vector_stores/vector_store_file_batch.rb b/lib/openai/models/vector_stores/vector_store_file_batch.rb index f4b251eea..edabe1a7a 100644 --- a/lib/openai/models/vector_stores/vector_store_file_batch.rb +++ b/lib/openai/models/vector_stores/vector_store_file_batch.rb @@ -38,30 +38,37 @@ class VectorStoreFileBatch < OpenAI::Internal::Type::BaseModel # @!attribute vector_store_id # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. # # @return [String] required :vector_store_id, String # @!method initialize(id:, created_at:, file_counts:, status:, vector_store_id:, object: :"vector_store.files_batch") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::VectorStoreFileBatch} for more details. - # # A batch of files attached to a vector store. # - # @param id [String] The identifier, which can be referenced in API endpoints. + # @param id [String] + # The identifier, which can be referenced in API endpoints. # - # @param created_at [Integer] The Unix timestamp (in seconds) for when the vector store files batch was create + # @param created_at [Integer] + # The Unix timestamp (in seconds) for when the vector store files batch was + # created. # # @param file_counts [OpenAI::Models::VectorStores::VectorStoreFileBatch::FileCounts] # - # @param status [Symbol, OpenAI::Models::VectorStores::VectorStoreFileBatch::Status] The status of the vector store files batch, which can be either `in_progress`, ` + # @param status [Symbol, OpenAI::Models::VectorStores::VectorStoreFileBatch::Status] + # The status of the vector store files batch, which can be either `in_progress`, + # `completed`, `cancelled` or `failed`. # - # @param vector_store_id [String] The ID of the [vector store](https://platform.openai.com/docs/api-reference/vect + # @param vector_store_id [String] + # The ID of the + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is + # attached to. # - # @param object [Symbol, :"vector_store.files_batch"] The object type, which is always `vector_store.file_batch`. + # @param object [Symbol, :"vector_store.files_batch"] + # The object type, which is always `vector_store.file_batch`. # @see OpenAI::Models::VectorStores::VectorStoreFileBatch#file_counts class FileCounts < OpenAI::Internal::Type::BaseModel @@ -96,15 +103,20 @@ class FileCounts < OpenAI::Internal::Type::BaseModel required :total, Integer # @!method initialize(cancelled:, completed:, failed:, in_progress:, total:) - # @param cancelled [Integer] The number of files that where cancelled. + # @param cancelled [Integer] + # The number of files that where cancelled. # - # @param completed [Integer] The number of files that have been processed. + # @param completed [Integer] + # The number of files that have been processed. # - # @param failed [Integer] The number of files that have failed to process. + # @param failed [Integer] + # The number of files that have failed to process. # - # @param in_progress [Integer] The number of files that are currently being processed. + # @param in_progress [Integer] + # The number of files that are currently being processed. # - # @param total [Integer] The total number of files. + # @param total [Integer] + # The total number of files. end # The status of the vector store files batch, which can be either `in_progress`, diff --git a/lib/openai/models/video.rb b/lib/openai/models/video.rb index 8008287b6..bb41df570 100644 --- a/lib/openai/models/video.rb +++ b/lib/openai/models/video.rb @@ -84,36 +84,47 @@ class Video < OpenAI::Internal::Type::BaseModel required :status, enum: -> { OpenAI::Video::Status } # @!method initialize(id:, completed_at:, created_at:, error:, expires_at:, model:, progress:, prompt:, remixed_from_video_id:, seconds:, size:, status:, object: :video) - # Some parameter documentations has been truncated, see {OpenAI::Models::Video} - # for more details. - # # Structured information describing a generated video job. # - # @param id [String] Unique identifier for the video job. + # @param id [String] + # Unique identifier for the video job. # - # @param completed_at [Integer, nil] Unix timestamp (seconds) for when the job completed, if finished. + # @param completed_at [Integer, nil] + # Unix timestamp (seconds) for when the job completed, if finished. # - # @param created_at [Integer] Unix timestamp (seconds) for when the job was created. + # @param created_at [Integer] + # Unix timestamp (seconds) for when the job was created. # - # @param error [OpenAI::Models::VideoCreateError, nil] Error payload that explains why generation failed, if applicable. + # @param error [OpenAI::Models::VideoCreateError, nil] + # Error payload that explains why generation failed, if applicable. # - # @param expires_at [Integer, nil] Unix timestamp (seconds) for when the downloadable assets expire, if set. + # @param expires_at [Integer, nil] + # Unix timestamp (seconds) for when the downloadable assets expire, if set. # - # @param model [String, Symbol, OpenAI::Models::VideoModel] The video generation model that produced the job. + # @param model [String, Symbol, OpenAI::Models::VideoModel] + # The video generation model that produced the job. # - # @param progress [Integer] Approximate completion percentage for the generation task. + # @param progress [Integer] + # Approximate completion percentage for the generation task. # - # @param prompt [String, nil] The prompt that was used to generate the video. + # @param prompt [String, nil] + # The prompt that was used to generate the video. # - # @param remixed_from_video_id [String, nil] Identifier of the source video if this video is a remix. + # @param remixed_from_video_id [String, nil] + # Identifier of the source video if this video is a remix. # - # @param seconds [String, Symbol, OpenAI::Models::VideoSeconds] Duration of the generated clip in seconds. For extensions, this is the stitched + # @param seconds [String, Symbol, OpenAI::Models::VideoSeconds] + # Duration of the generated clip in seconds. For extensions, this is the stitched + # total duration. # - # @param size [Symbol, OpenAI::Models::VideoSize] The resolution of the generated video. + # @param size [Symbol, OpenAI::Models::VideoSize] + # The resolution of the generated video. # - # @param status [Symbol, OpenAI::Models::Video::Status] Current lifecycle status of the video job. + # @param status [Symbol, OpenAI::Models::Video::Status] + # Current lifecycle status of the video job. # - # @param object [Symbol, :video] The object type, which is always `video`. + # @param object [Symbol, :video] + # The object type, which is always `video`. # Duration of the generated clip in seconds. For extensions, this is the stitched # total duration. diff --git a/lib/openai/models/video_create_character_params.rb b/lib/openai/models/video_create_character_params.rb index ea2ff6be0..c285621a2 100644 --- a/lib/openai/models/video_create_character_params.rb +++ b/lib/openai/models/video_create_character_params.rb @@ -24,9 +24,15 @@ class VideoCreateCharacterParams < OpenAI::Internal::Type::BaseModel required :video, OpenAI::Internal::Type::FileInput # @!method initialize(name:, video:, request_options: {}) - # @param name [String] Display name for this API character. + # @param name [String] + # Display name for this API character. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart] Video file used to create a character. + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart] + # Video file used to create a character. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/video_create_character_response.rb b/lib/openai/models/video_create_character_response.rb index 4847f3f52..4ebc2c913 100644 --- a/lib/openai/models/video_create_character_response.rb +++ b/lib/openai/models/video_create_character_response.rb @@ -23,11 +23,14 @@ class VideoCreateCharacterResponse < OpenAI::Internal::Type::BaseModel required :name, String, nil?: true # @!method initialize(id:, created_at:, name:) - # @param id [String, nil] Identifier for the character creation cameo. + # @param id [String, nil] + # Identifier for the character creation cameo. # - # @param created_at [Integer] Unix timestamp (in seconds) when the character was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the character was created. # - # @param name [String, nil] Display name for the character. + # @param name [String, nil] + # Display name for the character. end end end diff --git a/lib/openai/models/video_create_error.rb b/lib/openai/models/video_create_error.rb index 35c3bfc3c..05a4911d2 100644 --- a/lib/openai/models/video_create_error.rb +++ b/lib/openai/models/video_create_error.rb @@ -23,9 +23,11 @@ class VideoCreateError < OpenAI::Internal::Type::BaseModel # @!method initialize(code:, message:, misalignment: nil) # An error that occurred while generating the response. # - # @param code [String] A machine-readable error code that was returned. + # @param code [String] + # A machine-readable error code that was returned. # - # @param message [String] A human-readable description of the error that was returned. + # @param message [String] + # A human-readable description of the error that was returned. # # @param misalignment [OpenAI::Models::VideoCreateError::Misalignment] @@ -50,11 +52,14 @@ class Misalignment < OpenAI::Internal::Type::BaseModel optional :steer, -> { OpenAI::VideoCreateError::Misalignment::Steer } # @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil) - # @param detailed_explanation [String] The public explanation for this block. + # @param detailed_explanation [String] + # The public explanation for this block. # - # @param error_type [String, Symbol, OpenAI::Models::VideoCreateError::Misalignment::ErrorType] An optional classification; clients must accept additional values. + # @param error_type [String, Symbol, OpenAI::Models::VideoCreateError::Misalignment::ErrorType] + # An optional classification; clients must accept additional values. # - # @param steer [OpenAI::Models::VideoCreateError::Misalignment::Steer] An optional public continuation instruction. + # @param steer [OpenAI::Models::VideoCreateError::Misalignment::Steer] + # An optional public continuation instruction. # An optional classification; clients must accept additional values. # @@ -110,7 +115,8 @@ class Steer < OpenAI::Internal::Type::BaseModel # @!method initialize(message:) # An optional public continuation instruction. # - # @param message [String] The public continuation instruction. + # @param message [String] + # The public continuation instruction. end end end diff --git a/lib/openai/models/video_create_params.rb b/lib/openai/models/video_create_params.rb index e76404e33..48fd5b7fc 100644 --- a/lib/openai/models/video_create_params.rb +++ b/lib/openai/models/video_create_params.rb @@ -44,18 +44,26 @@ class VideoCreateParams < OpenAI::Internal::Type::BaseModel optional :size, enum: -> { OpenAI::VideoSize } # @!method initialize(prompt:, input_reference: nil, model: nil, seconds: nil, size: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoCreateParams} for more details. + # @param prompt [String] + # Text prompt that describes the video to generate. # - # @param prompt [String] Text prompt that describes the video to generate. + # @param input_reference [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::ImageInputReferenceParam] + # Optional reference asset upload or reference object that guides generation. # - # @param input_reference [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::ImageInputReferenceParam] Optional reference asset upload or reference object that guides generation. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::VideoModel] The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults + # @param model [String, Symbol, OpenAI::Models::VideoModel] + # The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults + # to `sora-2`. # - # @param seconds [Symbol, OpenAI::Models::VideoSeconds] Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + # @param seconds [Symbol, OpenAI::Models::VideoSeconds] + # Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. # - # @param size [Symbol, OpenAI::Models::VideoSize] Output resolution formatted as width x height (allowed values: 720x1280, 1280x72 + # @param size [Symbol, OpenAI::Models::VideoSize] + # Output resolution formatted as width x height (allowed values: 720x1280, + # 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/video_delete_response.rb b/lib/openai/models/video_delete_response.rb index 3e30fbf5f..0cc9fb6f5 100644 --- a/lib/openai/models/video_delete_response.rb +++ b/lib/openai/models/video_delete_response.rb @@ -25,11 +25,14 @@ class VideoDeleteResponse < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, deleted:, object: :"video.deleted") # Confirmation payload returned after deleting a video. # - # @param id [String] Identifier of the deleted video. + # @param id [String] + # Identifier of the deleted video. # - # @param deleted [Boolean] Indicates that the video resource was deleted. + # @param deleted [Boolean] + # Indicates that the video resource was deleted. # - # @param object [Symbol, :"video.deleted"] The object type that signals the deletion response. + # @param object [Symbol, :"video.deleted"] + # The object type that signals the deletion response. end end end diff --git a/lib/openai/models/video_download_content_params.rb b/lib/openai/models/video_download_content_params.rb index eaa533d84..22b53cd87 100644 --- a/lib/openai/models/video_download_content_params.rb +++ b/lib/openai/models/video_download_content_params.rb @@ -21,7 +21,8 @@ class VideoDownloadContentParams < OpenAI::Internal::Type::BaseModel # @!method initialize(video_id:, variant: nil, request_options: {}) # @param video_id [String] # - # @param variant [Symbol, OpenAI::Models::VideoDownloadContentParams::Variant] Which downloadable asset to return. Defaults to the MP4 video. + # @param variant [Symbol, OpenAI::Models::VideoDownloadContentParams::Variant] + # Which downloadable asset to return. Defaults to the MP4 video. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/video_edit_params.rb b/lib/openai/models/video_edit_params.rb index 9e285e737..83d373e91 100644 --- a/lib/openai/models/video_edit_params.rb +++ b/lib/openai/models/video_edit_params.rb @@ -24,9 +24,15 @@ class VideoEditParams < OpenAI::Internal::Type::BaseModel required :video, union: -> { OpenAI::VideoEditParams::Video } # @!method initialize(prompt:, video:, request_options: {}) - # @param prompt [String] Text prompt that describes how to edit the source video. + # @param prompt [String] + # Text prompt that describes how to edit the source video. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoEditParams::Video::VideoReferenceInputParam] Reference to the completed video to edit. + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoEditParams::Video::VideoReferenceInputParam] + # Reference to the completed video to edit. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -50,7 +56,8 @@ class VideoReferenceInputParam < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Reference to the completed video to edit. # - # @param id [String] The identifier of the completed video. + # @param id [String] + # The identifier of the completed video. end # @!method self.variants diff --git a/lib/openai/models/video_extend_params.rb b/lib/openai/models/video_extend_params.rb index bfe978298..859e44480 100644 --- a/lib/openai/models/video_extend_params.rb +++ b/lib/openai/models/video_extend_params.rb @@ -31,14 +31,19 @@ class VideoExtendParams < OpenAI::Internal::Type::BaseModel required :video, union: -> { OpenAI::VideoExtendParams::Video } # @!method initialize(prompt:, seconds:, video:, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoExtendParams} for more details. + # @param prompt [String] + # Updated text prompt that directs the extension generation. # - # @param prompt [String] Updated text prompt that directs the extension generation. + # @param seconds [Symbol, OpenAI::Models::VideoSeconds] + # Length of the newly generated extension segment in seconds (allowed values: 4, + # 8, 12, 16, 20). # - # @param seconds [Symbol, OpenAI::Models::VideoSeconds] Length of the newly generated extension segment in seconds (allowed values: 4, 8 + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoExtendParams::Video::VideoReferenceInputParam] + # Reference to the completed video to extend. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoExtendParams::Video::VideoReferenceInputParam] Reference to the completed video to extend. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] @@ -62,7 +67,8 @@ class VideoReferenceInputParam < OpenAI::Internal::Type::BaseModel # @!method initialize(id:) # Reference to the completed video. # - # @param id [String] The identifier of the completed video. + # @param id [String] + # The identifier of the completed video. end # @!method self.variants diff --git a/lib/openai/models/video_get_character_response.rb b/lib/openai/models/video_get_character_response.rb index fa354afd6..8577c4b86 100644 --- a/lib/openai/models/video_get_character_response.rb +++ b/lib/openai/models/video_get_character_response.rb @@ -23,11 +23,14 @@ class VideoGetCharacterResponse < OpenAI::Internal::Type::BaseModel required :name, String, nil?: true # @!method initialize(id:, created_at:, name:) - # @param id [String, nil] Identifier for the character creation cameo. + # @param id [String, nil] + # Identifier for the character creation cameo. # - # @param created_at [Integer] Unix timestamp (in seconds) when the character was created. + # @param created_at [Integer] + # Unix timestamp (in seconds) when the character was created. # - # @param name [String, nil] Display name for the character. + # @param name [String, nil] + # Display name for the character. end end end diff --git a/lib/openai/models/video_list_params.rb b/lib/openai/models/video_list_params.rb index 72166e55a..edf7f4d4e 100644 --- a/lib/openai/models/video_list_params.rb +++ b/lib/openai/models/video_list_params.rb @@ -27,14 +27,15 @@ class VideoListParams < OpenAI::Internal::Type::BaseModel optional :order, enum: -> { OpenAI::VideoListParams::Order } # @!method initialize(after: nil, limit: nil, order: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoListParams} for more details. + # @param after [String] + # Identifier for the last item from the previous pagination request # - # @param after [String] Identifier for the last item from the previous pagination request + # @param limit [Integer] + # Number of items to retrieve # - # @param limit [Integer] Number of items to retrieve - # - # @param order [Symbol, OpenAI::Models::VideoListParams::Order] Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # @param order [Symbol, OpenAI::Models::VideoListParams::Order] + # Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/openai/models/video_remix_params.rb b/lib/openai/models/video_remix_params.rb index e5eaddcea..17d6a4a8b 100644 --- a/lib/openai/models/video_remix_params.rb +++ b/lib/openai/models/video_remix_params.rb @@ -21,7 +21,8 @@ class VideoRemixParams < OpenAI::Internal::Type::BaseModel # @!method initialize(video_id:, prompt:, request_options: {}) # @param video_id [String] # - # @param prompt [String] Updated text prompt that directs the remix generation. + # @param prompt [String] + # Updated text prompt that directs the remix generation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/models/webhooks/batch_cancelled_webhook_event.rb b/lib/openai/models/webhooks/batch_cancelled_webhook_event.rb index 1cef64b51..61d78e102 100644 --- a/lib/openai/models/webhooks/batch_cancelled_webhook_event.rb +++ b/lib/openai/models/webhooks/batch_cancelled_webhook_event.rb @@ -35,20 +35,22 @@ class BatchCancelledWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::BatchCancelledWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"batch.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchCancelledWebhookEvent} for more details. - # # Sent when a batch API request has been cancelled. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the batch API request was cancelled. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the batch API request was cancelled. # - # @param data [OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"batch.cancelled"] The type of the event. Always `batch.cancelled`. + # @param type [Symbol, :"batch.cancelled"] + # The type of the event. Always `batch.cancelled`. # @see OpenAI::Models::Webhooks::BatchCancelledWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the batch API request. + # @param id [String] + # The unique ID of the batch API request. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/batch_completed_webhook_event.rb b/lib/openai/models/webhooks/batch_completed_webhook_event.rb index fb130f530..9a6895703 100644 --- a/lib/openai/models/webhooks/batch_completed_webhook_event.rb +++ b/lib/openai/models/webhooks/batch_completed_webhook_event.rb @@ -35,20 +35,22 @@ class BatchCompletedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::BatchCompletedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"batch.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchCompletedWebhookEvent} for more details. - # # Sent when a batch API request has been completed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the batch API request was completed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the batch API request was completed. # - # @param data [OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"batch.completed"] The type of the event. Always `batch.completed`. + # @param type [Symbol, :"batch.completed"] + # The type of the event. Always `batch.completed`. # @see OpenAI::Models::Webhooks::BatchCompletedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the batch API request. + # @param id [String] + # The unique ID of the batch API request. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/batch_expired_webhook_event.rb b/lib/openai/models/webhooks/batch_expired_webhook_event.rb index cf0bb2859..feefc9652 100644 --- a/lib/openai/models/webhooks/batch_expired_webhook_event.rb +++ b/lib/openai/models/webhooks/batch_expired_webhook_event.rb @@ -35,20 +35,22 @@ class BatchExpiredWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::BatchExpiredWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"batch.expired") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchExpiredWebhookEvent} for more details. - # # Sent when a batch API request has expired. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the batch API request expired. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the batch API request expired. # - # @param data [OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"batch.expired"] The type of the event. Always `batch.expired`. + # @param type [Symbol, :"batch.expired"] + # The type of the event. Always `batch.expired`. # @see OpenAI::Models::Webhooks::BatchExpiredWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the batch API request. + # @param id [String] + # The unique ID of the batch API request. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/batch_failed_webhook_event.rb b/lib/openai/models/webhooks/batch_failed_webhook_event.rb index c84be5ee3..6422aba9c 100644 --- a/lib/openai/models/webhooks/batch_failed_webhook_event.rb +++ b/lib/openai/models/webhooks/batch_failed_webhook_event.rb @@ -35,20 +35,22 @@ class BatchFailedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::BatchFailedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"batch.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchFailedWebhookEvent} for more details. - # # Sent when a batch API request has failed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the batch API request failed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the batch API request failed. # - # @param data [OpenAI::Models::Webhooks::BatchFailedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::BatchFailedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::BatchFailedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::BatchFailedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"batch.failed"] The type of the event. Always `batch.failed`. + # @param type [Symbol, :"batch.failed"] + # The type of the event. Always `batch.failed`. # @see OpenAI::Models::Webhooks::BatchFailedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::BatchFailedWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the batch API request. + # @param id [String] + # The unique ID of the batch API request. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/eval_run_canceled_webhook_event.rb b/lib/openai/models/webhooks/eval_run_canceled_webhook_event.rb index 684cd7f0d..7744dc90f 100644 --- a/lib/openai/models/webhooks/eval_run_canceled_webhook_event.rb +++ b/lib/openai/models/webhooks/eval_run_canceled_webhook_event.rb @@ -35,20 +35,22 @@ class EvalRunCanceledWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::EvalRunCanceledWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"eval.run.canceled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent} for more details. - # # Sent when an eval run has been canceled. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the eval run was canceled. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the eval run was canceled. # - # @param data [OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"eval.run.canceled"] The type of the event. Always `eval.run.canceled`. + # @param type [Symbol, :"eval.run.canceled"] + # The type of the event. Always `eval.run.canceled`. # @see OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the eval run. + # @param id [String] + # The unique ID of the eval run. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/eval_run_failed_webhook_event.rb b/lib/openai/models/webhooks/eval_run_failed_webhook_event.rb index c0db2b681..47700e461 100644 --- a/lib/openai/models/webhooks/eval_run_failed_webhook_event.rb +++ b/lib/openai/models/webhooks/eval_run_failed_webhook_event.rb @@ -35,20 +35,22 @@ class EvalRunFailedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::EvalRunFailedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"eval.run.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent} for more details. - # # Sent when an eval run has failed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the eval run failed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the eval run failed. # - # @param data [OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"eval.run.failed"] The type of the event. Always `eval.run.failed`. + # @param type [Symbol, :"eval.run.failed"] + # The type of the event. Always `eval.run.failed`. # @see OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunFailedWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the eval run. + # @param id [String] + # The unique ID of the eval run. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/eval_run_succeeded_webhook_event.rb b/lib/openai/models/webhooks/eval_run_succeeded_webhook_event.rb index 55321f793..6338d5c30 100644 --- a/lib/openai/models/webhooks/eval_run_succeeded_webhook_event.rb +++ b/lib/openai/models/webhooks/eval_run_succeeded_webhook_event.rb @@ -35,20 +35,22 @@ class EvalRunSucceededWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::EvalRunSucceededWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"eval.run.succeeded") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent} for more details. - # # Sent when an eval run has succeeded. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the eval run succeeded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the eval run succeeded. # - # @param data [OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"eval.run.succeeded"] The type of the event. Always `eval.run.succeeded`. + # @param type [Symbol, :"eval.run.succeeded"] + # The type of the event. Always `eval.run.succeeded`. # @see OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::EvalRunSucceededWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the eval run. + # @param id [String] + # The unique ID of the eval run. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rb b/lib/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rb index 66d6c0f32..1cd4fef70 100644 --- a/lib/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rb +++ b/lib/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rb @@ -35,20 +35,22 @@ class FineTuningJobCancelledWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::FineTuningJobCancelledWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"fine_tuning.job.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent} for more details. - # # Sent when a fine-tuning job has been cancelled. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the fine-tuning job was cancelled. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the fine-tuning job was cancelled. # - # @param data [OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"fine_tuning.job.cancelled"] The type of the event. Always `fine_tuning.job.cancelled`. + # @param type [Symbol, :"fine_tuning.job.cancelled"] + # The type of the event. Always `fine_tuning.job.cancelled`. # @see OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobCancelledWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the fine-tuning job. + # @param id [String] + # The unique ID of the fine-tuning job. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rb b/lib/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rb index 160a2a3c9..c5aafcd6c 100644 --- a/lib/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rb +++ b/lib/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rb @@ -35,20 +35,22 @@ class FineTuningJobFailedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::FineTuningJobFailedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"fine_tuning.job.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent} for more details. - # # Sent when a fine-tuning job has failed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the fine-tuning job failed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the fine-tuning job failed. # - # @param data [OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"fine_tuning.job.failed"] The type of the event. Always `fine_tuning.job.failed`. + # @param type [Symbol, :"fine_tuning.job.failed"] + # The type of the event. Always `fine_tuning.job.failed`. # @see OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobFailedWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the fine-tuning job. + # @param id [String] + # The unique ID of the fine-tuning job. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rb b/lib/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rb index 20c1ee688..a092e8ac9 100644 --- a/lib/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rb +++ b/lib/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rb @@ -35,20 +35,22 @@ class FineTuningJobSucceededWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::FineTuningJobSucceededWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"fine_tuning.job.succeeded") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent} for more details. - # # Sent when a fine-tuning job has succeeded. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the fine-tuning job succeeded. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the fine-tuning job succeeded. # - # @param data [OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"fine_tuning.job.succeeded"] The type of the event. Always `fine_tuning.job.succeeded`. + # @param type [Symbol, :"fine_tuning.job.succeeded"] + # The type of the event. Always `fine_tuning.job.succeeded`. # @see OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::FineTuningJobSucceededWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the fine-tuning job. + # @param id [String] + # The unique ID of the fine-tuning job. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb b/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb index e2257fd81..d27a01f64 100644 --- a/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +++ b/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb @@ -35,22 +35,24 @@ class LiveCallIncomingWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"live.call.incoming") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent} for more details. - # # Sent when an incoming API SIP session is available for Live acceptance. The same # pending session can also emit `realtime.call.incoming`; the first successful # Realtime or Live accept endpoint selects the runtime surface. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the event was created. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the event was created. # - # @param data [OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"live.call.incoming"] The type of the event. Always `live.call.incoming`. + # @param type [Symbol, :"live.call.incoming"] + # The type of the event. Always `live.call.incoming`. # @see OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -62,7 +64,9 @@ class Data < OpenAI::Internal::Type::BaseModel required :session_id, String # @!attribute sip_headers - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. # # @return [Array] required( @@ -71,15 +75,16 @@ class Data < OpenAI::Internal::Type::BaseModel ) # @!method initialize(session_id:, sip_headers:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Data} for more details. - # # Event data payload. # - # @param session_id [String] The `live_...` ID of the pending SIP session. Forward this value + # @param session_id [String] + # The `live_...` ID of the pending SIP session. Forward this value unchanged when + # accepting or rejecting the call through the Live API. # - # @param sip_headers [Array] Headers from the SIP Invite. - + # @param sip_headers [Array] + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. class SipHeader < OpenAI::Internal::Type::BaseModel # @!attribute name # Name of the SIP Header. @@ -94,15 +99,13 @@ class SipHeader < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(name:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader} for - # more details. - # # A header from the SIP Invite. # - # @param name [String] Name of the SIP Header. + # @param name [String] + # Name of the SIP Header. # - # @param value [String] Value of the SIP Header. + # @param value [String] + # Value of the SIP Header. end end diff --git a/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb b/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb index 7c6dcd673..5384e766e 100644 --- a/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +++ b/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb @@ -35,22 +35,24 @@ class RealtimeCallIncomingWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::RealtimeCallIncomingWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"realtime.call.incoming") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent} for more details. - # # Sent when an incoming API SIP session is available for Realtime acceptance. The # same pending session can also emit `live.call.incoming`; the first successful # Realtime or Live accept endpoint selects the runtime surface. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the model response was completed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the model response was completed. # - # @param data [OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"realtime.call.incoming"] The type of the event. Always `realtime.call.incoming`. + # @param type [Symbol, :"realtime.call.incoming"] + # The type of the event. Always `realtime.call.incoming`. # @see OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -64,7 +66,9 @@ class Data < OpenAI::Internal::Type::BaseModel required :call_id, String # @!attribute sip_headers - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. # # @return [Array] required( @@ -73,16 +77,18 @@ class Data < OpenAI::Internal::Type::BaseModel ) # @!method initialize(call_id:, sip_headers:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param call_id [String] The Transceiver `rtc_...` ID of the pending SIP session. The paired + # @param call_id [String] + # The Transceiver `rtc_...` ID of the pending SIP session. The paired + # `live.call.incoming` event derives its `session_id` by replacing the `rtc_` + # prefix with `live_`. Use the ID returned by the event with the corresponding + # Realtime or Live API. # - # @param sip_headers [Array] Headers from the SIP Invite. - + # @param sip_headers [Array] + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. class SipHeader < OpenAI::Internal::Type::BaseModel # @!attribute name # Name of the SIP Header. @@ -97,15 +103,13 @@ class SipHeader < OpenAI::Internal::Type::BaseModel required :value, String # @!method initialize(name:, value:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::RealtimeCallIncomingWebhookEvent::Data::SipHeader} - # for more details. - # # A header from the SIP Invite. # - # @param name [String] Name of the SIP Header. + # @param name [String] + # Name of the SIP Header. # - # @param value [String] Value of the SIP Header. + # @param value [String] + # Value of the SIP Header. end end diff --git a/lib/openai/models/webhooks/response_cancelled_webhook_event.rb b/lib/openai/models/webhooks/response_cancelled_webhook_event.rb index 8e3d06322..ace2fe9c9 100644 --- a/lib/openai/models/webhooks/response_cancelled_webhook_event.rb +++ b/lib/openai/models/webhooks/response_cancelled_webhook_event.rb @@ -35,20 +35,22 @@ class ResponseCancelledWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::ResponseCancelledWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"response.cancelled") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent} for more details. - # # Sent when a background response has been cancelled. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the model response was cancelled. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the model response was cancelled. # - # @param data [OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"response.cancelled"] The type of the event. Always `response.cancelled`. + # @param type [Symbol, :"response.cancelled"] + # The type of the event. Always `response.cancelled`. # @see OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseCancelledWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the model response. + # @param id [String] + # The unique ID of the model response. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/response_completed_webhook_event.rb b/lib/openai/models/webhooks/response_completed_webhook_event.rb index 9228af45f..38742bbc3 100644 --- a/lib/openai/models/webhooks/response_completed_webhook_event.rb +++ b/lib/openai/models/webhooks/response_completed_webhook_event.rb @@ -35,20 +35,22 @@ class ResponseCompletedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::ResponseCompletedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"response.completed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent} for more details. - # # Sent when a background response has been completed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the model response was completed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the model response was completed. # - # @param data [OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"response.completed"] The type of the event. Always `response.completed`. + # @param type [Symbol, :"response.completed"] + # The type of the event. Always `response.completed`. # @see OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseCompletedWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the model response. + # @param id [String] + # The unique ID of the model response. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/response_failed_webhook_event.rb b/lib/openai/models/webhooks/response_failed_webhook_event.rb index fe54ea51e..035ce7de3 100644 --- a/lib/openai/models/webhooks/response_failed_webhook_event.rb +++ b/lib/openai/models/webhooks/response_failed_webhook_event.rb @@ -35,20 +35,22 @@ class ResponseFailedWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::ResponseFailedWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"response.failed") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseFailedWebhookEvent} for more details. - # # Sent when a background response has failed. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the model response failed. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the model response failed. # - # @param data [OpenAI::Models::Webhooks::ResponseFailedWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::ResponseFailedWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::ResponseFailedWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::ResponseFailedWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"response.failed"] The type of the event. Always `response.failed`. + # @param type [Symbol, :"response.failed"] + # The type of the event. Always `response.failed`. # @see OpenAI::Models::Webhooks::ResponseFailedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,12 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseFailedWebhookEvent::Data} for more details. - # # Event data payload. # - # @param id [String] The unique ID of the model response. + # @param id [String] + # The unique ID of the model response. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/response_incomplete_webhook_event.rb b/lib/openai/models/webhooks/response_incomplete_webhook_event.rb index 9dcecc9e1..4ab91da0e 100644 --- a/lib/openai/models/webhooks/response_incomplete_webhook_event.rb +++ b/lib/openai/models/webhooks/response_incomplete_webhook_event.rb @@ -35,20 +35,22 @@ class ResponseIncompleteWebhookEvent < OpenAI::Internal::Type::BaseModel optional :object, enum: -> { OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object } # @!method initialize(id:, created_at:, data:, object: nil, type: :"response.incomplete") - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent} for more details. - # # Sent when a background response has been interrupted. # - # @param id [String] The unique ID of the event. + # @param id [String] + # The unique ID of the event. # - # @param created_at [Integer] The Unix timestamp (in seconds) of when the model response was interrupted. + # @param created_at [Integer] + # The Unix timestamp (in seconds) of when the model response was interrupted. # - # @param data [OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent::Data] Event data payload. + # @param data [OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent::Data] + # Event data payload. # - # @param object [Symbol, OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent::Object] The object of the event. Always `event`. + # @param object [Symbol, OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent::Object] + # The object of the event. Always `event`. # - # @param type [Symbol, :"response.incomplete"] The type of the event. Always `response.incomplete`. + # @param type [Symbol, :"response.incomplete"] + # The type of the event. Always `response.incomplete`. # @see OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -59,13 +61,10 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Webhooks::ResponseIncompleteWebhookEvent::Data} for more - # details. - # # Event data payload. # - # @param id [String] The unique ID of the model response. + # @param id [String] + # The unique ID of the model response. end # The object of the event. Always `event`. diff --git a/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb b/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb index 1303f77e7..67082d336 100644 --- a/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb +++ b/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb @@ -36,15 +36,19 @@ class SafetyAlertCreatedWebhookEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, data:, object: :event, type: :"safety.alert.created") # Sent when an approved safety alert is available for an API project. # - # @param id [String] The unique ID of the webhook event. + # @param id [String] + # The unique ID of the webhook event. # - # @param created_at [Integer] The Unix timestamp in seconds when the event was created. + # @param created_at [Integer] + # The Unix timestamp in seconds when the event was created. # # @param data [OpenAI::Models::Webhooks::SafetyAlertCreatedWebhookEvent::Data] # - # @param object [Symbol, :event] Always `event`. + # @param object [Symbol, :event] + # Always `event`. # - # @param type [Symbol, :"safety.alert.created"] Always `safety.alert.created`. + # @param type [Symbol, :"safety.alert.created"] + # Always `safety.alert.created`. # @see OpenAI::Models::Webhooks::SafetyAlertCreatedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -55,7 +59,8 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # @param id [String] The safety alert ID to pass to `GET /v1/safety/alerts/{id}`. + # @param id [String] + # The safety alert ID to pass to `GET /v1/safety/alerts/{id}`. end end end diff --git a/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb b/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb index bf871f2ee..0e1f4f7d3 100644 --- a/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb +++ b/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb @@ -36,15 +36,19 @@ class SafetyOrgAlertCreatedWebhookEvent < OpenAI::Internal::Type::BaseModel # @!method initialize(id:, created_at:, data:, object: :event, type: :"safety.org_alert.created") # Sent when an approved safety alert is available for an enterprise workspace. # - # @param id [String] The unique ID of the webhook event. + # @param id [String] + # The unique ID of the webhook event. # - # @param created_at [Integer] The Unix timestamp in seconds when the event was created. + # @param created_at [Integer] + # The Unix timestamp in seconds when the event was created. # # @param data [OpenAI::Models::Webhooks::SafetyOrgAlertCreatedWebhookEvent::Data] # - # @param object [Symbol, :event] Always `event`. + # @param object [Symbol, :event] + # Always `event`. # - # @param type [Symbol, :"safety.org_alert.created"] Always `safety.org_alert.created`. + # @param type [Symbol, :"safety.org_alert.created"] + # Always `safety.org_alert.created`. # @see OpenAI::Models::Webhooks::SafetyOrgAlertCreatedWebhookEvent#data class Data < OpenAI::Internal::Type::BaseModel @@ -55,7 +59,8 @@ class Data < OpenAI::Internal::Type::BaseModel required :id, String # @!method initialize(id:) - # @param id [String] The safety alert ID to pass to `GET /v1/safety/alerts/{id}`. + # @param id [String] + # The safety alert ID to pass to `GET /v1/safety/alerts/{id}`. end end end diff --git a/lib/openai/resources/admin/organization/admin_api_keys.rb b/lib/openai/resources/admin/organization/admin_api_keys.rb index fa736dee0..0b9d7fb77 100644 --- a/lib/openai/resources/admin/organization/admin_api_keys.rb +++ b/lib/openai/resources/admin/organization/admin_api_keys.rb @@ -5,16 +5,15 @@ module Resources class Admin class Organization class AdminAPIKeys - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AdminAPIKeyCreateParams} for more details. - # # Create an organization admin API key # # @overload create(name:, expires_in_seconds: nil, request_options: {}) # # @param name [String] # - # @param expires_in_seconds [Integer] The number of seconds until the API key expires. Omit this field for a key that + # @param expires_in_seconds [Integer] + # The number of seconds until the API key expires. Omit this field for a key that + # does not expire. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -37,7 +36,8 @@ def create(params) # # @overload retrieve(key_id, request_options: {}) # - # @param key_id [String] The ID of the API key. + # @param key_id [String] + # The ID of the API key. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -58,11 +58,14 @@ def retrieve(key_id, params = {}) # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String, nil] Return keys with IDs that come after this ID in the pagination order. + # @param after [String, nil] + # Return keys with IDs that come after this ID in the pagination order. # - # @param limit [Integer] Maximum number of keys to return. + # @param limit [Integer] + # Maximum number of keys to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::AdminAPIKeyListParams::Order] Order results by creation time, ascending or descending. + # @param order [Symbol, OpenAI::Models::Admin::Organization::AdminAPIKeyListParams::Order] + # Order results by creation time, ascending or descending. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -87,7 +90,8 @@ def list(params = {}) # # @overload delete(key_id, request_options: {}) # - # @param key_id [String] The ID of the API key to be deleted. + # @param key_id [String] + # The ID of the API key to be deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/audit_logs.rb b/lib/openai/resources/admin/organization/audit_logs.rb index 7607073fb..91dd91996 100644 --- a/lib/openai/resources/admin/organization/audit_logs.rb +++ b/lib/openai/resources/admin/organization/audit_logs.rb @@ -6,32 +6,54 @@ class Admin class Organization # List user actions and configuration changes within this organization. class AuditLogs - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::AuditLogListParams} for more details. - # # List user actions and configuration changes within this organization. # # @overload list(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, tenant_only: nil, request_options: {}) # - # @param actor_emails [Array] Return only events performed by users with these emails. - # - # @param actor_ids [Array] Return only events performed by these actors. Can be a user ID, a service accoun - # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place - # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place - # - # @param effective_at [OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt] Return only events whose `effective_at` (Unix seconds) is in this range. - # - # @param event_types [Array] Return only events with a `type` in one of these values. For example, `project.c - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 - # - # @param project_ids [Array] Return only events for these projects. - # - # @param resource_ids [Array] Return only events performed on these targets. For example, a project ID updated - # - # @param tenant_only [Boolean] Return only tenant-scoped events associated with this organization. Required for + # @param actor_emails [Array] + # Return only events performed by users with these emails. + # + # @param actor_ids [Array] + # Return only events performed by these actors. Can be a user ID, a service + # account ID, or an api key tracking ID. + # + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. + # + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. + # + # @param effective_at [OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt] + # Return only events whose `effective_at` (Unix seconds) is in this range. + # + # @param event_types [Array] + # Return only events with a `type` in one of these values. For example, + # `project.created`. For all options, see the documentation for the + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). + # + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. + # + # @param project_ids [Array] + # Return only events for these projects. + # + # @param resource_ids [Array] + # Return only events performed on these targets. For example, a project ID + # updated. For ChatGPT connector role events, use the workspace connector resource + # ID shown in `details.id`, such as `__`. + # + # @param tenant_only [Boolean] + # Return only tenant-scoped events associated with this organization. Required for + # tenant-scoped events such as `role.bound_to_resource` and + # `role.unbound_from_resource`. When `true`, all supplied event types must be + # tenant-scoped. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/certificates.rb b/lib/openai/resources/admin/organization/certificates.rb index c40c47506..17e1b2d6c 100644 --- a/lib/openai/resources/admin/organization/certificates.rb +++ b/lib/openai/resources/admin/organization/certificates.rb @@ -12,9 +12,11 @@ class Certificates # # @overload create(certificate:, name: nil, request_options: {}) # - # @param certificate [String] The certificate content in PEM format + # @param certificate [String] + # The certificate content in PEM format # - # @param name [String] An optional name for the certificate + # @param name [String] + # An optional name for the certificate # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -33,19 +35,18 @@ def create(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::CertificateRetrieveParams} for more - # details. - # # Get a certificate that has been uploaded to the organization. # # You can get a certificate regardless of whether it is active or not. # # @overload retrieve(certificate_id, include: nil, request_options: {}) # - # @param certificate_id [String] Unique ID of the certificate to retrieve. + # @param certificate_id [String] + # Unique ID of the certificate to retrieve. # - # @param include [Array] A list of additional fields to include in the response. Currently the only suppo + # @param include [Array] + # A list of additional fields to include in the response. Currently the only + # supported value is `content` to fetch the PEM content of the certificate. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -69,9 +70,11 @@ def retrieve(certificate_id, params = {}) # # @overload update(certificate_id, name: nil, request_options: {}) # - # @param certificate_id [String] Unique ID of the certificate to modify. + # @param certificate_id [String] + # Unique ID of the certificate to modify. # - # @param name [String] The updated name for the certificate + # @param name [String] + # The updated name for the certificate # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -90,18 +93,23 @@ def update(certificate_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::CertificateListParams} for more details. - # # List uploaded certificates for this organization. # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::CertificateListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Admin::Organization::CertificateListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -128,7 +136,8 @@ def list(params = {}) # # @overload delete(certificate_id, request_options: {}) # - # @param certificate_id [String] Unique ID of the certificate to delete. + # @param certificate_id [String] + # Unique ID of the certificate to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/data_retention.rb b/lib/openai/resources/admin/organization/data_retention.rb index 902c7c71d..d7ad93c63 100644 --- a/lib/openai/resources/admin/organization/data_retention.rb +++ b/lib/openai/resources/admin/organization/data_retention.rb @@ -28,7 +28,8 @@ def retrieve(params = {}) # # @overload update(retention_type:, request_options: {}) # - # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::DataRetentionUpdateParams::RetentionType] The desired organization data retention type. + # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::DataRetentionUpdateParams::RetentionType] + # The desired organization data retention type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/groups.rb b/lib/openai/resources/admin/organization/groups.rb index 592e09bda..7fd65886c 100644 --- a/lib/openai/resources/admin/organization/groups.rb +++ b/lib/openai/resources/admin/organization/groups.rb @@ -15,7 +15,8 @@ class Groups # # @overload create(name:, request_options: {}) # - # @param name [String] Human readable name for the group. + # @param name [String] + # Human readable name for the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -38,7 +39,8 @@ def create(params) # # @overload retrieve(group_id, request_options: {}) # - # @param group_id [String] The ID of the group to retrieve. + # @param group_id [String] + # The ID of the group to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,9 +61,11 @@ def retrieve(group_id, params = {}) # # @overload update(group_id, name:, request_options: {}) # - # @param group_id [String] The ID of the group to update. + # @param group_id [String] + # The ID of the group to update. # - # @param name [String] New display name for the group. + # @param name [String] + # New display name for the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -80,18 +84,22 @@ def update(group_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::GroupListParams} for more details. - # # Lists all groups in the organization. # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is a group ID that defines your place in + # @param after [String] + # A cursor for use in pagination. `after` is a group ID that defines your place in + # the list. For instance, if you make a list request and receive 100 objects, + # ending with group_abc, your subsequent call can include `after=group_abc` in + # order to fetch the next page of the list. # - # @param limit [Integer] A limit on the number of groups to be returned. Limit can range between 0 and 10 + # @param limit [Integer] + # A limit on the number of groups to be returned. Limit can range between 0 and + # 1000, and the default is 100. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::GroupListParams::Order] Specifies the sort order of the returned groups. + # @param order [Symbol, OpenAI::Models::Admin::Organization::GroupListParams::Order] + # Specifies the sort order of the returned groups. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -116,7 +124,8 @@ def list(params = {}) # # @overload delete(group_id, request_options: {}) # - # @param group_id [String] The ID of the group to delete. + # @param group_id [String] + # The ID of the group to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/groups/roles.rb b/lib/openai/resources/admin/organization/groups/roles.rb index 65e34d935..bcd0a24c4 100644 --- a/lib/openai/resources/admin/organization/groups/roles.rb +++ b/lib/openai/resources/admin/organization/groups/roles.rb @@ -10,9 +10,11 @@ class Roles # # @overload create(group_id, role_id:, request_options: {}) # - # @param group_id [String] The ID of the group that should receive the organization role. + # @param group_id [String] + # The ID of the group that should receive the organization role. # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -35,9 +37,11 @@ def create(group_id, params) # # @overload retrieve(role_id, group_id:, request_options: {}) # - # @param role_id [String] The ID of the organization role to retrieve for the group. + # @param role_id [String] + # The ID of the organization role to retrieve for the group. # - # @param group_id [String] The ID of the group to inspect. + # @param group_id [String] + # The ID of the group to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,20 +63,22 @@ def retrieve(role_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Groups::RoleListParams} for more details. - # # Lists the organization roles assigned to a group within the organization. # # @overload list(group_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param group_id [String] The ID of the group whose organization role assignments you want to list. + # @param group_id [String] + # The ID of the group whose organization role assignments you want to list. # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing organization roles. # - # @param limit [Integer] A limit on the number of organization role assignments to return. + # @param limit [Integer] + # A limit on the number of organization role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::RoleListParams::Order] Sort order for the returned organization roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::RoleListParams::Order] + # Sort order for the returned organization roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -97,9 +103,11 @@ def list(group_id, params = {}) # # @overload delete(role_id, group_id:, request_options: {}) # - # @param role_id [String] The ID of the organization role to remove from the group. + # @param role_id [String] + # The ID of the organization role to remove from the group. # - # @param group_id [String] The ID of the group to modify. + # @param group_id [String] + # The ID of the group to modify. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/groups/users.rb b/lib/openai/resources/admin/organization/groups/users.rb index ca873e74a..b2168acdc 100644 --- a/lib/openai/resources/admin/organization/groups/users.rb +++ b/lib/openai/resources/admin/organization/groups/users.rb @@ -10,9 +10,11 @@ class Users # # @overload create(group_id, user_id:, request_options: {}) # - # @param group_id [String] The ID of the group to update. + # @param group_id [String] + # The ID of the group to update. # - # @param user_id [String] Identifier of the user to add to the group. + # @param user_id [String] + # Identifier of the user to add to the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -35,9 +37,11 @@ def create(group_id, params) # # @overload retrieve(user_id, group_id:, request_options: {}) # - # @param user_id [String] The ID of the user to retrieve from the group. + # @param user_id [String] + # The ID of the user to retrieve from the group. # - # @param group_id [String] The ID of the group to inspect. + # @param group_id [String] + # The ID of the group to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,20 +63,23 @@ def retrieve(user_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Groups::UserListParams} for more details. - # # Lists the users assigned to a group. # # @overload list(group_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param group_id [String] The ID of the group to inspect. + # @param group_id [String] + # The ID of the group to inspect. # - # @param after [String] A cursor for use in pagination. Provide the ID of the last user from the previou + # @param after [String] + # A cursor for use in pagination. Provide the ID of the last user from the + # previous list response to retrieve the next page. # - # @param limit [Integer] A limit on the number of users to be returned. Limit can range between 0 and 100 + # @param limit [Integer] + # A limit on the number of users to be returned. Limit can range between 0 and + # 1000, and the default is 100. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::UserListParams::Order] Specifies the sort order of users in the list. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Groups::UserListParams::Order] + # Specifies the sort order of users in the list. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -97,9 +104,11 @@ def list(group_id, params = {}) # # @overload delete(user_id, group_id:, request_options: {}) # - # @param user_id [String] The ID of the user to remove from the group. + # @param user_id [String] + # The ID of the user to remove from the group. # - # @param group_id [String] The ID of the group to update. + # @param group_id [String] + # The ID of the group to update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/invites.rb b/lib/openai/resources/admin/organization/invites.rb index c1c7bbc9d..45ad11347 100644 --- a/lib/openai/resources/admin/organization/invites.rb +++ b/lib/openai/resources/admin/organization/invites.rb @@ -5,19 +5,22 @@ module Resources class Admin class Organization class Invites - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::InviteCreateParams} for more details. - # # Create an invite for a user to the organization. The invite must be accepted by # the user before they have access to the organization. # # @overload create(email:, role:, projects: nil, request_options: {}) # - # @param email [String] Send an email to this address + # @param email [String] + # Send an email to this address # - # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Role] `owner` or `reader` + # @param role [Symbol, OpenAI::Models::Admin::Organization::InviteCreateParams::Role] + # `owner` or `reader` # - # @param projects [Array] An array of projects to which membership is granted at the same time the org inv + # @param projects [Array] + # An array of projects to which membership is granted at the same time the org + # invite is accepted. If omitted, the user will be invited to the default project + # for compatibility with legacy behavior. If empty list is passed, the user will + # not be invited to any projects, including the default one. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -40,7 +43,8 @@ def create(params) # # @overload retrieve(invite_id, request_options: {}) # - # @param invite_id [String] The ID of the invite to retrieve. + # @param invite_id [String] + # The ID of the invite to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -57,16 +61,19 @@ def retrieve(invite_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::InviteListParams} for more details. - # # Returns a list of invites in the organization. # # @overload list(after: nil, limit: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -91,7 +98,8 @@ def list(params = {}) # # @overload delete(invite_id, request_options: {}) # - # @param invite_id [String] The ID of the invite to delete. + # @param invite_id [String] + # The ID of the invite to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects.rb b/lib/openai/resources/admin/organization/projects.rb index 361bc619f..b90ae1aeb 100644 --- a/lib/openai/resources/admin/organization/projects.rb +++ b/lib/openai/resources/admin/organization/projects.rb @@ -41,21 +41,30 @@ class Projects # @return [OpenAI::Resources::Admin::Organization::Projects::Certificates] attr_reader :certificates - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectCreateParams} for more details. - # # Create a new project in the organization. Projects can be created and archived, # but cannot be deleted. # # @overload create(name:, external_key_id: nil, geography: nil, residency: nil, request_options: {}) # - # @param name [String] The friendly name of the project, this name appears in reports. + # @param name [String] + # The friendly name of the project, this name appears in reports. # - # @param external_key_id [String, nil] External key ID to associate with the project. + # @param external_key_id [String, nil] + # External key ID to associate with the project. # - # @param geography [String, nil] Create the project with the specified data residency region. Your organization m + # @param geography [String, nil] + # Create the project with the specified data residency region. Your organization + # must have access to Data residency functionality in order to use. See + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) + # to review the functionality and limitations of setting this field. Deprecated: + # use `residency` instead. Do not provide both `geography` and `residency`. # - # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency, nil] Create the project with the specified residency configuration. Your organization + # @param residency [Symbol, OpenAI::Models::Admin::Organization::ProjectResidency, nil] + # Create the project with the specified residency configuration. Your organization + # must have access to the requested residency configuration in order to use it. + # See + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) + # to review the functionality and limitations of setting this field. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -78,7 +87,8 @@ def create(params) # # @overload retrieve(project_id, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -95,20 +105,22 @@ def retrieve(project_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectUpdateParams} for more details. - # # Modifies a project in the organization. # # @overload update(project_id, external_key_id: nil, geography: nil, name: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param external_key_id [String, nil] External key ID to associate with the project. + # @param external_key_id [String, nil] + # External key ID to associate with the project. # - # @param geography [String, nil] Geography for the project. + # @param geography [String, nil] + # Geography for the project. Deprecated: use `residency` when creating a project + # to configure data residency. This field is retained for backward compatibility. # - # @param name [String, nil] The updated name of the project, this name appears in reports. + # @param name [String, nil] + # The updated name of the project, this name appears in reports. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -127,18 +139,23 @@ def update(project_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::ProjectListParams} for more details. - # # Returns a list of projects. # # @overload list(after: nil, include_archived: nil, limit: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param include_archived [Boolean] If `true` returns all projects including those that have been `archived`. Archiv + # @param include_archived [Boolean] + # If `true` returns all projects including those that have been `archived`. + # Archived projects are not included by default. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -164,7 +181,8 @@ def list(params = {}) # # @overload archive(project_id, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/api_keys.rb b/lib/openai/resources/admin/organization/projects/api_keys.rb index 6b0b4b6fa..97bc2f51e 100644 --- a/lib/openai/resources/admin/organization/projects/api_keys.rb +++ b/lib/openai/resources/admin/organization/projects/api_keys.rb @@ -10,9 +10,11 @@ class APIKeys # # @overload retrieve(api_key_id, project_id:, request_options: {}) # - # @param api_key_id [String] The ID of the API key. + # @param api_key_id [String] + # The ID of the API key. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -34,21 +36,29 @@ def retrieve(api_key_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::APIKeyListParams} for more - # details. - # # Returns a list of API keys in the project. # # @overload list(project_id, after: nil, limit: nil, owner_project_access: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::APIKeyListParams::OwnerProjectAccess] Filter API keys by whether the owner currently has effective access to the proje + # @param owner_project_access [Symbol, OpenAI::Models::Admin::Organization::Projects::APIKeyListParams::OwnerProjectAccess] + # Filter API keys by whether the owner currently has effective access to the + # project. Use `active` for owners with access, `inactive` for owners without + # access, or `any` for all enabled project API keys. If omitted, the endpoint + # applies its existing membership-based visibility rules, which may exclude some + # enabled keys. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -76,9 +86,11 @@ def list(project_id, params = {}) # # @overload delete(api_key_id, project_id:, request_options: {}) # - # @param api_key_id [String] The ID of the API key. + # @param api_key_id [String] + # The ID of the API key. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/certificates.rb b/lib/openai/resources/admin/organization/projects/certificates.rb index 882c0c6bb..903e57a40 100644 --- a/lib/openai/resources/admin/organization/projects/certificates.rb +++ b/lib/openai/resources/admin/organization/projects/certificates.rb @@ -6,21 +6,26 @@ class Admin class Organization class Projects class Certificates - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::CertificateListParams} for more - # details. - # # List certificates for this project. # # @overload list(project_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::CertificateListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::CertificateListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -47,7 +52,8 @@ def list(project_id, params = {}) # # @overload activate(project_id, certificate_ids:, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param certificate_ids [Array] # @@ -74,7 +80,8 @@ def activate(project_id, params) # # @overload deactivate(project_id, certificate_ids:, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param certificate_ids [Array] # diff --git a/lib/openai/resources/admin/organization/projects/data_retention.rb b/lib/openai/resources/admin/organization/projects/data_retention.rb index e19790674..2fc8e91a6 100644 --- a/lib/openai/resources/admin/organization/projects/data_retention.rb +++ b/lib/openai/resources/admin/organization/projects/data_retention.rb @@ -10,7 +10,8 @@ class DataRetention # # @overload retrieve(project_id, request_options: {}) # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -31,9 +32,11 @@ def retrieve(project_id, params = {}) # # @overload update(project_id, retention_type:, request_options: {}) # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # - # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::Projects::DataRetentionUpdateParams::RetentionType] The desired project data retention type. + # @param retention_type [Symbol, OpenAI::Models::Admin::Organization::Projects::DataRetentionUpdateParams::RetentionType] + # The desired project data retention type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/groups.rb b/lib/openai/resources/admin/organization/projects/groups.rb index 691e994fd..ff64e00fb 100644 --- a/lib/openai/resources/admin/organization/projects/groups.rb +++ b/lib/openai/resources/admin/organization/projects/groups.rb @@ -13,11 +13,14 @@ class Groups # # @overload create(project_id, group_id:, role:, request_options: {}) # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # - # @param group_id [String] Identifier of the group to add to the project. + # @param group_id [String] + # Identifier of the group to add to the project. # - # @param role [String] Identifier of the project role to grant to the group. + # @param role [String] + # Identifier of the project role to grant to the group. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -40,11 +43,14 @@ def create(project_id, params) # # @overload retrieve(group_id, project_id:, group_type: nil, request_options: {}) # - # @param group_id [String] Path param: The ID of the group to retrieve. + # @param group_id [String] + # Path param: The ID of the group to retrieve. # - # @param project_id [String] Path param: The ID of the project to inspect. + # @param project_id [String] + # Path param: The ID of the project to inspect. # - # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupRetrieveParams::GroupType] Query param: The type of group to retrieve. + # @param group_type [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupRetrieveParams::GroupType] + # Query param: The type of group to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -68,21 +74,22 @@ def retrieve(group_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::GroupListParams} for more - # details. - # # Lists the groups that have access to a project. # # @overload list(project_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # - # @param after [String] Cursor for pagination. Provide the ID of the last group from the previous respon + # @param after [String] + # Cursor for pagination. Provide the ID of the last group from the previous + # response to fetch the next page. # - # @param limit [Integer] A limit on the number of project groups to return. Defaults to 20. + # @param limit [Integer] + # A limit on the number of project groups to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupListParams::Order] Sort order for the returned groups. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::GroupListParams::Order] + # Sort order for the returned groups. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -107,9 +114,11 @@ def list(project_id, params = {}) # # @overload delete(group_id, project_id:, request_options: {}) # - # @param group_id [String] The ID of the group to remove from the project. + # @param group_id [String] + # The ID of the group to remove from the project. # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/groups/roles.rb b/lib/openai/resources/admin/organization/projects/groups/roles.rb index 439d31db0..08525dc9a 100644 --- a/lib/openai/resources/admin/organization/projects/groups/roles.rb +++ b/lib/openai/resources/admin/organization/projects/groups/roles.rb @@ -11,11 +11,14 @@ class Roles # # @overload create(group_id, project_id:, role_id:, request_options: {}) # - # @param group_id [String] Path param: The ID of the group that should receive the project role. + # @param group_id [String] + # Path param: The ID of the group that should receive the project role. # - # @param project_id [String] Path param: The ID of the project to update. + # @param project_id [String] + # Path param: The ID of the project to update. # - # @param role_id [String] Body param: Identifier of the role to assign. + # @param role_id [String] + # Body param: Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -42,11 +45,14 @@ def create(group_id, params) # # @overload retrieve(role_id, project_id:, group_id:, request_options: {}) # - # @param role_id [String] The ID of the project role to retrieve for the group. + # @param role_id [String] + # The ID of the project role to retrieve for the group. # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # - # @param group_id [String] The ID of the group to inspect. + # @param group_id [String] + # The ID of the group to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -72,23 +78,25 @@ def retrieve(role_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams} for more - # details. - # # Lists the project roles assigned to a group within a project. # # @overload list(group_id, project_id:, after: nil, limit: nil, order: nil, request_options: {}) # - # @param group_id [String] Path param: The ID of the group to inspect. + # @param group_id [String] + # Path param: The ID of the group to inspect. # - # @param project_id [String] Path param: The ID of the project to inspect. + # @param project_id [String] + # Path param: The ID of the project to inspect. # - # @param after [String] Query param: Cursor for pagination. Provide the value from the previous response + # @param after [String] + # Query param: Cursor for pagination. Provide the value from the previous + # response's `next` field to continue listing project roles. # - # @param limit [Integer] Query param: A limit on the number of project role assignments to return. + # @param limit [Integer] + # Query param: A limit on the number of project role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams::Order] Query param: Sort order for the returned project roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Groups::RoleListParams::Order] + # Query param: Sort order for the returned project roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -117,11 +125,14 @@ def list(group_id, params) # # @overload delete(role_id, project_id:, group_id:, request_options: {}) # - # @param role_id [String] The ID of the project role to remove from the group. + # @param role_id [String] + # The ID of the project role to remove from the group. # - # @param project_id [String] The ID of the project to modify. + # @param project_id [String] + # The ID of the project to modify. # - # @param group_id [String] The ID of the group whose project role assignment should be removed. + # @param group_id [String] + # The ID of the group whose project role assignment should be removed. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/hosted_tool_permissions.rb b/lib/openai/resources/admin/organization/projects/hosted_tool_permissions.rb index d0d7b6b35..35d924912 100644 --- a/lib/openai/resources/admin/organization/projects/hosted_tool_permissions.rb +++ b/lib/openai/resources/admin/organization/projects/hosted_tool_permissions.rb @@ -10,7 +10,8 @@ class HostedToolPermissions # # @overload retrieve(project_id, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -31,17 +32,23 @@ def retrieve(project_id, params = {}) # # @overload update(project_id, code_interpreter: nil, file_search: nil, image_generation: nil, mcp: nil, web_search: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::CodeInterpreter, nil] The code interpreter permission update. + # @param code_interpreter [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::CodeInterpreter, nil] + # The code interpreter permission update. # - # @param file_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::FileSearch, nil] The file search permission update. + # @param file_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::FileSearch, nil] + # The file search permission update. # - # @param image_generation [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::ImageGeneration, nil] The image generation permission update. + # @param image_generation [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::ImageGeneration, nil] + # The image generation permission update. # - # @param mcp [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::Mcp, nil] The MCP permission update. + # @param mcp [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::Mcp, nil] + # The MCP permission update. # - # @param web_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::WebSearch, nil] The web search permission update. + # @param web_search [OpenAI::Models::Admin::Organization::Projects::HostedToolPermissionUpdateParams::WebSearch, nil] + # The web search permission update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/model_permissions.rb b/lib/openai/resources/admin/organization/projects/model_permissions.rb index efd9df816..3c5b09e6e 100644 --- a/lib/openai/resources/admin/organization/projects/model_permissions.rb +++ b/lib/openai/resources/admin/organization/projects/model_permissions.rb @@ -10,7 +10,8 @@ class ModelPermissions # # @overload retrieve(project_id, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -31,11 +32,14 @@ def retrieve(project_id, params = {}) # # @overload update(project_id, mode:, model_ids:, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ModelPermissionUpdateParams::Mode] The model permissions mode to apply. + # @param mode [Symbol, OpenAI::Models::Admin::Organization::Projects::ModelPermissionUpdateParams::Mode] + # The model permissions mode to apply. # - # @param model_ids [Array] The model IDs included in this permissions policy. + # @param model_ids [Array] + # The model IDs included in this permissions policy. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -58,7 +62,8 @@ def update(project_id, params) # # @overload delete(project_id, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/rate_limits.rb b/lib/openai/resources/admin/organization/projects/rate_limits.rb index 27487771b..9b563e834 100644 --- a/lib/openai/resources/admin/organization/projects/rate_limits.rb +++ b/lib/openai/resources/admin/organization/projects/rate_limits.rb @@ -6,21 +6,27 @@ class Admin class Organization class Projects class RateLimits - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::RateLimitListRateLimitsParams} - # for more details. - # # Returns the rate limits per model for a project. # # @overload list_rate_limits(project_id, after: nil, before: nil, limit: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # beginning with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. The default is 100. + # @param limit [Integer] + # A limit on the number of objects to be returned. The default is 100. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -43,29 +49,35 @@ def list_rate_limits(project_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::RateLimitUpdateRateLimitParams} - # for more details. - # # Updates a project rate limit. # # @overload update_rate_limit(rate_limit_id, project_id:, batch_1_day_max_input_tokens: nil, max_audio_megabytes_per_1_minute: nil, max_images_per_1_minute: nil, max_requests_per_1_day: nil, max_requests_per_1_minute: nil, max_tokens_per_1_minute: nil, request_options: {}) # - # @param rate_limit_id [String] Path param: The ID of the rate limit. + # @param rate_limit_id [String] + # Path param: The ID of the rate limit. # - # @param project_id [String] Path param: The ID of the project. + # @param project_id [String] + # Path param: The ID of the project. # - # @param batch_1_day_max_input_tokens [Integer] Body param: The maximum batch input tokens per day. Only relevant for certain mo + # @param batch_1_day_max_input_tokens [Integer] + # Body param: The maximum batch input tokens per day. Only relevant for certain + # models. # - # @param max_audio_megabytes_per_1_minute [Integer] Body param: The maximum audio megabytes per minute. Only relevant for certain mo + # @param max_audio_megabytes_per_1_minute [Integer] + # Body param: The maximum audio megabytes per minute. Only relevant for certain + # models. # - # @param max_images_per_1_minute [Integer] Body param: The maximum images per minute. Only relevant for certain models. + # @param max_images_per_1_minute [Integer] + # Body param: The maximum images per minute. Only relevant for certain models. # - # @param max_requests_per_1_day [Integer] Body param: The maximum requests per day. Only relevant for certain models. + # @param max_requests_per_1_day [Integer] + # Body param: The maximum requests per day. Only relevant for certain models. # - # @param max_requests_per_1_minute [Integer] Body param: The maximum requests per minute. + # @param max_requests_per_1_minute [Integer] + # Body param: The maximum requests per minute. # - # @param max_tokens_per_1_minute [Integer] Body param: The maximum tokens per minute. + # @param max_tokens_per_1_minute [Integer] + # Body param: The maximum tokens per minute. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/roles.rb b/lib/openai/resources/admin/organization/projects/roles.rb index e08a34ad1..883a796c9 100644 --- a/lib/openai/resources/admin/organization/projects/roles.rb +++ b/lib/openai/resources/admin/organization/projects/roles.rb @@ -10,13 +10,17 @@ class Roles # # @overload create(project_id, permissions:, role_name:, description: nil, request_options: {}) # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # - # @param permissions [Array] Permissions to grant to the role. + # @param permissions [Array] + # Permissions to grant to the role. # - # @param role_name [String] Unique name for the role. + # @param role_name [String] + # Unique name for the role. # - # @param description [String, nil] Optional description of the role. + # @param description [String, nil] + # Optional description of the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -39,9 +43,11 @@ def create(project_id, params) # # @overload retrieve(role_id, project_id:, request_options: {}) # - # @param role_id [String] The ID of the role to retrieve. + # @param role_id [String] + # The ID of the role to retrieve. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -67,15 +73,20 @@ def retrieve(role_id, params) # # @overload update(role_id, project_id:, description: nil, permissions: nil, role_name: nil, request_options: {}) # - # @param role_id [String] Path param: The ID of the role to update. + # @param role_id [String] + # Path param: The ID of the role to update. # - # @param project_id [String] Path param: The ID of the project to update. + # @param project_id [String] + # Path param: The ID of the project to update. # - # @param description [String, nil] Body param: New description for the role. + # @param description [String, nil] + # Body param: New description for the role. # - # @param permissions [Array, nil] Body param: Updated set of permissions for the role. + # @param permissions [Array, nil] + # Body param: Updated set of permissions for the role. # - # @param role_name [String, nil] Body param: New name for the role. + # @param role_name [String, nil] + # Body param: New name for the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -98,21 +109,22 @@ def update(role_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::RoleListParams} for more - # details. - # # Lists the roles configured for a project. # # @overload list(project_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing roles. # - # @param limit [Integer] A limit on the number of roles to return. Defaults to 1000. + # @param limit [Integer] + # A limit on the number of roles to return. Defaults to 1000. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::RoleListParams::Order] Sort order for the returned roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::RoleListParams::Order] + # Sort order for the returned roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -137,9 +149,11 @@ def list(project_id, params = {}) # # @overload delete(role_id, project_id:, request_options: {}) # - # @param role_id [String] The ID of the role to delete. + # @param role_id [String] + # The ID of the role to delete. # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/service_accounts.rb b/lib/openai/resources/admin/organization/projects/service_accounts.rb index 9cc9f7bde..161c5252b 100644 --- a/lib/openai/resources/admin/organization/projects/service_accounts.rb +++ b/lib/openai/resources/admin/organization/projects/service_accounts.rb @@ -12,13 +12,23 @@ class ServiceAccounts # Creates a new service account in the project. By default, this also returns an # unredacted API key for the service account. # - # @overload create(project_id, name:, create_service_account_only: nil, request_options: {}) + # @overload create(project_id, name:, create_service_account_only: nil, expires_in_seconds: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param name [String] The name of the service account being created. + # @param name [String] + # The name of the service account being created. # - # @param create_service_account_only [Boolean, nil] Create the service account without default roles or an API key. + # @param create_service_account_only [Boolean, nil] + # Create the service account without default roles or an API key. + # + # @param expires_in_seconds [Integer, nil] + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -41,9 +51,11 @@ def create(project_id, params) # # @overload retrieve(service_account_id, project_id:, request_options: {}) # - # @param service_account_id [String] The ID of the service account. + # @param service_account_id [String] + # The ID of the service account. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -69,13 +81,17 @@ def retrieve(service_account_id, params) # # @overload update(service_account_id, project_id:, name: nil, role: nil, request_options: {}) # - # @param service_account_id [String] Path param: The ID of the service account. + # @param service_account_id [String] + # Path param: The ID of the service account. # - # @param project_id [String] Path param: The ID of the project. + # @param project_id [String] + # Path param: The ID of the project. # - # @param name [String] Body param: The updated service account name. + # @param name [String] + # Body param: The updated service account name. # - # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountUpdateParams::Role] Body param: The updated service account role. + # @param role [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceAccountUpdateParams::Role] + # Body param: The updated service account role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -98,19 +114,22 @@ def update(service_account_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::ServiceAccountListParams} for - # more details. - # # Returns a list of service accounts in the project. # # @overload list(project_id, after: nil, limit: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -138,9 +157,11 @@ def list(project_id, params = {}) # # @overload delete(service_account_id, project_id:, request_options: {}) # - # @param service_account_id [String] The ID of the service account. + # @param service_account_id [String] + # The ID of the service account. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb b/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb index dd099aa9e..73a557b82 100644 --- a/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb +++ b/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb @@ -11,15 +11,20 @@ class APIKeys # # @overload create(service_account_id, project_id:, expires_in_seconds: nil, name: nil, scopes: nil, request_options: {}) # - # @param service_account_id [String] Path param: The ID of the service account. + # @param service_account_id [String] + # Path param: The ID of the service account. # - # @param project_id [String] Path param: The ID of the project. + # @param project_id [String] + # Path param: The ID of the project. # - # @param expires_in_seconds [Integer, nil] Body param: Number of seconds until the API key expires. + # @param expires_in_seconds [Integer, nil] + # Body param: Number of seconds until the API key expires. # - # @param name [String] Body param: API key name. + # @param name [String] + # Body param: API key name. # - # @param scopes [Array] Body param: API key scopes. + # @param scopes [Array] + # Body param: API key scopes. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/spend_alerts.rb b/lib/openai/resources/admin/organization/projects/spend_alerts.rb index a54318973..4d7edf0b7 100644 --- a/lib/openai/resources/admin/organization/projects/spend_alerts.rb +++ b/lib/openai/resources/admin/organization/projects/spend_alerts.rb @@ -10,15 +10,20 @@ class SpendAlerts # # @overload create(project_id, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertCreateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -41,9 +46,11 @@ def create(project_id, params) # # @overload retrieve(alert_id, project_id:, request_options: {}) # - # @param alert_id [String] The ID of the spend alert to retrieve. + # @param alert_id [String] + # The ID of the spend alert to retrieve. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -69,17 +76,23 @@ def retrieve(alert_id, params) # # @overload update(alert_id, project_id:, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # - # @param alert_id [String] Path param: The ID of the spend alert to update. + # @param alert_id [String] + # Path param: The ID of the spend alert to update. # - # @param project_id [String] Path param: The ID of the project to update. + # @param project_id [String] + # Path param: The ID of the project to update. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Currency] Body param: The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Currency] + # Body param: The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Interval] Body param: The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::Interval] + # Body param: The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel] Body param: Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel] + # Body param: Email notification settings for a spend alert. # - # @param threshold_amount [Integer] Body param: The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # Body param: The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -102,23 +115,26 @@ def update(alert_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams} for more - # details. - # # Lists project spend alerts. # # @overload list(project_id, after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # - # @param after [String] Cursor for pagination. Provide the ID of the last spend alert from the previous + # @param after [String] + # Cursor for pagination. Provide the ID of the last spend alert from the previous + # response to fetch the next page. # - # @param before [String] Cursor for pagination. Provide the ID of the first spend alert from the previous + # @param before [String] + # Cursor for pagination. Provide the ID of the first spend alert from the previous + # response to fetch the previous page. # - # @param limit [Integer] A limit on the number of spend alerts to return. Defaults to 20. + # @param limit [Integer] + # A limit on the number of spend alerts to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams::Order] Sort order for the returned spend alerts. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendAlertListParams::Order] + # Sort order for the returned spend alerts. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -143,9 +159,11 @@ def list(project_id, params = {}) # # @overload delete(alert_id, project_id:, request_options: {}) # - # @param alert_id [String] The ID of the spend alert to delete. + # @param alert_id [String] + # The ID of the spend alert to delete. # - # @param project_id [String] The ID of the project to update. + # @param project_id [String] + # The ID of the project to update. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/spend_limit.rb b/lib/openai/resources/admin/organization/projects/spend_limit.rb index 902f1d976..b42f9ec58 100644 --- a/lib/openai/resources/admin/organization/projects/spend_limit.rb +++ b/lib/openai/resources/admin/organization/projects/spend_limit.rb @@ -10,7 +10,8 @@ class SpendLimit # # @overload retrieve(project_id, request_options: {}) # - # @param project_id [String] The ID of the project whose hard spend limit is being managed. + # @param project_id [String] + # The ID of the project whose hard spend limit is being managed. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -27,21 +28,22 @@ def retrieve(project_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams} for more - # details. - # # Create or replace a project's hard spend limit. # # @overload update(project_id, currency:, interval:, threshold_amount:, request_options: {}) # - # @param project_id [String] The ID of the project whose hard spend limit is being managed. + # @param project_id [String] + # The ID of the project whose hard spend limit is being managed. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m + # @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -64,7 +66,8 @@ def update(project_id, params) # # @overload delete(project_id, request_options: {}) # - # @param project_id [String] The ID of the project whose hard spend limit is being managed. + # @param project_id [String] + # The ID of the project whose hard spend limit is being managed. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/users.rb b/lib/openai/resources/admin/organization/projects/users.rb index ea257297a..1df6efb36 100644 --- a/lib/openai/resources/admin/organization/projects/users.rb +++ b/lib/openai/resources/admin/organization/projects/users.rb @@ -14,13 +14,17 @@ class Users # # @overload create(project_id, role:, email: nil, user_id: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param role [String] `owner` or `member` + # @param role [String] + # `owner` or `member` # - # @param email [String, nil] Email of the user to add. + # @param email [String, nil] + # Email of the user to add. # - # @param user_id [String, nil] The ID of the user. + # @param user_id [String, nil] + # The ID of the user. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -43,9 +47,11 @@ def create(project_id, params) # # @overload retrieve(user_id, project_id:, request_options: {}) # - # @param user_id [String] The ID of the user. + # @param user_id [String] + # The ID of the user. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -71,11 +77,14 @@ def retrieve(user_id, params) # # @overload update(user_id, project_id:, role: nil, request_options: {}) # - # @param user_id [String] Path param: The ID of the user. + # @param user_id [String] + # Path param: The ID of the user. # - # @param project_id [String] Path param: The ID of the project. + # @param project_id [String] + # Path param: The ID of the project. # - # @param role [String, nil] Body param: `owner` or `member` + # @param role [String, nil] + # Body param: `owner` or `member` # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -98,19 +107,22 @@ def update(user_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::UserListParams} for more - # details. - # # Returns a list of users in the project. # # @overload list(project_id, after: nil, limit: nil, request_options: {}) # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -138,9 +150,11 @@ def list(project_id, params = {}) # # @overload delete(user_id, project_id:, request_options: {}) # - # @param user_id [String] The ID of the user. + # @param user_id [String] + # The ID of the user. # - # @param project_id [String] The ID of the project. + # @param project_id [String] + # The ID of the project. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/projects/users/roles.rb b/lib/openai/resources/admin/organization/projects/users/roles.rb index c2f3f43e0..de778073e 100644 --- a/lib/openai/resources/admin/organization/projects/users/roles.rb +++ b/lib/openai/resources/admin/organization/projects/users/roles.rb @@ -11,11 +11,14 @@ class Roles # # @overload create(user_id, project_id:, role_id:, request_options: {}) # - # @param user_id [String] Path param: The ID of the user that should receive the project role. + # @param user_id [String] + # Path param: The ID of the user that should receive the project role. # - # @param project_id [String] Path param: The ID of the project to update. + # @param project_id [String] + # Path param: The ID of the project to update. # - # @param role_id [String] Body param: Identifier of the role to assign. + # @param role_id [String] + # Body param: Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -42,11 +45,14 @@ def create(user_id, params) # # @overload retrieve(role_id, project_id:, user_id:, request_options: {}) # - # @param role_id [String] The ID of the project role to retrieve for the user. + # @param role_id [String] + # The ID of the project role to retrieve for the user. # - # @param project_id [String] The ID of the project to inspect. + # @param project_id [String] + # The ID of the project to inspect. # - # @param user_id [String] The ID of the user to inspect. + # @param user_id [String] + # The ID of the user to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -72,23 +78,25 @@ def retrieve(role_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams} for more - # details. - # # Lists the project roles assigned to a user within a project. # # @overload list(user_id, project_id:, after: nil, limit: nil, order: nil, request_options: {}) # - # @param user_id [String] Path param: The ID of the user to inspect. + # @param user_id [String] + # Path param: The ID of the user to inspect. # - # @param project_id [String] Path param: The ID of the project to inspect. + # @param project_id [String] + # Path param: The ID of the project to inspect. # - # @param after [String] Query param: Cursor for pagination. Provide the value from the previous response + # @param after [String] + # Query param: Cursor for pagination. Provide the value from the previous + # response's `next` field to continue listing project roles. # - # @param limit [Integer] Query param: A limit on the number of project role assignments to return. + # @param limit [Integer] + # Query param: A limit on the number of project role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams::Order] Query param: Sort order for the returned project roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Projects::Users::RoleListParams::Order] + # Query param: Sort order for the returned project roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -117,11 +125,14 @@ def list(user_id, params) # # @overload delete(role_id, project_id:, user_id:, request_options: {}) # - # @param role_id [String] The ID of the project role to remove from the user. + # @param role_id [String] + # The ID of the project role to remove from the user. # - # @param project_id [String] The ID of the project to modify. + # @param project_id [String] + # The ID of the project to modify. # - # @param user_id [String] The ID of the user whose project role assignment should be removed. + # @param user_id [String] + # The ID of the user whose project role assignment should be removed. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/roles.rb b/lib/openai/resources/admin/organization/roles.rb index 62a6f5a0a..99fb92490 100644 --- a/lib/openai/resources/admin/organization/roles.rb +++ b/lib/openai/resources/admin/organization/roles.rb @@ -9,11 +9,14 @@ class Roles # # @overload create(permissions:, role_name:, description: nil, request_options: {}) # - # @param permissions [Array] Permissions to grant to the role. + # @param permissions [Array] + # Permissions to grant to the role. # - # @param role_name [String] Unique name for the role. + # @param role_name [String] + # Unique name for the role. # - # @param description [String, nil] Optional description of the role. + # @param description [String, nil] + # Optional description of the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -36,7 +39,8 @@ def create(params) # # @overload retrieve(role_id, request_options: {}) # - # @param role_id [String] The ID of the role to retrieve. + # @param role_id [String] + # The ID of the role to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -57,13 +61,17 @@ def retrieve(role_id, params = {}) # # @overload update(role_id, description: nil, permissions: nil, role_name: nil, request_options: {}) # - # @param role_id [String] The ID of the role to update. + # @param role_id [String] + # The ID of the role to update. # - # @param description [String, nil] New description for the role. + # @param description [String, nil] + # New description for the role. # - # @param permissions [Array, nil] Updated set of permissions for the role. + # @param permissions [Array, nil] + # Updated set of permissions for the role. # - # @param role_name [String, nil] New name for the role. + # @param role_name [String, nil] + # New name for the role. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -82,18 +90,19 @@ def update(role_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::RoleListParams} for more details. - # # Lists the roles configured for the organization. # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing roles. # - # @param limit [Integer] A limit on the number of roles to return. Defaults to 1000. + # @param limit [Integer] + # A limit on the number of roles to return. Defaults to 1000. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::RoleListParams::Order] Sort order for the returned roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::RoleListParams::Order] + # Sort order for the returned roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -118,7 +127,8 @@ def list(params = {}) # # @overload delete(role_id, request_options: {}) # - # @param role_id [String] The ID of the role to delete. + # @param role_id [String] + # The ID of the role to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/spend_alerts.rb b/lib/openai/resources/admin/organization/spend_alerts.rb index 469f4db42..54455a934 100644 --- a/lib/openai/resources/admin/organization/spend_alerts.rb +++ b/lib/openai/resources/admin/organization/spend_alerts.rb @@ -9,13 +9,17 @@ class SpendAlerts # # @overload create(currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertCreateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertCreateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertCreateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -38,7 +42,8 @@ def create(params) # # @overload retrieve(alert_id, request_options: {}) # - # @param alert_id [String] The ID of the spend alert to retrieve. + # @param alert_id [String] + # The ID of the spend alert to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,15 +64,20 @@ def retrieve(alert_id, params = {}) # # @overload update(alert_id, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) # - # @param alert_id [String] The ID of the spend alert to update. + # @param alert_id [String] + # The ID of the spend alert to update. # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Currency] The currency for the threshold amount. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Currency] + # The currency for the threshold amount. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Interval] The time interval for evaluating spend against the threshold. + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. # - # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::NotificationChannel] Email notification settings for a spend alert. + # @param notification_channel [OpenAI::Models::Admin::Organization::SpendAlertUpdateParams::NotificationChannel] + # Email notification settings for a spend alert. # - # @param threshold_amount [Integer] The alert threshold amount, in cents. + # @param threshold_amount [Integer] + # The alert threshold amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -86,20 +96,23 @@ def update(alert_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::SpendAlertListParams} for more details. - # # Lists organization spend alerts. # # @overload list(after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] Cursor for pagination. Provide the ID of the last spend alert from the previous + # @param after [String] + # Cursor for pagination. Provide the ID of the last spend alert from the previous + # response to fetch the next page. # - # @param before [String] Cursor for pagination. Provide the ID of the first spend alert from the previous + # @param before [String] + # Cursor for pagination. Provide the ID of the first spend alert from the previous + # response to fetch the previous page. # - # @param limit [Integer] A limit on the number of spend alerts to return. Defaults to 20. + # @param limit [Integer] + # A limit on the number of spend alerts to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::SpendAlertListParams::Order] Sort order for the returned spend alerts. + # @param order [Symbol, OpenAI::Models::Admin::Organization::SpendAlertListParams::Order] + # Sort order for the returned spend alerts. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -124,7 +137,8 @@ def list(params = {}) # # @overload delete(alert_id, request_options: {}) # - # @param alert_id [String] The ID of the spend alert to delete. + # @param alert_id [String] + # The ID of the spend alert to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/spend_limit.rb b/lib/openai/resources/admin/organization/spend_limit.rb index 915e9154e..c5352b8b1 100644 --- a/lib/openai/resources/admin/organization/spend_limit.rb +++ b/lib/openai/resources/admin/organization/spend_limit.rb @@ -24,18 +24,19 @@ def retrieve(params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::SpendLimitUpdateParams} for more details. - # # Create or replace the organization's hard spend limit. # # @overload update(currency:, interval:, threshold_amount:, request_options: {}) # - # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported. + # @param currency [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Currency] + # The currency for the threshold amount. Currently, only `USD` is supported. # - # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m + # @param interval [Symbol, OpenAI::Models::Admin::Organization::SpendLimitUpdateParams::Interval] + # The time interval for evaluating spend against the threshold. Currently, only + # `month` is supported. # - # @param threshold_amount [Integer] The hard spend limit amount, in cents. + # @param threshold_amount [Integer] + # The hard spend limit amount, in cents. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/usage.rb b/lib/openai/resources/admin/organization/usage.rb index 031edbb60..ac5a00295 100644 --- a/lib/openai/resources/admin/organization/usage.rb +++ b/lib/openai/resources/admin/organization/usage.rb @@ -5,33 +5,46 @@ module Resources class Admin class Organization class Usage - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams} for more - # details. - # # Get audio speeches usage details for the organization. # # @overload audio_speeches(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioSpeechesParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -51,33 +64,46 @@ def audio_speeches(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams} for more - # details. - # # Get audio transcriptions usage details for the organization. # # @overload audio_transcriptions(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param limit [Integer] Specifies the number of buckets to return. + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param models [Array] Return only usage for these models. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param models [Array] + # Return only usage for these models. # - # @param project_ids [Array] Return only usage for these projects. + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param user_ids [Array] Return only usage for these users. + # @param project_ids [Array] + # Return only usage for these projects. + # + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -97,27 +123,37 @@ def audio_transcriptions(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams} for - # more details. - # # Get code interpreter sessions usage details for the organization. # # @overload code_interpreter_sessions(start_time:, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -137,34 +173,51 @@ def code_interpreter_sessions(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCompletionsParams} for more details. - # # Get completions usage details for the organization. # # @overload completions(start_time:, api_key_ids: nil, batch: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param batch [Boolean] + # If `true`, return batch jobs only. If `false`, return non-batch jobs only. By + # default, return both. # - # @param batch [Boolean] If `true`, return batch jobs only. If `false`, return non-batch jobs only. By de + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any + # combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -184,30 +237,41 @@ def completions(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageCostsParams} for more details. - # # Get costs details for the organization. # # @overload costs(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, line_items: nil, page: nil, project_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param api_key_ids [Array] Return only costs for these API keys. + # @param api_key_ids [Array] + # Return only costs for these API keys. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::BucketWidth] Width of each time bucket in response. Currently only `1d` is supported, default + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::BucketWidth] + # Width of each time bucket in response. Currently only `1d` is supported, default + # to `1d`. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param group_by [Array] Group the costs by the specified fields. Support fields include `project_id`, `l + # @param group_by [Array] + # Group the costs by the specified fields. Support fields include `project_id`, + # `line_item`, `api_key_id` and any combination of them. # - # @param limit [Integer] A limit on the number of buckets to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of buckets to be returned. Limit can range between 1 and + # 180, and the default is 7. # - # @param line_items [Array] Return only costs for these exact line item names. Each value must match the com + # @param line_items [Array] + # Return only costs for these exact line item names. Each value must match the + # complete `line_item` value, for example `gpt-6-astra, input_tokens`. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only costs for these projects. + # @param project_ids [Array] + # Return only costs for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -227,32 +291,46 @@ def costs(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageEmbeddingsParams} for more details. - # # Get embeddings usage details for the organization. # # @overload embeddings(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -272,33 +350,47 @@ def embeddings(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams} for more - # details. - # # Get file search calls usage details for the organization. # # @overload file_search_calls(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, user_ids: nil, vector_store_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageFileSearchCallsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `vector_store_id` or any combination of + # them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # - # @param vector_store_ids [Array] Return only usage for these vector stores. + # @param vector_store_ids [Array] + # Return only usage for these vector stores. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -318,36 +410,55 @@ def file_search_calls(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageImagesParams} for more details. - # # Get images usage details for the organization. # # @overload images(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, sizes: nil, sources: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageImagesParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageImagesParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any + # combination of them. # - # @param limit [Integer] Specifies the number of buckets to return. + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param models [Array] Return only usage for these models. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param models [Array] + # Return only usage for these models. # - # @param project_ids [Array] Return only usage for these projects. + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param sizes [Array] Return only usages for these image sizes. Possible values are `256x256`, `512x51 + # @param project_ids [Array] + # Return only usage for these projects. # - # @param sources [Array] Return only usages for these sources. Possible values are `image.generation`, `i + # @param sizes [Array] + # Return only usages for these image sizes. Possible values are `256x256`, + # `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them. # - # @param user_ids [Array] Return only usage for these users. + # @param sources [Array] + # Return only usages for these sources. Possible values are `image.generation`, + # `image.edit`, `image.variation` or any combination of them. + # + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -367,32 +478,46 @@ def images(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageModerationsParams} for more details. - # # Get moderations usage details for the organization. # # @overload moderations(start_time:, api_key_ids: nil, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageModerationsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageModerationsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model` or any combination of them. # - # @param limit [Integer] Specifies the number of buckets to return. + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param models [Array] Return only usage for these models. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param models [Array] + # Return only usage for these models. # - # @param project_ids [Array] Return only usage for these projects. + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param user_ids [Array] Return only usage for these users. + # @param project_ids [Array] + # Return only usage for these projects. + # + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -412,26 +537,37 @@ def moderations(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageVectorStoresParams} for more details. - # # Get vector stores usage details for the organization. # # @overload vector_stores(start_time:, bucket_width: nil, end_time: nil, group_by: nil, limit: nil, page: nil, project_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageVectorStoresParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageVectorStoresParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -451,35 +587,50 @@ def vector_stores(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams} for more - # details. - # # Get web search calls usage details for the organization. # # @overload web_search_calls(start_time:, api_key_ids: nil, bucket_width: nil, context_levels: nil, end_time: nil, group_by: nil, limit: nil, models: nil, page: nil, project_ids: nil, user_ids: nil, request_options: {}) # - # @param start_time [Integer] Start time (Unix seconds) of the query time range, inclusive. + # @param start_time [Integer] + # Start time (Unix seconds) of the query time range, inclusive. + # + # @param api_key_ids [Array] + # Return only usage for these API keys. # - # @param api_key_ids [Array] Return only usage for these API keys. + # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams::BucketWidth] + # Width of each time bucket in response. Currently `1m`, `1h` and `1d` are + # supported, default to `1d`. # - # @param bucket_width [Symbol, OpenAI::Models::Admin::Organization::UsageWebSearchCallsParams::BucketWidth] Width of each time bucket in response. Currently `1m`, `1h` and `1d` are support + # @param context_levels [Array] + # Return only web search usage for these context levels. # - # @param context_levels [Array] Return only web search usage for these context levels. + # @param end_time [Integer] + # End time (Unix seconds) of the query time range, exclusive. # - # @param end_time [Integer] End time (Unix seconds) of the query time range, exclusive. + # @param group_by [Array] + # Group the usage data by the specified fields. Support fields include + # `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or any + # combination of them. # - # @param group_by [Array] Group the usage data by the specified fields. Support fields include `project_id + # @param limit [Integer] + # Specifies the number of buckets to return. # - # @param limit [Integer] Specifies the number of buckets to return. + # - `bucket_width=1d`: default: 7, max: 31 + # - `bucket_width=1h`: default: 24, max: 168 + # - `bucket_width=1m`: default: 60, max: 1440 # - # @param models [Array] Return only usage for these models. + # @param models [Array] + # Return only usage for these models. # - # @param page [String] A cursor for use in pagination. Corresponding to the `next_page` field from the + # @param page [String] + # A cursor for use in pagination. Corresponding to the `next_page` field from the + # previous response. # - # @param project_ids [Array] Return only usage for these projects. + # @param project_ids [Array] + # Return only usage for these projects. # - # @param user_ids [Array] Return only usage for these users. + # @param user_ids [Array] + # Return only usage for these users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/users.rb b/lib/openai/resources/admin/organization/users.rb index 2bcc8eac9..c3a78afa4 100644 --- a/lib/openai/resources/admin/organization/users.rb +++ b/lib/openai/resources/admin/organization/users.rb @@ -12,7 +12,8 @@ class Users # # @overload retrieve(user_id, request_options: {}) # - # @param user_id [String] The ID of the user. + # @param user_id [String] + # The ID of the user. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -33,15 +34,20 @@ def retrieve(user_id, params = {}) # # @overload update(user_id, developer_persona: nil, role: nil, role_id: nil, technical_level: nil, request_options: {}) # - # @param user_id [String] The ID of the user. + # @param user_id [String] + # The ID of the user. # - # @param developer_persona [String, nil] Developer persona metadata. + # @param developer_persona [String, nil] + # Developer persona metadata. # - # @param role [String, nil] `owner` or `reader` + # @param role [String, nil] + # `owner` or `reader` # - # @param role_id [String, nil] Role ID to assign to the user. + # @param role_id [String, nil] + # Role ID to assign to the user. # - # @param technical_level [String, nil] Technical level metadata. + # @param technical_level [String, nil] + # Technical level metadata. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -60,18 +66,22 @@ def update(user_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::UserListParams} for more details. - # # Lists all of the users in the organization. # # @overload list(after: nil, emails: nil, limit: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param emails [Array] Filter by the email address of users. + # @param emails [Array] + # Filter by the email address of users. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -96,7 +106,8 @@ def list(params = {}) # # @overload delete(user_id, request_options: {}) # - # @param user_id [String] The ID of the user. + # @param user_id [String] + # The ID of the user. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/admin/organization/users/roles.rb b/lib/openai/resources/admin/organization/users/roles.rb index decfbd1f2..693b3c935 100644 --- a/lib/openai/resources/admin/organization/users/roles.rb +++ b/lib/openai/resources/admin/organization/users/roles.rb @@ -10,9 +10,11 @@ class Roles # # @overload create(user_id, role_id:, request_options: {}) # - # @param user_id [String] The ID of the user that should receive the organization role. + # @param user_id [String] + # The ID of the user that should receive the organization role. # - # @param role_id [String] Identifier of the role to assign. + # @param role_id [String] + # Identifier of the role to assign. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -35,9 +37,11 @@ def create(user_id, params) # # @overload retrieve(role_id, user_id:, request_options: {}) # - # @param role_id [String] The ID of the organization role to retrieve for the user. + # @param role_id [String] + # The ID of the organization role to retrieve for the user. # - # @param user_id [String] The ID of the user to inspect. + # @param user_id [String] + # The ID of the user to inspect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,20 +63,22 @@ def retrieve(role_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Admin::Organization::Users::RoleListParams} for more details. - # # Lists the organization roles assigned to a user within the organization. # # @overload list(user_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param user_id [String] The ID of the user to inspect. + # @param user_id [String] + # The ID of the user to inspect. # - # @param after [String] Cursor for pagination. Provide the value from the previous response's `next` fie + # @param after [String] + # Cursor for pagination. Provide the value from the previous response's `next` + # field to continue listing organization roles. # - # @param limit [Integer] A limit on the number of organization role assignments to return. + # @param limit [Integer] + # A limit on the number of organization role assignments to return. # - # @param order [Symbol, OpenAI::Models::Admin::Organization::Users::RoleListParams::Order] Sort order for the returned organization roles. + # @param order [Symbol, OpenAI::Models::Admin::Organization::Users::RoleListParams::Order] + # Sort order for the returned organization roles. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -97,9 +103,11 @@ def list(user_id, params = {}) # # @overload delete(role_id, user_id:, request_options: {}) # - # @param role_id [String] The ID of the organization role to remove from the user. + # @param role_id [String] + # The ID of the organization role to remove from the user. # - # @param user_id [String] The ID of the user to modify. + # @param user_id [String] + # The ID of the user to modify. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/audio/speech.rb b/lib/openai/resources/audio/speech.rb index 8b4604c57..e2f6c760f 100644 --- a/lib/openai/resources/audio/speech.rb +++ b/lib/openai/resources/audio/speech.rb @@ -5,28 +5,43 @@ module Resources class Audio # Turn audio into text or text into audio. class Speech - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::SpeechCreateParams} for more details. - # # Generates audio from the input text. # # Returns the audio file content, or a stream of audio events. # # @overload create(input:, model:, voice:, instructions: nil, response_format: nil, speed: nil, stream_format: nil, request_options: {}) # - # @param input [String] The text to generate audio for. The maximum length is 4096 characters. + # @param input [String] + # The text to generate audio for. The maximum length is 4096 characters. # - # @param model [String, Symbol, OpenAI::Models::Audio::SpeechModel] One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # @param model [String, Symbol, OpenAI::Models::Audio::SpeechModel] + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): + # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. # - # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice] The voice to use when generating the audio. Supported built-in voices are `alloy + # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice] + # The voice to use when generating the audio. Supported built-in voices are + # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, + # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice + # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the + # voices are available in the + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). # - # @param instructions [String] Control the voice of your generated audio with additional instructions. Does not + # @param instructions [String] + # Control the voice of your generated audio with additional instructions. Does not + # work with `tts-1` or `tts-1-hd`. # - # @param response_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::ResponseFormat] The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav + # @param response_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::ResponseFormat] + # The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, + # `wav`, and `pcm`. # - # @param speed [Float] The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is + # @param speed [Float] + # The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is + # the default. # - # @param stream_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::StreamFormat] The format to stream the audio in. Supported formats are `sse` and `audio`. `sse + # @param stream_format [Symbol, OpenAI::Models::Audio::SpeechCreateParams::StreamFormat] + # The format to stream the audio in. Supported formats are `sse` and `audio`. + # `sse` is not supported for `tts-1` or `tts-1-hd`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/audio/transcriptions.rb b/lib/openai/resources/audio/transcriptions.rb index f844d59f0..50bdb1bba 100644 --- a/lib/openai/resources/audio/transcriptions.rb +++ b/lib/openai/resources/audio/transcriptions.rb @@ -8,9 +8,6 @@ class Transcriptions # See {OpenAI::Resources::Audio::Transcriptions#create_streaming} for streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionCreateParams} for more details. - # # Transcribes audio into the input language. # # Returns a transcription object in `json`, `diarized_json`, or `verbose_json` @@ -22,31 +19,92 @@ class Transcriptions # # @overload create(file:, model:, chunking_strategy: nil, include: nil, keywords: nil, known_speaker_names: nil, known_speaker_references: nil, language: nil, languages: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {}) # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) to transcribe, in one of these formats: fl - # - # @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, ` - # - # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] Controls how the audio is cut into chunks. When set to `"auto"`, the server firs - # - # @param include [Array] Additional information to include in the transcription response. - # - # @param keywords [Array] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr - # - # @param known_speaker_names [Array] Optional list of speaker names that correspond to the audio samples provided in - # - # @param known_speaker_references [Array] Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en- - # - # @param language [String] The language of the input audio. Supplying the input language in [ISO-639-1](htt - # - # @param languages [Array] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w - # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio segment - # - # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo - # - # @param temperature [Float] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the - # - # @param timestamp_granularities [Array] The timestamp granularities to populate for this transcription. `response_format + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The audio file object (not file name) to transcribe, in one of these formats: + # flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include + # enough format metadata for the file to be identified. We recommend an + # extension-bearing filename and an appropriate content type. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param model [String, Symbol, OpenAI::Models::AudioModel] + # ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` + # (which is powered by our open source Whisper V2 model), and + # `gpt-4o-transcribe-diarize`. + # + # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] + # Controls how the audio is cut into chunks. When set to `"auto"`, the server + # first normalizes loudness and then uses voice activity detection (VAD) to choose + # boundaries. `server_vad` object can be provided to tweak VAD detection + # parameters manually. If unset, the audio is transcribed as a single block. + # Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 + # seconds. + # + # @param include [Array] + # Additional information to include in the transcription response. `logprobs` will + # return the log probabilities of the tokens in the response to understand the + # model's confidence in the transcription. `logprobs` only works with + # response_format set to `json` and only with the models `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is + # not supported when using `gpt-4o-transcribe-diarize`. + # + # @param keywords [Array] + # Words or phrases to guide transcription of the input audio. Supported by + # `gpt-transcribe`. + # + # @param known_speaker_names [Array] + # Optional list of speaker names that correspond to the audio samples provided in + # `known_speaker_references[]`. Each entry should be a short identifier (for + # example `customer` or `agent`). Up to 4 speakers are supported. + # + # @param known_speaker_references [Array] + # Optional list of audio samples (as + # [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) + # that contain known speaker references matching `known_speaker_names[]`. Each + # sample must be between 2 and 10 seconds, and can use any of the same input audio + # formats supported by `file`. + # + # @param language [String] + # The language of the input audio. Supplying the input language in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) + # format will improve accuracy and latency. + # + # @param languages [Array] + # Possible languages of the input audio, in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. + # Supported by `gpt-transcribe`. + # + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. The + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + # should match the audio language. This field is not supported when using + # `gpt-4o-transcribe-diarize`. + # + # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] + # The format of the output, in one of these options: `json`, `text`, `srt`, + # `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and + # `gpt-4o-mini-transcribe`, the only supported format is `json`. For + # `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and + # `diarized_json`, with `diarized_json` required to receive speaker annotations. + # + # @param temperature [Float] + # The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # output more random, while lower values like 0.2 will make it more focused and + # deterministic. If set to 0, the model will use + # [log probability](https://en.wikipedia.org/wiki/Log_probability) to + # automatically increase the temperature until certain thresholds are hit. + # + # @param timestamp_granularities [Array] + # The timestamp granularities to populate for this transcription. + # `response_format` must be set `verbose_json` to use timestamp granularities. + # Either or both of these options are supported: `word`, or `segment`. Note: There + # is no additional latency for segment timestamps, but generating word timestamps + # incurs additional latency. This option is not available for + # `gpt-4o-transcribe-diarize`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -74,9 +132,6 @@ def create(params) # See {OpenAI::Resources::Audio::Transcriptions#create} for non-streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranscriptionCreateParams} for more details. - # # Transcribes audio into the input language. # # Returns a transcription object in `json`, `diarized_json`, or `verbose_json` @@ -88,31 +143,92 @@ def create(params) # # @overload create_streaming(file:, model:, chunking_strategy: nil, include: nil, keywords: nil, known_speaker_names: nil, known_speaker_references: nil, language: nil, languages: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {}) # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) to transcribe, in one of these formats: fl - # - # @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, ` - # - # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] Controls how the audio is cut into chunks. When set to `"auto"`, the server firs - # - # @param include [Array] Additional information to include in the transcription response. - # - # @param keywords [Array] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr - # - # @param known_speaker_names [Array] Optional list of speaker names that correspond to the audio samples provided in - # - # @param known_speaker_references [Array] Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en- - # - # @param language [String] The language of the input audio. Supplying the input language in [ISO-639-1](htt - # - # @param languages [Array] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w - # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio segment - # - # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo - # - # @param temperature [Float] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the - # - # @param timestamp_granularities [Array] The timestamp granularities to populate for this transcription. `response_format + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The audio file object (not file name) to transcribe, in one of these formats: + # flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include + # enough format metadata for the file to be identified. We recommend an + # extension-bearing filename and an appropriate content type. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param model [String, Symbol, OpenAI::Models::AudioModel] + # ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` + # (which is powered by our open source Whisper V2 model), and + # `gpt-4o-transcribe-diarize`. + # + # @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] + # Controls how the audio is cut into chunks. When set to `"auto"`, the server + # first normalizes loudness and then uses voice activity detection (VAD) to choose + # boundaries. `server_vad` object can be provided to tweak VAD detection + # parameters manually. If unset, the audio is transcribed as a single block. + # Required when using `gpt-4o-transcribe-diarize` for inputs longer than 30 + # seconds. + # + # @param include [Array] + # Additional information to include in the transcription response. `logprobs` will + # return the log probabilities of the tokens in the response to understand the + # model's confidence in the transcription. `logprobs` only works with + # response_format set to `json` and only with the models `gpt-4o-transcribe`, + # `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is + # not supported when using `gpt-4o-transcribe-diarize`. + # + # @param keywords [Array] + # Words or phrases to guide transcription of the input audio. Supported by + # `gpt-transcribe`. + # + # @param known_speaker_names [Array] + # Optional list of speaker names that correspond to the audio samples provided in + # `known_speaker_references[]`. Each entry should be a short identifier (for + # example `customer` or `agent`). Up to 4 speakers are supported. + # + # @param known_speaker_references [Array] + # Optional list of audio samples (as + # [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) + # that contain known speaker references matching `known_speaker_names[]`. Each + # sample must be between 2 and 10 seconds, and can use any of the same input audio + # formats supported by `file`. + # + # @param language [String] + # The language of the input audio. Supplying the input language in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) + # format will improve accuracy and latency. + # + # @param languages [Array] + # Possible languages of the input audio, in + # [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. + # Supported by `gpt-transcribe`. + # + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. The + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + # should match the audio language. This field is not supported when using + # `gpt-4o-transcribe-diarize`. + # + # @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] + # The format of the output, in one of these options: `json`, `text`, `srt`, + # `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and + # `gpt-4o-mini-transcribe`, the only supported format is `json`. For + # `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and + # `diarized_json`, with `diarized_json` required to receive speaker annotations. + # + # @param temperature [Float] + # The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # output more random, while lower values like 0.2 will make it more focused and + # deterministic. If set to 0, the model will use + # [log probability](https://en.wikipedia.org/wiki/Log_probability) to + # automatically increase the temperature until certain thresholds are hit. + # + # @param timestamp_granularities [Array] + # The timestamp granularities to populate for this transcription. + # `response_format` must be set `verbose_json` to use timestamp granularities. + # Either or both of these options are supported: `word`, or `segment`. Note: There + # is no additional latency for segment timestamps, but generating word timestamps + # incurs additional latency. This option is not available for + # `gpt-4o-transcribe-diarize`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/audio/translations.rb b/lib/openai/resources/audio/translations.rb index a9352005d..3f579cdd1 100644 --- a/lib/openai/resources/audio/translations.rb +++ b/lib/openai/resources/audio/translations.rb @@ -5,9 +5,6 @@ module Resources class Audio # Turn audio into text or text into audio. class Translations - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Audio::TranslationCreateParams} for more details. - # # Translates audio into English. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload @@ -16,15 +13,36 @@ class Translations # # @overload create(file:, model:, prompt: nil, response_format: nil, temperature: nil, request_options: {}) # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) translate, in one of these formats: flac, + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The audio file object (not file name) translate, in one of these formats: flac, + # mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include enough + # format metadata for the file to be identified. We recommend an extension-bearing + # filename and an appropriate content type. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. Only `whisper-1` (which is powered by our open source Wh + # @param model [String, Symbol, OpenAI::Models::AudioModel] + # ID of the model to use. Only `whisper-1` (which is powered by our open source + # Whisper V2 model) is currently available. # - # @param prompt [String] An optional text to guide the model's style or continue a previous audio segment + # @param prompt [String] + # An optional text to guide the model's style or continue a previous audio + # segment. The + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + # should be in English. # - # @param response_format [Symbol, OpenAI::Models::Audio::TranslationCreateParams::ResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo + # @param response_format [Symbol, OpenAI::Models::Audio::TranslationCreateParams::ResponseFormat] + # The format of the output, in one of these options: `json`, `text`, `srt`, + # `verbose_json`, or `vtt`. # - # @param temperature [Float] The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # @param temperature [Float] + # The sampling temperature, between 0 and 1. Higher values like 0.8 will make the + # output more random, while lower values like 0.2 will make it more focused and + # deterministic. If set to 0, the model will use + # [log probability](https://en.wikipedia.org/wiki/Log_probability) to + # automatically increase the temperature until certain thresholds are hit. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/batches.rb b/lib/openai/resources/batches.rb index 6e904736b..ceecb96fd 100644 --- a/lib/openai/resources/batches.rb +++ b/lib/openai/resources/batches.rb @@ -4,22 +4,45 @@ module OpenAI module Resources # Create large batches of API requests to run asynchronously. class Batches - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchCreateParams} for more details. - # # Creates and executes a batch from an uploaded file of requests # # @overload create(completion_window:, endpoint:, input_file_id:, metadata: nil, output_expires_after: nil, request_options: {}) # - # @param completion_window [Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow] The time frame within which the batch should be processed. Currently only `24h` + # @param completion_window [Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow] + # The time frame within which the batch should be processed. Currently only `24h` + # is supported. + # + # @param endpoint [Symbol, OpenAI::Models::BatchCreateParams::Endpoint] + # The endpoint to be used for all requests in the batch. Currently + # `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, + # `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and + # `/v1/videos` are supported. Note that `/v1/embeddings` batches are also + # restricted to a maximum of 50,000 embedding inputs across all requests in the + # batch. + # + # @param input_file_id [String] + # The ID of an uploaded file that contains requests for the new batch. # - # @param endpoint [Symbol, OpenAI::Models::BatchCreateParams::Endpoint] The endpoint to be used for all requests in the batch. Currently `/v1/responses` + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) + # for how to upload a file. # - # @param input_file_id [String] The ID of an uploaded file that contains requests for the new batch. + # Your input file must be formatted as a + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), + # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 + # requests, and can be up to 200 MB in size. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param output_expires_after [OpenAI::Models::BatchCreateParams::OutputExpiresAfter] The expiration policy for the output and/or error file that are generated for a + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param output_expires_after [OpenAI::Models::BatchCreateParams::OutputExpiresAfter] + # The expiration policy for the output and/or error file that are generated for a + # batch. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -42,7 +65,8 @@ def create(params) # # @overload retrieve(batch_id, request_options: {}) # - # @param batch_id [String] The ID of the batch to retrieve. + # @param batch_id [String] + # The ID of the batch to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,16 +83,19 @@ def retrieve(batch_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::BatchListParams} for more details. - # # List your organization's batches. # # @overload list(after: nil, limit: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -95,7 +122,8 @@ def list(params = {}) # # @overload cancel(batch_id, request_options: {}) # - # @param batch_id [String] The ID of the batch to cancel. + # @param batch_id [String] + # The ID of the batch to cancel. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/assistants.rb b/lib/openai/resources/beta/assistants.rb index 71bf69019..922a894b0 100644 --- a/lib/openai/resources/beta/assistants.rb +++ b/lib/openai/resources/beta/assistants.rb @@ -7,34 +7,87 @@ class Beta class Assistants # @deprecated # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantCreateParams} for more details. - # # Create an assistant with a model and instructions. # # @overload create(model:, description: nil, instructions: nil, metadata: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {}) # - # @param model [String, Symbol, OpenAI::Models::ChatModel] ID of the model to use. You can use the [List models](https://platform.openai.co - # - # @param description [String, nil] The description of the assistant. The maximum length is 512 characters. - # - # @param instructions [String, nil] The system instructions that the assistant uses. The maximum length is 256,000 c - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param name [String, nil] The name of the assistant. The maximum length is 256 characters. - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param tools [Array] A list of tool enabled on the assistant. There can be a maximum of 128 tools per - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # @param model [String, Symbol, OpenAI::Models::ChatModel] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. + # + # @param description [String, nil] + # The description of the assistant. The maximum length is 512 characters. + # + # @param instructions [String, nil] + # The system instructions that the assistant uses. The maximum length is 256,000 + # characters. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param name [String, nil] + # The name of the assistant. The maximum length is 256 characters. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array] + # A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # assistant. Tools can be of types `code_interpreter`, `file_search`, or + # `function`. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,7 +112,8 @@ def create(params) # # @overload retrieve(assistant_id, request_options: {}) # - # @param assistant_id [String] The ID of the assistant to retrieve. + # @param assistant_id [String] + # The ID of the assistant to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -78,36 +132,90 @@ def retrieve(assistant_id, params = {}) # @deprecated # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantUpdateParams} for more details. - # # Modifies an assistant. # # @overload update(assistant_id, description: nil, instructions: nil, metadata: nil, model: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {}) # - # @param assistant_id [String] The ID of the assistant to modify. - # - # @param description [String, nil] The description of the assistant. The maximum length is 512 characters. - # - # @param instructions [String, nil] The system instructions that the assistant uses. The maximum length is 256,000 c - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model] ID of the model to use. You can use the [List models](https://platform.openai.co - # - # @param name [String, nil] The name of the assistant. The maximum length is 256 characters. - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param tools [Array] A list of tool enabled on the assistant. There can be a maximum of 128 tools per - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # @param assistant_id [String] + # The ID of the assistant to modify. + # + # @param description [String, nil] + # The description of the assistant. The maximum length is 512 characters. + # + # @param instructions [String, nil] + # The system instructions that the assistant uses. The maximum length is 256,000 + # characters. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. + # + # @param name [String, nil] + # The name of the assistant. The maximum length is 256 characters. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array] + # A list of tool enabled on the assistant. There can be a maximum of 128 tools per + # assistant. Tools can be of types `code_interpreter`, `file_search`, or + # `function`. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -128,20 +236,29 @@ def update(assistant_id, params = {}) # @deprecated # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::AssistantListParams} for more details. - # # Returns a list of assistants. # # @overload list(after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Beta::AssistantListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::AssistantListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -168,7 +285,8 @@ def list(params = {}) # # @overload delete(assistant_id, request_options: {}) # - # @param assistant_id [String] The ID of the assistant to delete. + # @param assistant_id [String] + # The ID of the assistant to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/chatkit/sessions.rb b/lib/openai/resources/beta/chatkit/sessions.rb index 4978df076..fe4facfb2 100644 --- a/lib/openai/resources/beta/chatkit/sessions.rb +++ b/lib/openai/resources/beta/chatkit/sessions.rb @@ -5,22 +5,26 @@ module Resources class Beta class ChatKit class Sessions - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::SessionCreateParams} for more details. - # # Create a ChatKit session. # # @overload create(user:, workflow:, chatkit_configuration: nil, expires_after: nil, rate_limits: nil, request_options: {}) # - # @param user [String] A free-form string that identifies your end user; ensures this Session can acces + # @param user [String] + # A free-form string that identifies your end user; ensures this Session can + # access other objects that have the same `user` scope. # - # @param workflow [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam] Workflow that powers the session. + # @param workflow [OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam] + # Workflow that powers the session. # - # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam] Optional overrides for ChatKit runtime configuration features + # @param chatkit_configuration [OpenAI::Models::Beta::ChatKit::ChatSessionChatKitConfigurationParam] + # Optional overrides for ChatKit runtime configuration features # - # @param expires_after [OpenAI::Models::Beta::ChatKit::ChatSessionExpiresAfterParam] Optional override for session expiration timing in seconds from creation. Defaul + # @param expires_after [OpenAI::Models::Beta::ChatKit::ChatSessionExpiresAfterParam] + # Optional override for session expiration timing in seconds from creation. + # Defaults to 10 minutes. # - # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimitsParam] Optional override for per-minute request limits. When omitted, defaults to 10. + # @param rate_limits [OpenAI::Models::Beta::ChatKit::ChatSessionRateLimitsParam] + # Optional override for per-minute request limits. When omitted, defaults to 10. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -45,7 +49,8 @@ def create(params) # # @overload cancel(session_id, request_options: {}) # - # @param session_id [String] Unique identifier for the ChatKit session to cancel. + # @param session_id [String] + # Unique identifier for the ChatKit session to cancel. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/chatkit/threads.rb b/lib/openai/resources/beta/chatkit/threads.rb index c34aad003..fcd697ba3 100644 --- a/lib/openai/resources/beta/chatkit/threads.rb +++ b/lib/openai/resources/beta/chatkit/threads.rb @@ -9,7 +9,8 @@ class Threads # # @overload retrieve(thread_id, request_options: {}) # - # @param thread_id [String] Identifier of the ChatKit thread to retrieve. + # @param thread_id [String] + # Identifier of the ChatKit thread to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -26,22 +27,27 @@ def retrieve(thread_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ThreadListParams} for more details. - # # List ChatKit threads with optional pagination and user filters. # # @overload list(after: nil, before: nil, limit: nil, order: nil, user: nil, request_options: {}) # - # @param after [String] List items created after this thread item ID. Defaults to null for the first pag + # @param after [String] + # List items created after this thread item ID. Defaults to null for the first + # page. # - # @param before [String] List items created before this thread item ID. Defaults to null for the newest r + # @param before [String] + # List items created before this thread item ID. Defaults to null for the newest + # results. # - # @param limit [Integer] Maximum number of thread items to return. Defaults to 20. + # @param limit [Integer] + # Maximum number of thread items to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListParams::Order] Sort order for results by creation time. Defaults to `desc`. + # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListParams::Order] + # Sort order for results by creation time. Defaults to `desc`. # - # @param user [String] Filter threads that belong to this user identifier. Defaults to null to return a + # @param user [String] + # Filter threads that belong to this user identifier. Defaults to null to return + # all users. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -66,7 +72,8 @@ def list(params = {}) # # @overload delete(thread_id, request_options: {}) # - # @param thread_id [String] Identifier of the ChatKit thread to delete. + # @param thread_id [String] + # Identifier of the ChatKit thread to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -83,22 +90,26 @@ def delete(thread_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ChatKit::ThreadListItemsParams} for more details. - # # List items that belong to a ChatKit thread. # # @overload list_items(thread_id, after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param thread_id [String] Identifier of the ChatKit thread whose items are requested. + # @param thread_id [String] + # Identifier of the ChatKit thread whose items are requested. # - # @param after [String] List items created after this thread item ID. Defaults to null for the first pag + # @param after [String] + # List items created after this thread item ID. Defaults to null for the first + # page. # - # @param before [String] List items created before this thread item ID. Defaults to null for the newest r + # @param before [String] + # List items created before this thread item ID. Defaults to null for the newest + # results. # - # @param limit [Integer] Maximum number of thread items to return. Defaults to 20. + # @param limit [Integer] + # Maximum number of thread items to return. Defaults to 20. # - # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListItemsParams::Order] Sort order for results by creation time. Defaults to `desc`. + # @param order [Symbol, OpenAI::Models::Beta::ChatKit::ThreadListItemsParams::Order] + # Sort order for results by creation time. Defaults to `desc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/responses.rb b/lib/openai/resources/beta/responses.rb index 2e8213e5d..90edaeac8 100644 --- a/lib/openai/resources/beta/responses.rb +++ b/lib/openai/resources/beta/responses.rb @@ -12,86 +12,277 @@ class Responses # See {OpenAI::Resources::Beta::Responses#stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams} for more details. - # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. # # @overload create(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) # - # @param background [Boolean, nil] Body param: Whether to run the model response in the background. - # - # @param context_management [Array, nil] Body param: Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] Body param: The conversation that this response belongs to. Items from this conv - # - # @param include [Array, nil] Body param: Specify additional output data to include in the model response. Cur - # - # @param input [String, Array] Body param: Text, image, or file inputs to the model, used to generate a respons - # - # @param instructions [String, nil] Body param: A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] Body param: An upper bound for the number of tokens that can be generated for a - # - # @param max_tool_calls [Integer, nil] Body param: The maximum number of total calls to built-in tools that can be proc - # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca - # - # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] Body param: Configuration for running moderation on the input and output of this - # - # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] Body param: Configuration for server-hosted multi-agent execution. - # - # @param parallel_tool_calls [Boolean, nil] Body param: Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] Body param: The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Body param: Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Body param: Used by OpenAI to cache responses for similar requests to optimize y - # - # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Body param: Options for prompt caching. Supported for `gpt-5.6` and later models - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] Body param: Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] Body param: Configuration options for - # - # @param safety_identifier [String, nil] Body param: A stable identifier used to help detect users of your application th - # - # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Body param: Whether to store the generated model response for later retrieval vi - # - # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] Body param: Options for streaming responses. Only set this when you set `stream: - # - # @param temperature [Float, nil] Body param: What sampling temperature to use, between 0 and 2. Higher values lik - # - # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] Body param: Configuration options for a text response from the model. Can be pla - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] Body param: How the model should select which tool (or tools) to use when genera - # - # @param tools [Array] Body param: An array of tools the model may call while generating a response. Yo - # - # @param top_logprobs [Integer, nil] Body param: An integer between 0 and 20 specifying the maximum number of most li - # - # @param top_p [Float, nil] Body param: An alternative to sampling with temperature, called nucleus sampling - # - # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] Body param: The truncation strategy to use for the model response. - # - # @param user [String] Body param: This field is being replaced by `safety_identifier` and `prompt_cach - # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param background [Boolean, nil] + # Body param: Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Body param: Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # Body param: The conversation that this response belongs to. Items from this + # conversation are prepended to `input_items` for this response request. Input + # items and output items from this response are automatically added to this + # conversation after this response completes. + # + # @param include [Array, nil] + # Body param: Specify additional output data to include in the model response. + # Currently supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Body param: Text, image, or file inputs to the model, used to generate a + # response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # Body param: A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # Body param: An upper bound for the number of tokens that can be generated for a + # response, including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # Body param: The maximum number of total calls to built-in tools that can be + # processed in a response. This maximum number applies across all built-in tool + # calls, not per individual tool. Any further attempts to call a tool by the model + # will be ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] + # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] + # Body param: Configuration for running moderation on the input and output of this + # response. + # + # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] + # Body param: Configuration for server-hosted multi-agent execution. + # + # @param parallel_tool_calls [Boolean, nil] + # Body param: Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # Body param: The unique ID of the previous response to the model. Use this to + # create multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] + # Body param: Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Body param: Used by OpenAI to cache responses for similar requests to optimize + # your cache hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] + # Body param: Options for prompt caching. Supported for `gpt-5.6` and later + # models. By default, OpenAI automatically chooses one implicit cache breakpoint. + # You can add explicit breakpoints to content blocks with + # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For + # cache matching, OpenAI considers up to the latest 80 breakpoints in the + # conversation, without a content-block lookback limit. Set `mode` to `explicit` + # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is + # currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] + # Body param: Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] + # Body param: Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # Body param: A stable identifier used to help detect users of your application + # that may be violating OpenAI's usage policies. The IDs should be a string that + # uniquely identifies each user, with a maximum length of 64 characters. We + # recommend hashing their username or email address, in order to avoid sending us + # any identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] + # Body param: Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Body param: Whether to store the generated model response for later retrieval + # via API. Defaults to true when omitted. If set to true, response data will be + # stored for at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] + # Body param: Options for streaming responses. Only set this when you set + # `stream: true`. + # + # @param temperature [Float, nil] + # Body param: What sampling temperature to use, between 0 and 2. Higher values + # like 0.8 will make the output more random, while lower values like 0.2 will make + # it more focused and deterministic. We generally recommend altering this or + # `top_p` but not both. + # + # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] + # Body param: Configuration options for a text response from the model. Can be + # plain text or structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] + # Body param: How the model should select which tool (or tools) to use when + # generating a response. See the `tools` parameter to see how to specify which + # tools the model can call. + # + # @param tools [Array] + # Body param: An array of tools the model may call while generating a response. + # You can specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # Body param: An integer between 0 and 20 specifying the maximum number of most + # likely tokens to return at each token position, each with an associated log + # probability. In some cases, the number of returned tokens may be fewer than + # requested. + # + # @param top_p [Float, nil] + # Body param: An alternative to sampling with temperature, called nucleus + # sampling, where the model considers the results of the tokens with top_p + # probability mass. So 0.1 means only the tokens comprising the top 10% + # probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] + # Body param: The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # Body param: This field is being replaced by `safety_identifier` and + # `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching + # optimizations. A stable identifier for your end-users. Used to boost cache hit + # rates by better bucketing similar requests and to help OpenAI detect and prevent + # abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -119,86 +310,277 @@ def create(params = {}) # See {OpenAI::Resources::Beta::Responses#create} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCreateParams} for more details. - # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. # # @overload stream_raw(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) # - # @param background [Boolean, nil] Body param: Whether to run the model response in the background. - # - # @param context_management [Array, nil] Body param: Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] Body param: The conversation that this response belongs to. Items from this conv - # - # @param include [Array, nil] Body param: Specify additional output data to include in the model response. Cur - # - # @param input [String, Array] Body param: Text, image, or file inputs to the model, used to generate a respons - # - # @param instructions [String, nil] Body param: A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] Body param: An upper bound for the number of tokens that can be generated for a - # - # @param max_tool_calls [Integer, nil] Body param: The maximum number of total calls to built-in tools that can be proc - # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca - # - # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] Body param: Configuration for running moderation on the input and output of this - # - # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] Body param: Configuration for server-hosted multi-agent execution. - # - # @param parallel_tool_calls [Boolean, nil] Body param: Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] Body param: The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Body param: Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Body param: Used by OpenAI to cache responses for similar requests to optimize y - # - # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Body param: Options for prompt caching. Supported for `gpt-5.6` and later models - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] Body param: Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] Body param: Configuration options for - # - # @param safety_identifier [String, nil] Body param: A stable identifier used to help detect users of your application th - # - # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Body param: Whether to store the generated model response for later retrieval vi - # - # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] Body param: Options for streaming responses. Only set this when you set `stream: - # - # @param temperature [Float, nil] Body param: What sampling temperature to use, between 0 and 2. Higher values lik - # - # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] Body param: Configuration options for a text response from the model. Can be pla - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] Body param: How the model should select which tool (or tools) to use when genera - # - # @param tools [Array] Body param: An array of tools the model may call while generating a response. Yo - # - # @param top_logprobs [Integer, nil] Body param: An integer between 0 and 20 specifying the maximum number of most li - # - # @param top_p [Float, nil] Body param: An alternative to sampling with temperature, called nucleus sampling - # - # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] Body param: The truncation strategy to use for the model response. - # - # @param user [String] Body param: This field is being replaced by `safety_identifier` and `prompt_cach - # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param background [Boolean, nil] + # Body param: Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Body param: Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # Body param: The conversation that this response belongs to. Items from this + # conversation are prepended to `input_items` for this response request. Input + # items and output items from this response are automatically added to this + # conversation after this response completes. + # + # @param include [Array, nil] + # Body param: Specify additional output data to include in the model response. + # Currently supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Body param: Text, image, or file inputs to the model, used to generate a + # response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # Body param: A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # Body param: An upper bound for the number of tokens that can be generated for a + # response, including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # Body param: The maximum number of total calls to built-in tools that can be + # processed in a response. This maximum number applies across all built-in tool + # calls, not per individual tool. Any further attempts to call a tool by the model + # will be ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model] + # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Beta::ResponseCreateParams::Moderation, nil] + # Body param: Configuration for running moderation on the input and output of this + # response. + # + # @param multi_agent [OpenAI::Models::Beta::ResponseCreateParams::MultiAgent, nil] + # Body param: Configuration for server-hosted multi-agent execution. + # + # @param parallel_tool_calls [Boolean, nil] + # Body param: Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # Body param: The unique ID of the previous response to the model. Use this to + # create multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] + # Body param: Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Body param: Used by OpenAI to cache responses for similar requests to optimize + # your cache hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] + # Body param: Options for prompt caching. Supported for `gpt-5.6` and later + # models. By default, OpenAI automatically chooses one implicit cache breakpoint. + # You can add explicit breakpoints to content blocks with + # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For + # cache matching, OpenAI considers up to the latest 80 breakpoints in the + # conversation, without a content-block lookback limit. Set `mode` to `explicit` + # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is + # currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheRetention, nil] + # Body param: Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] + # Body param: Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # Body param: A stable identifier used to help detect users of your application + # that may be violating OpenAI's usage policies. The IDs should be a string that + # uniquely identifies each user, with a maximum length of 64 characters. We + # recommend hashing their username or email address, in order to avoid sending us + # any identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] + # Body param: Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Body param: Whether to store the generated model response for later retrieval + # via API. Defaults to true when omitted. If set to true, response data will be + # stored for at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Beta::ResponseCreateParams::StreamOptions, nil] + # Body param: Options for streaming responses. Only set this when you set + # `stream: true`. + # + # @param temperature [Float, nil] + # Body param: What sampling temperature to use, between 0 and 2. Higher values + # like 0.8 will make the output more random, while lower values like 0.2 will make + # it more focused and deterministic. We generally recommend altering this or + # `top_p` but not both. + # + # @param text [OpenAI::Models::Beta::BetaResponseTextConfig] + # Body param: Configuration options for a text response from the model. Can be + # plain text or structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell] + # Body param: How the model should select which tool (or tools) to use when + # generating a response. See the `tools` parameter to see how to specify which + # tools the model can call. + # + # @param tools [Array] + # Body param: An array of tools the model may call while generating a response. + # You can specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # Body param: An integer between 0 and 20 specifying the maximum number of most + # likely tokens to return at each token position, each with an associated log + # probability. In some cases, the number of returned tokens may be fewer than + # requested. + # + # @param top_p [Float, nil] + # Body param: An alternative to sampling with temperature, called nucleus + # sampling, where the model considers the results of the tokens with top_p + # probability mass. So 0.1 means only the tokens comprising the top 10% + # probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Truncation, nil] + # Body param: The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # Body param: This field is being replaced by `safety_identifier` and + # `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching + # optimizations. A stable identifier for your end-users. Used to boost cache hit + # rates by better bucketing similar requests and to help OpenAI detect and prevent + # abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -235,22 +617,31 @@ def stream_raw(params = {}) # See {OpenAI::Resources::Beta::Responses#retrieve_streaming} for streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseRetrieveParams} for more details. - # # Retrieves a model response with the given ID. # # @overload retrieve(response_id, include: nil, include_obfuscation: nil, starting_after: nil, betas: nil, request_options: {}) # - # @param response_id [String] Path param: The ID of the response to retrieve. + # @param response_id [String] + # Path param: The ID of the response to retrieve. # - # @param include [Array] Query param: Additional fields to include in the response. See the `include` + # @param include [Array] + # Query param: Additional fields to include in the response. See the `include` + # parameter for Response creation above for more information. # - # @param include_obfuscation [Boolean] Query param: When true, stream obfuscation will be enabled. Stream obfuscation a + # @param include_obfuscation [Boolean] + # Query param: When true, stream obfuscation will be enabled. Stream obfuscation + # adds random characters to an `obfuscation` field on streaming delta events to + # normalize payload sizes as a mitigation to certain side-channel attacks. These + # obfuscation fields are included by default, but add a small amount of overhead + # to the data stream. You can set `include_obfuscation` to false to optimize for + # bandwidth if you trust the network links between your application and the OpenAI + # API. # - # @param starting_after [Integer] Query param: The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # Query param: The sequence number of the event after which to start streaming. # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -279,22 +670,31 @@ def retrieve(response_id, params = {}) # See {OpenAI::Resources::Beta::Responses#retrieve} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseRetrieveParams} for more details. - # # Retrieves a model response with the given ID. # # @overload retrieve_streaming(response_id, include: nil, include_obfuscation: nil, starting_after: nil, betas: nil, request_options: {}) # - # @param response_id [String] Path param: The ID of the response to retrieve. + # @param response_id [String] + # Path param: The ID of the response to retrieve. # - # @param include [Array] Query param: Additional fields to include in the response. See the `include` + # @param include [Array] + # Query param: Additional fields to include in the response. See the `include` + # parameter for Response creation above for more information. # - # @param include_obfuscation [Boolean] Query param: When true, stream obfuscation will be enabled. Stream obfuscation a + # @param include_obfuscation [Boolean] + # Query param: When true, stream obfuscation will be enabled. Stream obfuscation + # adds random characters to an `obfuscation` field on streaming delta events to + # normalize payload sizes as a mitigation to certain side-channel attacks. These + # obfuscation fields are included by default, but add a small amount of overhead + # to the data stream. You can set `include_obfuscation` to false to optimize for + # bandwidth if you trust the network links between your application and the OpenAI + # API. # - # @param starting_after [Integer] Query param: The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # Query param: The sequence number of the event after which to start streaming. # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -333,9 +733,11 @@ def retrieve_streaming(response_id, params = {}) # # @overload delete(response_id, betas: nil, request_options: {}) # - # @param response_id [String] The ID of the response to delete. + # @param response_id [String] + # The ID of the response to delete. # - # @param betas [Array] Optional beta features to enable for this request. + # @param betas [Array] + # Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -356,13 +758,15 @@ def delete(response_id, params = {}) # Cancels a model response with the given ID. Only responses created with the # `background` parameter set to `true` can be cancelled. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @overload cancel(response_id, betas: nil, request_options: {}) # - # @param response_id [String] The ID of the response to cancel. + # @param response_id [String] + # The ID of the response to cancel. # - # @param betas [Array] Optional beta features to enable for this request. + # @param betas [Array] + # Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -381,35 +785,76 @@ def cancel(response_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ResponseCompactParams} for more details. - # # Compact a conversation. Returns a compacted response object. # # Learn when and how to compact long-running conversations in the - # [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + # [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). # For ZDR-compatible compaction details, see - # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). # # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {}) # - # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil] Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI o - # - # @param input [String, Array, nil] Body param: Text, image, or file inputs to the model, used to generate a respons - # - # @param instructions [String, nil] Body param: A system (or developer) message inserted into the model's context. - # - # @param previous_response_id [String, nil] Body param: The unique ID of the previous response to the model. Use this to cre - # - # @param prompt_cache_key [String, nil] Body param: A key to use when reading from or writing to the prompt cache. - # - # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions, nil] Body param: Options for prompt caching. Supported for `gpt-5.6` and later models - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] Body param: How long to retain a prompt cache entry created by this request. - # - # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. - If s - # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil] + # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param input [String, Array, nil] + # Body param: Text, image, or file inputs to the model, used to generate a + # response + # + # @param instructions [String, nil] + # Body param: A system (or developer) message inserted into the model's context. + # When used along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param previous_response_id [String, nil] + # Body param: The unique ID of the previous response to the model. Use this to + # create multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt_cache_key [String, nil] + # Body param: A key to use when reading from or writing to the prompt cache. + # + # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCompactParams::PromptCacheOptions, nil] + # Body param: Options for prompt caching. Supported for `gpt-5.6` and later + # models. By default, OpenAI automatically chooses one implicit cache breakpoint. + # You can add explicit breakpoints to content blocks with + # `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For + # cache matching, OpenAI considers up to the latest 80 breakpoints in the + # conversation, without a content-block lookback limit. Set `mode` to `explicit` + # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is + # currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] + # Body param: How long to retain a prompt cache entry created by this request. + # + # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] + # Body param: Specifies the processing type used for serving the request. - 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'. - If set to 'default', then the request will be processed with the + # standard pricing and performance for the selected model. - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. + # + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/responses/input_items.rb b/lib/openai/resources/beta/responses/input_items.rb index a4629a461..f829f2c73 100644 --- a/lib/openai/resources/beta/responses/input_items.rb +++ b/lib/openai/resources/beta/responses/input_items.rb @@ -5,24 +5,32 @@ module Resources class Beta class Responses class InputItems - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputItemListParams} for more details. - # # Returns a list of input items for a given response. # # @overload list(response_id, after: nil, include: nil, limit: nil, order: nil, betas: nil, request_options: {}) # - # @param response_id [String] Path param: The ID of the response to retrieve input items for. + # @param response_id [String] + # Path param: The ID of the response to retrieve input items for. + # + # @param after [String] + # Query param: An item ID to list items after, used in pagination. # - # @param after [String] Query param: An item ID to list items after, used in pagination. + # @param include [Array] + # Query param: Additional fields to include in the response. See the `include` + # parameter for Response creation above for more information. # - # @param include [Array] Query param: Additional fields to include in the response. See the `include` + # @param limit [Integer] + # Query param: A limit on the number of objects to be returned. Limit can range + # between 1 and 100, and the default is 20. # - # @param limit [Integer] Query param: A limit on the number of objects to be returned. Limit can range be + # @param order [Symbol, OpenAI::Models::Beta::Responses::InputItemListParams::Order] + # Query param: The order to return the input items in. Default is `desc`. # - # @param order [Symbol, OpenAI::Models::Beta::Responses::InputItemListParams::Order] Query param: The order to return the input items in. Default is `desc`. + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/responses/input_tokens.rb b/lib/openai/resources/beta/responses/input_tokens.rb index 6956d4755..0500e2a22 100644 --- a/lib/openai/resources/beta/responses/input_tokens.rb +++ b/lib/openai/resources/beta/responses/input_tokens.rb @@ -5,9 +5,6 @@ module Resources class Beta class Responses class InputTokens - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Responses::InputTokenCountParams} for more details. - # # Returns input token counts of the request. # # Returns an object with `object` set to `response.input_tokens` and an @@ -15,31 +12,71 @@ class InputTokens # # @overload count(conversation: nil, input: nil, instructions: nil, model: nil, parallel_tool_calls: nil, personality: nil, previous_response_id: nil, reasoning: nil, text: nil, tool_choice: nil, tools: nil, truncation: nil, betas: nil, request_options: {}) # - # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] Body param: The conversation that this response belongs to. Items from this conv - # - # @param input [String, Array, nil] Body param: Text, image, or file inputs to the model, used to generate a respons - # - # @param instructions [String, nil] Body param: A system (or developer) message inserted into the model's context. - # - # @param model [String, nil] Body param: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenA - # - # @param parallel_tool_calls [Boolean, nil] Body param: Whether to allow the model to run tool calls in parallel. - # - # @param personality [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Personality] Body param: A model-owned style preset to apply to this request. Omit this param - # - # @param previous_response_id [String, nil] Body param: The unique ID of the previous response to the model. Use this to cre - # - # @param reasoning [OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning, nil] Body param: **gpt-5 and o-series models only** Configuration options for [reason - # - # @param text [OpenAI::Models::Beta::Responses::InputTokenCountParams::Text, nil] Body param: Configuration options for a text response from the model. Can be pla - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::Responses::InputTokenCountParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell, nil] Body param: Controls which tool the model should use, if any. - # - # @param tools [Array, nil] Body param: An array of tools the model may call while generating a response. Yo - # - # @param truncation [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Truncation] Body param: The truncation strategy to use for the model response. - `auto`: If - # - # @param betas [Array] Header param: Optional beta features to enable for this request. + # @param conversation [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil] + # Body param: The conversation that this response belongs to. Items from this + # conversation are prepended to `input_items` for this response request. Input + # items and output items from this response are automatically added to this + # conversation after this response completes. + # + # @param input [String, Array, nil] + # Body param: Text, image, or file inputs to the model, used to generate a + # response + # + # @param instructions [String, nil] + # Body param: A system (or developer) message inserted into the model's context. + # When used along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param model [String, nil] + # Body param: Model ID used to generate the response, like `gpt-4o` or `o3`. + # OpenAI offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param parallel_tool_calls [Boolean, nil] + # Body param: Whether to allow the model to run tool calls in parallel. + # + # @param personality [String, Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Personality] + # Body param: A model-owned style preset to apply to this request. Omit this + # parameter to use the model's default style. Supported values may expand over + # time. Values must be at most 64 characters. + # + # @param previous_response_id [String, nil] + # Body param: The unique ID of the previous response to the model. Use this to + # create multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param reasoning [OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning, nil] + # Body param: **gpt-5 and o-series models only** Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param text [OpenAI::Models::Beta::Responses::InputTokenCountParams::Text, nil] + # Body param: Configuration options for a text response from the model. Can be + # plain text or structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::BetaToolChoiceOptions, OpenAI::Models::Beta::BetaToolChoiceAllowed, OpenAI::Models::Beta::BetaToolChoiceTypes, OpenAI::Models::Beta::BetaToolChoiceFunction, OpenAI::Models::Beta::BetaToolChoiceMcp, OpenAI::Models::Beta::BetaToolChoiceCustom, OpenAI::Models::Beta::Responses::InputTokenCountParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam, OpenAI::Models::Beta::BetaToolChoiceApplyPatch, OpenAI::Models::Beta::BetaToolChoiceShell, nil] + # Body param: Controls which tool the model should use, if any. + # + # @param tools [Array, nil] + # Body param: An array of tools the model may call while generating a response. + # You can specify which tool to use by setting the `tool_choice` parameter. + # + # @param truncation [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Truncation] + # Body param: The truncation strategy to use for the model response. - `auto`: If + # the input to this Response exceeds the model's context window size, the model + # will truncate the response to fit the context window by dropping items from the + # beginning of the conversation. - `disabled` (default): If the input size will + # exceed the context window size for a model, the request will fail with a 400 + # error. + # + # @param betas [Array] + # Header param: Optional beta features to enable for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/threads.rb b/lib/openai/resources/beta/threads.rb index d65767a45..f42729698 100644 --- a/lib/openai/resources/beta/threads.rb +++ b/lib/openai/resources/beta/threads.rb @@ -17,18 +17,28 @@ class Threads # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateParams} for more details. - # # Create a thread. # # @overload create(messages: nil, metadata: nil, tool_resources: nil, request_options: {}) # - # @param messages [Array] A list of [messages](https://platform.openai.com/docs/api-reference/messages) to + # @param messages [Array] + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateParams::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateParams::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -53,7 +63,8 @@ def create(params = {}) # # @overload retrieve(thread_id, request_options: {}) # - # @param thread_id [String] The ID of the thread to retrieve. + # @param thread_id [String] + # The ID of the thread to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -72,18 +83,26 @@ def retrieve(thread_id, params = {}) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadUpdateParams} for more details. - # # Modifies a thread. # # @overload update(thread_id, metadata: nil, tool_resources: nil, request_options: {}) # - # @param thread_id [String] The ID of the thread to modify. Only the `metadata` can be modified. + # @param thread_id [String] + # The ID of the thread to modify. Only the `metadata` can be modified. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param tool_resources [OpenAI::Models::Beta::ThreadUpdateParams::ToolResources, nil] A set of resources that are made available to the assistant's tools in this thre + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param tool_resources [OpenAI::Models::Beta::ThreadUpdateParams::ToolResources, nil] + # A set of resources that are made available to the assistant's tools in this + # thread. The resources are specific to the type of tool. For example, the + # `code_interpreter` tool requires a list of file IDs, while the `file_search` + # tool requires a list of vector store IDs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -108,7 +127,8 @@ def update(thread_id, params = {}) # # @overload delete(thread_id, request_options: {}) # - # @param thread_id [String] The ID of the thread to delete. + # @param thread_id [String] + # The ID of the thread to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -129,42 +149,113 @@ def delete(thread_id, params = {}) # # See {OpenAI::Resources::Beta::Threads#stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams} for more details. - # # Create a thread and run it in one request. # # @overload create_and_run(assistant_id:, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, response_format: nil, temperature: nil, thread: nil, tool_choice: nil, tool_resources: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista - # - # @param instructions [String, nil] Override the default system message of the assistant. This is useful for modifyi - # - # @param max_completion_tokens [Integer, nil] The maximum number of completion tokens that may be used over the course of the - # - # @param max_prompt_tokens [Integer, nil] The maximum number of prompt tokens that may be used over the course of the run. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] Options to create a new thread. If no thread is provided when running a - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Controls which (if any) tool is called by the model. - # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param tools [Array, nil] Override the tools the assistant can use for this run. This is useful for modify - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the - # - # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] Controls for how a thread will be truncated prior to the run. Use this to contro + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param instructions [String, nil] + # Override the default system message of the assistant. This is useful for + # modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # The maximum number of completion tokens that may be used over the course of the + # run. The run will make a best effort to use only the number of completion tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # completion tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # The maximum number of prompt tokens that may be used over the course of the run. + # The run will make a best effort to use only the number of prompt tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # prompt tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] + # Options to create a new thread. If no thread is provided when running a request, + # an empty thread will be created. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tools and instead generates a message. `auto` is the default value + # and means the model can pick between generating a message or calling one or more + # tools. `required` means the model must call one or more tools before responding + # to the user. Specifying a particular tool like `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array, nil] + # Override the tools the assistant can use for this run. This is useful for + # modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] + # Controls for how a thread will be truncated prior to the run. Use this to + # control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -197,42 +288,113 @@ def stream # See {OpenAI::Resources::Beta::Threads#create_and_run} for non-streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::ThreadCreateAndRunParams} for more details. - # # Create a thread and run it in one request. # # @overload stream_raw(assistant_id:, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, response_format: nil, temperature: nil, thread: nil, tool_choice: nil, tool_resources: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) # - # @param assistant_id [String] The ID of the [assistant](https://platform.openai.com/docs/api-reference/assista - # - # @param instructions [String, nil] Override the default system message of the assistant. This is useful for modifyi - # - # @param max_completion_tokens [Integer, nil] The maximum number of completion tokens that may be used over the course of the - # - # @param max_prompt_tokens [Integer, nil] The maximum number of prompt tokens that may be used over the course of the run. - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Specifies the format that the model must output. Compatible with [GPT-4o](https: - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] Options to create a new thread. If no thread is provided when running a - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Controls which (if any) tool is called by the model. - # - # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] A set of resources that are used by the assistant's tools. The resources are spe - # - # @param tools [Array, nil] Override the tools the assistant can use for this run. This is useful for modify - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the - # - # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] Controls for how a thread will be truncated prior to the run. Use this to contro + # @param assistant_id [String] + # The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param instructions [String, nil] + # Override the default system message of the assistant. This is useful for + # modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # The maximum number of completion tokens that may be used over the course of the + # run. The run will make a best effort to use only the number of completion tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # completion tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # The maximum number of prompt tokens that may be used over the course of the run. + # The run will make a best effort to use only the number of prompt tokens + # specified, across multiple turns of the run. If the run exceeds the number of + # prompt tokens specified, the run will end with status `incomplete`. See + # `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. + # + # @param thread [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread] + # Options to create a new thread. If no thread is provided when running a request, + # an empty thread will be created. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tools and instead generates a message. `auto` is the default value + # and means the model can pick between generating a message or calling one or more + # tools. `required` means the model must call one or more tools before responding + # to the user. Specifying a particular tool like `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tool_resources [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources, nil] + # A set of resources that are used by the assistant's tools. The resources are + # specific to the type of tool. For example, the `code_interpreter` tool requires + # a list of file IDs, while the `file_search` tool requires a list of vector store + # IDs. + # + # @param tools [Array, nil] + # Override the tools the assistant can use for this run. This is useful for + # modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil] + # Controls for how a thread will be truncated prior to the run. Use this to + # control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/threads/messages.rb b/lib/openai/resources/beta/threads/messages.rb index 02d6cd505..918de037f 100644 --- a/lib/openai/resources/beta/threads/messages.rb +++ b/lib/openai/resources/beta/threads/messages.rb @@ -10,22 +10,36 @@ class Threads class Messages # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageCreateParams} for more details. - # # Create a message. # # @overload create(thread_id, content:, role:, attachments: nil, metadata: nil, request_options: {}) # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to create + # a message for. + # + # @param content [String, Array] + # The text contents of the message. # - # @param content [String, Array] The text contents of the message. + # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageCreateParams::Role] + # The role of the entity that is creating the message. Allowed values include: # - # @param role [Symbol, OpenAI::Models::Beta::Threads::MessageCreateParams::Role] The role of the entity that is creating the message. Allowed values include: + # - `user`: Indicates the message is sent by an actual user and should be used in + # most cases to represent user-generated messages. + # - `assistant`: Indicates the message is generated by the assistant. Use this + # value to insert messages from the assistant into the conversation. # - # @param attachments [Array, nil] A list of files attached to the message, and the tools they should be added to. + # @param attachments [Array, nil] + # A list of files attached to the message, and the tools they should be added to. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -46,16 +60,17 @@ def create(thread_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageRetrieveParams} for more details. - # # Retrieve a message. # # @overload retrieve(message_id, thread_id:, request_options: {}) # - # @param message_id [String] The ID of the message to retrieve. + # @param message_id [String] + # The ID of the message to retrieve. # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this message belongs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -79,18 +94,23 @@ def retrieve(message_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageUpdateParams} for more details. - # # Modifies a message. # # @overload update(message_id, thread_id:, metadata: nil, request_options: {}) # - # @param message_id [String] Path param: The ID of the message to modify. + # @param message_id [String] + # Path param: The ID of the message to modify. + # + # @param thread_id [String] + # Path param: The ID of the thread to which this message belongs. # - # @param thread_id [String] Path param: The ID of the thread to which this message belongs. + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -115,24 +135,37 @@ def update(message_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::MessageListParams} for more details. - # # Returns a list of messages for a given thread. # # @overload list(thread_id, after: nil, before: nil, limit: nil, order: nil, run_id: nil, request_options: {}) # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) the + # messages belong to. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Beta::Threads::MessageListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::Threads::MessageListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # - # @param run_id [String] Filter messages by the run ID that generated them. + # @param run_id [String] + # Filter messages by the run ID that generated them. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -159,9 +192,11 @@ def list(thread_id, params = {}) # # @overload delete(message_id, thread_id:, request_options: {}) # - # @param message_id [String] The ID of the message to delete. + # @param message_id [String] + # The ID of the message to delete. # - # @param thread_id [String] The ID of the thread to which this message belongs. + # @param thread_id [String] + # The ID of the thread to which this message belongs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/threads/runs.rb b/lib/openai/resources/beta/threads/runs.rb index fd034b272..2427588b0 100644 --- a/lib/openai/resources/beta/threads/runs.rb +++ b/lib/openai/resources/beta/threads/runs.rb @@ -17,48 +17,136 @@ class Runs # See {OpenAI::Resources::Beta::Threads::Runs#create_stream_raw} for streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunCreateParams} for more details. - # # Create a run. # # @overload create(thread_id, assistant_id:, include: nil, additional_instructions: nil, additional_messages: nil, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_choice: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) # - # @param thread_id [String] Path param: The ID of the thread to run. - # - # @param assistant_id [String] Body param: The ID of the [assistant](https://platform.openai.com/docs/api-refer - # - # @param include [Array] Query param: A list of additional fields to include in the response. Currently t - # - # @param additional_instructions [String, nil] Body param: Appends additional instructions at the end of the instructions for t - # - # @param additional_messages [Array, nil] Body param: Adds additional messages to the thread before creating the run. - # - # @param instructions [String, nil] Body param: Overrides the [instructions](https://platform.openai.com/docs/api-re - # - # @param max_completion_tokens [Integer, nil] Body param: The maximum number of completion tokens that may be used over the co - # - # @param max_prompt_tokens [Integer, nil] Body param: The maximum number of prompt tokens that may be used over the course - # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] Body param: The ID of the [Model](https://platform.openai.com/docs/api-reference - # - # @param parallel_tool_calls [Boolean] Body param: Whether to enable [parallel function calling](https://platform.opena - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Body param: Constrains effort on reasoning for reasoning models. Currently suppo - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Body param: Specifies the format that the model must output. Compatible with [GP - # - # @param temperature [Float, nil] Body param: What sampling temperature to use, between 0 and 2. Higher values lik - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Body param: Controls which (if any) tool is called by the model. - # - # @param tools [Array, nil] Body param: Override the tools the assistant can use for this run. This is usefu - # - # @param top_p [Float, nil] Body param: An alternative to sampling with temperature, called nucleus sampling - # - # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] Body param: Controls for how a thread will be truncated prior to the run. Use th + # @param thread_id [String] + # Path param: The ID of the thread to run. + # + # @param assistant_id [String] + # Body param: The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param include [Array] + # Query param: A list of additional fields to include in the response. Currently + # the only supported value is + # `step_details.tool_calls[*].file_search.results[*].content` to fetch the file + # search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. + # + # @param additional_instructions [String, nil] + # Body param: Appends additional instructions at the end of the instructions for + # the run. This is useful for modifying the behavior on a per-run basis without + # overriding other instructions. + # + # @param additional_messages [Array, nil] + # Body param: Adds additional messages to the thread before creating the run. + # + # @param instructions [String, nil] + # Body param: Overrides the + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # Body param: The maximum number of completion tokens that may be used over the + # course of the run. The run will make a best effort to use only the number of + # completion tokens specified, across multiple turns of the run. If the run + # exceeds the number of completion tokens specified, the run will end with status + # `incomplete`. See `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # Body param: The maximum number of prompt tokens that may be used over the course + # of the run. The run will make a best effort to use only the number of prompt + # tokens specified, across multiple turns of the run. If the run exceeds the + # number of prompt tokens specified, the run will end with status `incomplete`. + # See `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # Body param: The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Body param: Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Body param: Constrains effort on reasoning for reasoning models. Currently + # supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and + # `max`. Reducing reasoning effort can result in faster responses and fewer tokens + # used on reasoning in a response. Not all reasoning models support every value. + # See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Body param: Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # Body param: What sampling temperature to use, between 0 and 2. Higher values + # like 0.8 will make the output more random, while lower values like 0.2 will make + # it more focused and deterministic. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Body param: Controls which (if any) tool is called by the model. `none` means + # the model will not call any tools and instead generates a message. `auto` is the + # default value and means the model can pick between generating a message or + # calling one or more tools. `required` means the model must call one or more + # tools before responding to the user. Specifying a particular tool like + # `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tools [Array, nil] + # Body param: Override the tools the assistant can use for this run. This is + # useful for modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # Body param: An alternative to sampling with temperature, called nucleus + # sampling, where the model considers the results of the tokens with top_p + # probability mass. So 0.1 means only the tokens comprising the top 10% + # probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] + # Body param: Controls for how a thread will be truncated prior to the run. Use + # this to control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -90,48 +178,136 @@ def create(thread_id, params) # See {OpenAI::Resources::Beta::Threads::Runs#create} for non-streaming # counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunCreateParams} for more details. - # # Create a run. # # @overload create_stream_raw(thread_id, assistant_id:, include: nil, additional_instructions: nil, additional_messages: nil, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_choice: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {}) # - # @param thread_id [String] Path param: The ID of the thread to run. - # - # @param assistant_id [String] Body param: The ID of the [assistant](https://platform.openai.com/docs/api-refer - # - # @param include [Array] Query param: A list of additional fields to include in the response. Currently t - # - # @param additional_instructions [String, nil] Body param: Appends additional instructions at the end of the instructions for t - # - # @param additional_messages [Array, nil] Body param: Adds additional messages to the thread before creating the run. - # - # @param instructions [String, nil] Body param: Overrides the [instructions](https://platform.openai.com/docs/api-re - # - # @param max_completion_tokens [Integer, nil] Body param: The maximum number of completion tokens that may be used over the co - # - # @param max_prompt_tokens [Integer, nil] Body param: The maximum number of prompt tokens that may be used over the course - # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] Body param: The ID of the [Model](https://platform.openai.com/docs/api-reference - # - # @param parallel_tool_calls [Boolean] Body param: Whether to enable [parallel function calling](https://platform.opena - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Body param: Constrains effort on reasoning for reasoning models. Currently suppo - # - # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] Body param: Specifies the format that the model must output. Compatible with [GP - # - # @param temperature [Float, nil] Body param: What sampling temperature to use, between 0 and 2. Higher values lik - # - # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] Body param: Controls which (if any) tool is called by the model. - # - # @param tools [Array, nil] Body param: Override the tools the assistant can use for this run. This is usefu - # - # @param top_p [Float, nil] Body param: An alternative to sampling with temperature, called nucleus sampling - # - # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] Body param: Controls for how a thread will be truncated prior to the run. Use th + # @param thread_id [String] + # Path param: The ID of the thread to run. + # + # @param assistant_id [String] + # Body param: The ID of the + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. + # + # @param include [Array] + # Query param: A list of additional fields to include in the response. Currently + # the only supported value is + # `step_details.tool_calls[*].file_search.results[*].content` to fetch the file + # search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. + # + # @param additional_instructions [String, nil] + # Body param: Appends additional instructions at the end of the instructions for + # the run. This is useful for modifying the behavior on a per-run basis without + # overriding other instructions. + # + # @param additional_messages [Array, nil] + # Body param: Adds additional messages to the thread before creating the run. + # + # @param instructions [String, nil] + # Body param: Overrides the + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. + # + # @param max_completion_tokens [Integer, nil] + # Body param: The maximum number of completion tokens that may be used over the + # course of the run. The run will make a best effort to use only the number of + # completion tokens specified, across multiple turns of the run. If the run + # exceeds the number of completion tokens specified, the run will end with status + # `incomplete`. See `incomplete_details` for more info. + # + # @param max_prompt_tokens [Integer, nil] + # Body param: The maximum number of prompt tokens that may be used over the course + # of the run. The run will make a best effort to use only the number of prompt + # tokens specified, across multiple turns of the run. If the run exceeds the + # number of prompt tokens specified, the run will end with status `incomplete`. + # See `incomplete_details` for more info. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, nil] + # Body param: The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. + # + # @param parallel_tool_calls [Boolean] + # Body param: Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Body param: Constrains effort on reasoning for reasoning models. Currently + # supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and + # `max`. Reducing reasoning effort can result in faster responses and fewer tokens + # used on reasoning in a response. Not all reasoning models support every value. + # See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil] + # Body param: Specifies the format that the model must output. Compatible with + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the + # message the model generates is valid JSON. + # + # **Important:** when using JSON mode, you **must** also instruct the model to + # produce JSON yourself via a system or user message. Without this, the model may + # generate an unending stream of whitespace until the generation reaches the token + # limit, resulting in a long-running and seemingly "stuck" request. Also note that + # the message content may be partially cut off if `finish_reason="length"`, which + # indicates the generation exceeded `max_tokens` or the conversation exceeded the + # max context length. + # + # @param temperature [Float, nil] + # Body param: What sampling temperature to use, between 0 and 2. Higher values + # like 0.8 will make the output more random, while lower values like 0.2 will make + # it more focused and deterministic. + # + # @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil] + # Body param: Controls which (if any) tool is called by the model. `none` means + # the model will not call any tools and instead generates a message. `auto` is the + # default value and means the model can pick between generating a message or + # calling one or more tools. `required` means the model must call one or more + # tools before responding to the user. Specifying a particular tool like + # `{"type": "file_search"}` or + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # @param tools [Array, nil] + # Body param: Override the tools the assistant can use for this run. This is + # useful for modifying the behavior on a per-run basis. + # + # @param top_p [Float, nil] + # Body param: An alternative to sampling with temperature, called nucleus + # sampling, where the model considers the results of the tokens with top_p + # probability mass. So 0.1 means only the tokens comprising the top 10% + # probability mass are considered. + # + # We generally recommend altering this or temperature but not both. + # + # @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil] + # Body param: Controls for how a thread will be truncated prior to the run. Use + # this to control the initial context window of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -163,16 +339,17 @@ def create_stream_raw(thread_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunRetrieveParams} for more details. - # # Retrieves a run. # # @overload retrieve(run_id, thread_id:, request_options: {}) # - # @param run_id [String] The ID of the run to retrieve. + # @param run_id [String] + # The ID of the run to retrieve. # - # @param thread_id [String] The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) t + # @param thread_id [String] + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -196,18 +373,25 @@ def retrieve(run_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunUpdateParams} for more details. - # # Modifies a run. # # @overload update(run_id, thread_id:, metadata: nil, request_options: {}) # - # @param run_id [String] Path param: The ID of the run to modify. + # @param run_id [String] + # Path param: The ID of the run to modify. + # + # @param thread_id [String] + # Path param: The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. # - # @param thread_id [String] Path param: The ID of the [thread](https://platform.openai.com/docs/api-referenc + # @param metadata [Hash{Symbol=>String}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -232,22 +416,32 @@ def update(run_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunListParams} for more details. - # # Returns a list of runs belonging to a thread. # # @overload list(thread_id, after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param thread_id [String] The ID of the thread the run belongs to. + # @param thread_id [String] + # The ID of the thread the run belongs to. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -274,9 +468,11 @@ def list(thread_id, params = {}) # # @overload cancel(run_id, thread_id:, request_options: {}) # - # @param run_id [String] The ID of the run to cancel. + # @param run_id [String] + # The ID of the run to cancel. # - # @param thread_id [String] The ID of the thread to which this run belongs. + # @param thread_id [String] + # The ID of the thread to which this run belongs. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -303,9 +499,6 @@ def cancel(run_id, params) # See {OpenAI::Resources::Beta::Threads::Runs#submit_tool_outputs_stream_raw} for # streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunSubmitToolOutputsParams} for more details. - # # When a run has the `status: "requires_action"` and `required_action.type` is # `submit_tool_outputs`, this endpoint can be used to submit the outputs from the # tool calls once they're all completed. All outputs must be submitted in a single @@ -313,11 +506,16 @@ def cancel(run_id, params) # # @overload submit_tool_outputs(run_id, thread_id:, tool_outputs:, request_options: {}) # - # @param run_id [String] Path param: The ID of the run that requires the tool output submission. + # @param run_id [String] + # Path param: The ID of the run that requires the tool output submission. # - # @param thread_id [String] Path param: The ID of the [thread](https://platform.openai.com/docs/api-referenc + # @param thread_id [String] + # Path param: The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this run belongs. # - # @param tool_outputs [Array] Body param: A list of tools for which the outputs are being submitted. + # @param tool_outputs [Array] + # Body param: A list of tools for which the outputs are being submitted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -350,9 +548,6 @@ def submit_tool_outputs(run_id, params) # See {OpenAI::Resources::Beta::Threads::Runs#submit_tool_outputs} for # non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::RunSubmitToolOutputsParams} for more details. - # # When a run has the `status: "requires_action"` and `required_action.type` is # `submit_tool_outputs`, this endpoint can be used to submit the outputs from the # tool calls once they're all completed. All outputs must be submitted in a single @@ -360,11 +555,16 @@ def submit_tool_outputs(run_id, params) # # @overload submit_tool_outputs_stream_raw(run_id, thread_id:, tool_outputs:, request_options: {}) # - # @param run_id [String] Path param: The ID of the run that requires the tool output submission. + # @param run_id [String] + # Path param: The ID of the run that requires the tool output submission. # - # @param thread_id [String] Path param: The ID of the [thread](https://platform.openai.com/docs/api-referenc + # @param thread_id [String] + # Path param: The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this run belongs. # - # @param tool_outputs [Array] Body param: A list of tools for which the outputs are being submitted. + # @param tool_outputs [Array] + # Body param: A list of tools for which the outputs are being submitted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/beta/threads/runs/steps.rb b/lib/openai/resources/beta/threads/runs/steps.rb index ed026d69a..acdfce324 100644 --- a/lib/openai/resources/beta/threads/runs/steps.rb +++ b/lib/openai/resources/beta/threads/runs/steps.rb @@ -11,20 +11,28 @@ class Runs class Steps # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::StepRetrieveParams} for more details. - # # Retrieves a run step. # # @overload retrieve(step_id, thread_id:, run_id:, include: nil, request_options: {}) # - # @param step_id [String] Path param: The ID of the run step to retrieve. + # @param step_id [String] + # Path param: The ID of the run step to retrieve. + # + # @param thread_id [String] + # Path param: The ID of the thread to which the run and run step belongs. # - # @param thread_id [String] Path param: The ID of the thread to which the run and run step belongs. + # @param run_id [String] + # Path param: The ID of the run to which the run step belongs. # - # @param run_id [String] Path param: The ID of the run to which the run step belongs. + # @param include [Array] + # Query param: A list of additional fields to include in the response. Currently + # the only supported value is + # `step_details.tool_calls[*].file_search.results[*].content` to fetch the file + # search result content. # - # @param include [Array] Query param: A list of additional fields to include in the response. Currently t + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -54,26 +62,45 @@ def retrieve(step_id, params) # @deprecated The Assistants API is deprecated in favor of the Responses API # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Beta::Threads::Runs::StepListParams} for more details. - # # Returns a list of run steps belonging to a run. # # @overload list(run_id, thread_id:, after: nil, before: nil, include: nil, limit: nil, order: nil, request_options: {}) # - # @param run_id [String] Path param: The ID of the run the run steps belong to. - # - # @param thread_id [String] Path param: The ID of the thread the run and run steps belong to. - # - # @param after [String] Query param: A cursor for use in pagination. `after` is an object ID that define - # - # @param before [String] Query param: A cursor for use in pagination. `before` is an object ID that defin - # - # @param include [Array] Query param: A list of additional fields to include in the response. Currently t - # - # @param limit [Integer] Query param: A limit on the number of objects to be returned. Limit can range be - # - # @param order [Symbol, OpenAI::Models::Beta::Threads::Runs::StepListParams::Order] Query param: Sort order by the `created_at` timestamp of the objects. `asc` for + # @param run_id [String] + # Path param: The ID of the run the run steps belong to. + # + # @param thread_id [String] + # Path param: The ID of the thread the run and run steps belong to. + # + # @param after [String] + # Query param: A cursor for use in pagination. `after` is an object ID that + # defines your place in the list. For instance, if you make a list request and + # receive 100 objects, ending with obj_foo, your subsequent call can include + # after=obj_foo in order to fetch the next page of the list. + # + # @param before [String] + # Query param: A cursor for use in pagination. `before` is an object ID that + # defines your place in the list. For instance, if you make a list request and + # receive 100 objects, starting with obj_foo, your subsequent call can include + # before=obj_foo in order to fetch the previous page of the list. + # + # @param include [Array] + # Query param: A list of additional fields to include in the response. Currently + # the only supported value is + # `step_details.tool_calls[*].file_search.results[*].content` to fetch the file + # search result content. + # + # See the + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) + # for more information. + # + # @param limit [Integer] + # Query param: A limit on the number of objects to be returned. Limit can range + # between 1 and 100, and the default is 20. + # + # @param order [Symbol, OpenAI::Models::Beta::Threads::Runs::StepListParams::Order] + # Query param: Sort order by the `created_at` timestamp of the objects. `asc` for + # ascending order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/chat/completions.rb b/lib/openai/resources/chat/completions.rb index de3568914..abca15056 100644 --- a/lib/openai/resources/chat/completions.rb +++ b/lib/openai/resources/chat/completions.rb @@ -15,103 +15,310 @@ class Completions # See {OpenAI::Resources::Chat::Completions#stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams} for more details. - # # **Starting a new project?** We recommend trying - # [Responses](https://platform.openai.com/docs/api-reference/responses) to take - # advantage of the latest OpenAI platform features. Compare - # [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + # [Responses](https://developers.openai.com/api/reference/resources/responses) to + # take advantage of the latest OpenAI platform features. Compare + # [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). # # --- # # Creates a model response for the given chat conversation. Learn more in the - # [text generation](https://platform.openai.com/docs/guides/text-generation), - # [vision](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio) guides. + # [text generation](https://developers.openai.com/api/docs/guides/text), + # [vision](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio) guides. # # Parameter support can differ depending on the model used to generate the # response, particularly for newer reasoning models. Parameters that are only # supported for reasoning models are noted below. For the current state of # unsupported parameters in reasoning models, - # [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + # [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). # # Returns a chat completion object, or a streamed sequence of chat completion # chunk objects if the request is streamed. # # @overload create(messages:, model:, audio: nil, frequency_penalty: nil, function_call: nil, functions: nil, logit_bias: nil, logprobs: nil, max_completion_tokens: nil, max_tokens: nil, metadata: nil, modalities: nil, moderation: nil, n: nil, parallel_tool_calls: nil, prediction: nil, presence_penalty: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning_effort: nil, response_format: nil, safety_identifier: nil, seed: nil, service_tier: nil, stop: nil, store: nil, stream_options: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, user: nil, verbosity: nil, web_search_options: nil, request_options: {}) # - # @param messages [Array] A list of messages comprising the conversation so far. Depending on the - # - # @param model [String, Symbol, OpenAI::Models::ChatModel] Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI - # - # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] Parameters for audio output. Required when audio output is requested with - # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on - # - # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] Deprecated in favor of `tool_choice`. - # - # @param functions [Array] Deprecated in favor of `tools`. - # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. - # - # @param logprobs [Boolean, nil] Whether to return log probabilities of the output tokens or not. If true, - # - # @param max_completion_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a completion, - # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param modalities [Array, nil] Output types that you would like the model to generate. - # - # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] Configuration for running moderation on the request input and generated output. - # - # @param n [Integer, nil] How many chat completion choices to generate for each input message. Note that y - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] Static predicted output content, such as the content of a text file that is - # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on + # @param messages [Array] + # A list of messages comprising the conversation so far. Depending on the + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param model [String, Symbol, OpenAI::Models::ChatModel] + # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default + # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] + # Parameters for audio output. Required when audio output is requested with + # `modalities: ["audio"]`. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param seed [Integer, nil] This feature is in Beta. - # - # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. - # - # @param store [Boolean, nil] Whether or not to store the output of this chat completion request for - # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] Controls which (if any) tool is called by the model. - # - # @param tools [Array] A list of tools the model may call. You can provide either - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in - # - # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] This tool searches the web for relevant results to use in a response. + # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] + # Deprecated in favor of `tool_choice`. + # + # Controls which (if any) function is called by the model. + # + # `none` means the model will not call a function and instead generates a message. + # + # `auto` means the model can pick between generating a message or calling a + # function. + # + # Specifying a particular function via `{"name": "my_function"}` forces the model + # to call that function. + # + # `none` is the default when no functions are present. `auto` is the default if + # functions are present. + # + # @param functions [Array] + # Deprecated in favor of `tools`. + # + # A list of functions the model may generate JSON inputs for. + # + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. + # + # Accepts a JSON object that maps tokens (specified by their token ID in the + # tokenizer) to an associated bias value from -100 to 100. Mathematically, the + # bias is added to the logits generated by the model prior to sampling. The exact + # effect will vary per model, but values between -1 and 1 should decrease or + # increase likelihood of selection; values like -100 or 100 should result in a ban + # or exclusive selection of the relevant token. + # + # @param logprobs [Boolean, nil] + # Whether to return log probabilities of the output tokens or not. If true, + # returns the log probabilities of each output token returned in the `content` of + # `message`. + # + # @param max_completion_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a completion, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control + # [costs](https://openai.com/api/pricing/) for text generated via API. + # + # This value is now deprecated in favor of `max_completion_tokens`, and is not + # compatible with + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param modalities [Array, nil] + # Output types that you would like the model to generate. Most models are capable + # of generating text, which is the default: + # + # `["text"]` + # + # The `gpt-4o-audio-preview` model can also be used to + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: + # + # `["text", "audio"]` + # + # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] + # Configuration for running moderation on the request input and generated output. + # + # @param n [Integer, nil] + # How many chat completion choices to generate for each input message. Note that + # you will be charged based on the number of generated tokens across all of the + # choices. Keep `n` as `1` to minimize costs. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] + # Static predicted output content, such as the content of a text file that is + # being regenerated. + # + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param seed [Integer, nil] + # This feature is in Beta. If specified, our system will make a best effort to + # sample deterministically, such that repeated requests with the same `seed` and + # parameters should return the same result. Determinism is not guaranteed, and you + # should refer to the `system_fingerprint` response parameter to monitor changes + # in the backend. + # + # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. + # + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. + # + # @param store [Boolean, nil] + # Whether or not to store the output of this chat completion request for use in + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. + # + # Supports text and image inputs. Note: image inputs over 8MB will be dropped. + # + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tool and instead generates a message. `auto` means the model can + # pick between generating a message or calling one or more tools. `required` means + # the model must call one or more tools. Specifying a particular tool via + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # `none` is the default when no tools are present. `auto` is the default if tools + # are present. + # + # @param tools [Array] + # A list of tools the model may call. You can provide either + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # `logprobs` must be set to `true` if this parameter is used. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. + # + # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] + # This tool searches the web for relevant results to use in a response. Learn more + # about the + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -177,103 +384,310 @@ def stream(params) # See {OpenAI::Resources::Chat::Completions#create} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionCreateParams} for more details. - # # **Starting a new project?** We recommend trying - # [Responses](https://platform.openai.com/docs/api-reference/responses) to take - # advantage of the latest OpenAI platform features. Compare - # [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + # [Responses](https://developers.openai.com/api/reference/resources/responses) to + # take advantage of the latest OpenAI platform features. Compare + # [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). # # --- # # Creates a model response for the given chat conversation. Learn more in the - # [text generation](https://platform.openai.com/docs/guides/text-generation), - # [vision](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio) guides. + # [text generation](https://developers.openai.com/api/docs/guides/text), + # [vision](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio) guides. # # Parameter support can differ depending on the model used to generate the # response, particularly for newer reasoning models. Parameters that are only # supported for reasoning models are noted below. For the current state of # unsupported parameters in reasoning models, - # [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + # [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). # # Returns a chat completion object, or a streamed sequence of chat completion # chunk objects if the request is streamed. # # @overload stream_raw(messages:, model:, audio: nil, frequency_penalty: nil, function_call: nil, functions: nil, logit_bias: nil, logprobs: nil, max_completion_tokens: nil, max_tokens: nil, metadata: nil, modalities: nil, moderation: nil, n: nil, parallel_tool_calls: nil, prediction: nil, presence_penalty: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning_effort: nil, response_format: nil, safety_identifier: nil, seed: nil, service_tier: nil, stop: nil, store: nil, stream_options: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, user: nil, verbosity: nil, web_search_options: nil, request_options: {}) # - # @param messages [Array] A list of messages comprising the conversation so far. Depending on the - # - # @param model [String, Symbol, OpenAI::Models::ChatModel] Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI + # @param messages [Array] + # A list of messages comprising the conversation so far. Depending on the + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). # - # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] Parameters for audio output. Required when audio output is requested with + # @param model [String, Symbol, OpenAI::Models::ChatModel] + # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI + # offers a wide range of models with different capabilities, performance + # characteristics, and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on + # @param audio [OpenAI::Models::Chat::ChatCompletionAudioParam, nil] + # Parameters for audio output. Required when audio output is requested with + # `modalities: ["audio"]`. + # [Learn more](https://developers.openai.com/api/docs/guides/audio). # - # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] Deprecated in favor of `tool_choice`. + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. # - # @param functions [Array] Deprecated in favor of `tools`. - # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. - # - # @param logprobs [Boolean, nil] Whether to return log probabilities of the output tokens or not. If true, - # - # @param max_completion_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a completion, - # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param modalities [Array, nil] Output types that you would like the model to generate. - # - # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] Configuration for running moderation on the request input and generated output. - # - # @param n [Integer, nil] How many chat completion choices to generate for each input message. Note that y - # - # @param parallel_tool_calls [Boolean] Whether to enable [parallel function calling](https://platform.openai.com/docs/g - # - # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] Static predicted output content, such as the content of a text file that is - # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for reasoning models. Currently supported - # - # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param seed [Integer, nil] This feature is in Beta. - # - # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. - # - # @param store [Boolean, nil] Whether or not to store the output of this chat completion request for - # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] Controls which (if any) tool is called by the model. - # - # @param tools [Array] A list of tools the model may call. You can provide either - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in - # - # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] This tool searches the web for relevant results to use in a response. + # @param function_call [Symbol, OpenAI::Models::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode, OpenAI::Models::Chat::ChatCompletionFunctionCallOption] + # Deprecated in favor of `tool_choice`. + # + # Controls which (if any) function is called by the model. + # + # `none` means the model will not call a function and instead generates a message. + # + # `auto` means the model can pick between generating a message or calling a + # function. + # + # Specifying a particular function via `{"name": "my_function"}` forces the model + # to call that function. + # + # `none` is the default when no functions are present. `auto` is the default if + # functions are present. + # + # @param functions [Array] + # Deprecated in favor of `tools`. + # + # A list of functions the model may generate JSON inputs for. + # + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. + # + # Accepts a JSON object that maps tokens (specified by their token ID in the + # tokenizer) to an associated bias value from -100 to 100. Mathematically, the + # bias is added to the logits generated by the model prior to sampling. The exact + # effect will vary per model, but values between -1 and 1 should decrease or + # increase likelihood of selection; values like -100 or 100 should result in a ban + # or exclusive selection of the relevant token. + # + # @param logprobs [Boolean, nil] + # Whether to return log probabilities of the output tokens or not. If true, + # returns the log probabilities of each output token returned in the `content` of + # `message`. + # + # @param max_completion_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a completion, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control + # [costs](https://openai.com/api/pricing/) for text generated via API. + # + # This value is now deprecated in favor of `max_completion_tokens`, and is not + # compatible with + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param modalities [Array, nil] + # Output types that you would like the model to generate. Most models are capable + # of generating text, which is the default: + # + # `["text"]` + # + # The `gpt-4o-audio-preview` model can also be used to + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: + # + # `["text", "audio"]` + # + # @param moderation [OpenAI::Models::Chat::CompletionCreateParams::Moderation, nil] + # Configuration for running moderation on the request input and generated output. + # + # @param n [Integer, nil] + # How many chat completion choices to generate for each input message. Note that + # you will be charged based on the number of generated tokens across all of the + # choices. Keep `n` as `1` to minimize costs. + # + # @param parallel_tool_calls [Boolean] + # Whether to enable + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) + # during tool use. + # + # @param prediction [OpenAI::Models::Chat::ChatCompletionPredictionContent, nil] + # Static predicted output content, such as the content of a text file that is + # being regenerated. + # + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Chat::CompletionCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] + # Constrains effort on reasoning for reasoning models. Currently supported values + # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing + # reasoning effort can result in faster responses and fewer tokens used on + # reasoning in a response. Not all reasoning models support every value. See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + # model-specific support. + # + # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] + # An object specifying the format that the model must output. + # + # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + # Outputs which ensures the model will match your supplied JSON schema. Learn more + # in the + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). + # + # Setting to `{ "type": "json_object" }` enables the older JSON mode, which + # ensures the message the model generates is valid JSON. Using `json_schema` is + # preferred for models that support it. + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param seed [Integer, nil] + # This feature is in Beta. If specified, our system will make a best effort to + # sample deterministically, such that repeated requests with the same `seed` and + # parameters should return the same result. Determinism is not guaranteed, and you + # should refer to the `system_fingerprint` response parameter to monitor changes + # in the backend. + # + # @param service_tier [Symbol, OpenAI::Models::Chat::CompletionCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. + # + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. + # + # @param store [Boolean, nil] + # Whether or not to store the output of this chat completion request for use in + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. + # + # Supports text and image inputs. Note: image inputs over 8MB will be dropped. + # + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] + # Controls which (if any) tool is called by the model. `none` means the model will + # not call any tool and instead generates a message. `auto` means the model can + # pick between generating a message or calling one or more tools. `required` means + # the model must call one or more tools. Specifying a particular tool via + # `{"type": "function", "function": {"name": "my_function"}}` forces the model to + # call that tool. + # + # `none` is the default when no tools are present. `auto` is the default if tools + # are present. + # + # @param tools [Array] + # A list of tools the model may call. You can provide either + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # `logprobs` must be set to `true` if this parameter is used. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] + # Constrains the verbosity of the model's response. Lower values will result in + # more concise responses, while higher values will result in more verbose + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. + # + # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] + # This tool searches the web for relevant results to use in a response. Learn more + # about the + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -305,7 +719,8 @@ def stream_raw(params) # # @overload retrieve(completion_id, request_options: {}) # - # @param completion_id [String] The ID of the chat completion to retrieve. + # @param completion_id [String] + # The ID of the chat completion to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -322,18 +737,22 @@ def retrieve(completion_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionUpdateParams} for more details. - # # Modify a stored chat completion. Only Chat Completions that have been created # with the `store` parameter set to `true` can be modified. Currently, the only # supported modification is to update the `metadata` field. # # @overload update(completion_id, metadata:, request_options: {}) # - # @param completion_id [String] The ID of the chat completion to update. + # @param completion_id [String] + # The ID of the chat completion to update. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -352,23 +771,28 @@ def update(completion_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::CompletionListParams} for more details. - # # List stored Chat Completions. Only Chat Completions that have been stored with # the `store` parameter set to `true` will be returned. # # @overload list(after: nil, limit: nil, metadata: nil, model: nil, order: nil, request_options: {}) # - # @param after [String] Identifier for the last chat completion from the previous pagination request. + # @param after [String] + # Identifier for the last chat completion from the previous pagination request. + # + # @param limit [Integer] + # Number of Chat Completions to retrieve. # - # @param limit [Integer] Number of Chat Completions to retrieve. + # @param metadata [Hash{Symbol=>String}, nil] + # A list of metadata keys to filter the Chat Completions by. Example: # - # @param metadata [Hash{Symbol=>String}, nil] A list of metadata keys to filter the Chat Completions by. Example: + # `metadata[key1]=value1&metadata[key2]=value2` # - # @param model [String] The model used to generate the Chat Completions. + # @param model [String] + # The model used to generate the Chat Completions. # - # @param order [Symbol, OpenAI::Models::Chat::CompletionListParams::Order] Sort order for Chat Completions by timestamp. Use `asc` for ascending order or ` + # @param order [Symbol, OpenAI::Models::Chat::CompletionListParams::Order] + # Sort order for Chat Completions by timestamp. Use `asc` for ascending order or + # `desc` for descending order. Defaults to `asc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -394,7 +818,8 @@ def list(params = {}) # # @overload delete(completion_id, request_options: {}) # - # @param completion_id [String] The ID of the chat completion to delete. + # @param completion_id [String] + # The ID of the chat completion to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/chat/completions/messages.rb b/lib/openai/resources/chat/completions/messages.rb index a45affbda..d1e0def1b 100644 --- a/lib/openai/resources/chat/completions/messages.rb +++ b/lib/openai/resources/chat/completions/messages.rb @@ -7,21 +7,23 @@ class Completions # Given a list of messages comprising a conversation, the model will return a # response. class Messages - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Chat::Completions::MessageListParams} for more details. - # # Get the messages in a stored chat completion. Only Chat Completions that have # been created with the `store` parameter set to `true` will be returned. # # @overload list(completion_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param completion_id [String] The ID of the chat completion to retrieve messages from. + # @param completion_id [String] + # The ID of the chat completion to retrieve messages from. # - # @param after [String] Identifier for the last message from the previous pagination request. + # @param after [String] + # Identifier for the last message from the previous pagination request. # - # @param limit [Integer] Number of messages to retrieve. + # @param limit [Integer] + # Number of messages to retrieve. # - # @param order [Symbol, OpenAI::Models::Chat::Completions::MessageListParams::Order] Sort order for messages by timestamp. Use `asc` for ascending order or `desc` fo + # @param order [Symbol, OpenAI::Models::Chat::Completions::MessageListParams::Order] + # Sort order for messages by timestamp. Use `asc` for ascending order or `desc` + # for descending order. Defaults to `asc`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/completions.rb b/lib/openai/resources/completions.rb index 5a506979c..c70953992 100644 --- a/lib/openai/resources/completions.rb +++ b/lib/openai/resources/completions.rb @@ -7,9 +7,6 @@ module Resources class Completions # See {OpenAI::Resources::Completions#create_streaming} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompletionCreateParams} for more details. - # # Creates a completion for the provided prompt and parameters. # # Returns a completion object, or a sequence of completion objects if the request @@ -17,39 +14,128 @@ class Completions # # @overload create(model:, prompt:, best_of: nil, echo: nil, frequency_penalty: nil, logit_bias: nil, logprobs: nil, max_tokens: nil, n: nil, presence_penalty: nil, seed: nil, stop: nil, stream_options: nil, suffix: nil, temperature: nil, top_p: nil, user: nil, request_options: {}) # - # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. + # + # @param prompt [String, Array, Array, Array>, nil] + # The prompt(s) to generate completions for, encoded as a string, array of + # strings, array of tokens, or array of token arrays. + # + # Note that <|endoftext|> is the document separator that the model sees during + # training, so if a prompt is not specified the model will generate as if from the + # beginning of a new document. + # + # @param best_of [Integer, nil] + # Generates `best_of` completions server-side and returns the "best" (the one with + # the highest log probability per token). Results cannot be streamed. + # + # When used with `n`, `best_of` controls the number of candidate completions and + # `n` specifies how many to return – `best_of` must be greater than `n`. + # + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. + # + # @param echo [Boolean, nil] + # Echo back the prompt in addition to the completion + # + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. + # + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) + # + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. + # + # Accepts a JSON object that maps tokens (specified by their token ID in the GPT + # tokenizer) to an associated bias value from -100 to 100. You can use this + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. + # + # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token + # from being generated. + # + # @param logprobs [Integer, nil] + # Include the log probabilities on the `logprobs` most likely output tokens, as + # well the chosen tokens. For example, if `logprobs` is 5, the API will return a + # list of the 5 most likely tokens. The API will always return the `logprob` of + # the sampled token, so there may be up to `logprobs+1` elements in the response. + # + # The maximum value for `logprobs` is 5. + # + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. + # + # The token count of your prompt plus `max_tokens` cannot exceed the model's + # context length. + # [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + # for counting tokens. # - # @param prompt [String, Array, Array, Array>, nil] The prompt(s) to generate completions for, encoded as a string, array of strings + # @param n [Integer, nil] + # How many completions to generate for each prompt. # - # @param best_of [Integer, nil] Generates `best_of` completions server-side and returns the "best" (the one with + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. # - # @param echo [Boolean, nil] Echo back the prompt in addition to the completion + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. + # @param seed [Integer, nil] + # If specified, our system will make a best effort to sample deterministically, + # such that repeated requests with the same `seed` and parameters should return + # the same result. # - # @param logprobs [Integer, nil] Include the log probabilities on the `logprobs` most likely output tokens, as we + # Determinism is not guaranteed, and you should refer to the `system_fingerprint` + # response parameter to monitor changes in the backend. # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the completi + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. # - # @param n [Integer, nil] How many completions to generate for each prompt. + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on whethe + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. # - # @param seed [Integer, nil] If specified, our system will make a best effort to sample deterministically, su + # @param suffix [String, nil] + # The suffix that comes after a completion of inserted text. # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. + # This parameter is only supported for `gpt-3.5-turbo-instruct`. # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. # - # @param suffix [String, nil] The suffix that comes after a completion of inserted text. + # We generally recommend altering this or `top_p` but not both. # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # We generally recommend altering this or `temperature` but not both. # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -75,9 +161,6 @@ def create(params) # See {OpenAI::Resources::Completions#create} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::CompletionCreateParams} for more details. - # # Creates a completion for the provided prompt and parameters. # # Returns a completion object, or a sequence of completion objects if the request @@ -85,39 +168,128 @@ def create(params) # # @overload create_streaming(model:, prompt:, best_of: nil, echo: nil, frequency_penalty: nil, logit_bias: nil, logprobs: nil, max_tokens: nil, n: nil, presence_penalty: nil, seed: nil, stop: nil, stream_options: nil, suffix: nil, temperature: nil, top_p: nil, user: nil, request_options: {}) # - # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param model [String, Symbol, OpenAI::Models::CompletionCreateParams::Model] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. + # + # @param prompt [String, Array, Array, Array>, nil] + # The prompt(s) to generate completions for, encoded as a string, array of + # strings, array of tokens, or array of token arrays. + # + # Note that <|endoftext|> is the document separator that the model sees during + # training, so if a prompt is not specified the model will generate as if from the + # beginning of a new document. + # + # @param best_of [Integer, nil] + # Generates `best_of` completions server-side and returns the "best" (the one with + # the highest log probability per token). Results cannot be streamed. + # + # When used with `n`, `best_of` controls the number of candidate completions and + # `n` specifies how many to return – `best_of` must be greater than `n`. + # + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. + # + # @param echo [Boolean, nil] + # Echo back the prompt in addition to the completion + # + # @param frequency_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # existing frequency in the text so far, decreasing the model's likelihood to + # repeat the same line verbatim. + # + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) + # + # @param logit_bias [Hash{Symbol=>Integer}, nil] + # Modify the likelihood of specified tokens appearing in the completion. + # + # Accepts a JSON object that maps tokens (specified by their token ID in the GPT + # tokenizer) to an associated bias value from -100 to 100. You can use this + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. + # + # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token + # from being generated. + # + # @param logprobs [Integer, nil] + # Include the log probabilities on the `logprobs` most likely output tokens, as + # well the chosen tokens. For example, if `logprobs` is 5, the API will return a + # list of the 5 most likely tokens. The API will always return the `logprob` of + # the sampled token, so there may be up to `logprobs+1` elements in the response. + # + # The maximum value for `logprobs` is 5. + # + # @param max_tokens [Integer, nil] + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. + # + # The token count of your prompt plus `max_tokens` cannot exceed the model's + # context length. + # [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + # for counting tokens. # - # @param prompt [String, Array, Array, Array>, nil] The prompt(s) to generate completions for, encoded as a string, array of strings + # @param n [Integer, nil] + # How many completions to generate for each prompt. # - # @param best_of [Integer, nil] Generates `best_of` completions server-side and returns the "best" (the one with + # **Note:** Because this parameter generates many completions, it can quickly + # consume your token quota. Use carefully and ensure that you have reasonable + # settings for `max_tokens` and `stop`. # - # @param echo [Boolean, nil] Echo back the prompt in addition to the completion + # @param presence_penalty [Float, nil] + # Number between -2.0 and 2.0. Positive values penalize new tokens based on + # whether they appear in the text so far, increasing the model's likelihood to + # talk about new topics. # - # @param frequency_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on their + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) # - # @param logit_bias [Hash{Symbol=>Integer}, nil] Modify the likelihood of specified tokens appearing in the completion. + # @param seed [Integer, nil] + # If specified, our system will make a best effort to sample deterministically, + # such that repeated requests with the same `seed` and parameters should return + # the same result. # - # @param logprobs [Integer, nil] Include the log probabilities on the `logprobs` most likely output tokens, as we + # Determinism is not guaranteed, and you should refer to the `system_fingerprint` + # response parameter to monitor changes in the backend. # - # @param max_tokens [Integer, nil] The maximum number of [tokens](/tokenizer) that can be generated in the completi + # @param stop [String, Array, nil] + # Not supported with latest reasoning models `o3` and `o4-mini`. # - # @param n [Integer, nil] How many completions to generate for each prompt. + # Up to 4 sequences where the API will stop generating further tokens. The + # returned text will not contain the stop sequence. # - # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on whethe + # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] + # Options for streaming response. Only set this when you set `stream: true`. # - # @param seed [Integer, nil] If specified, our system will make a best effort to sample deterministically, su + # @param suffix [String, nil] + # The suffix that comes after a completion of inserted text. # - # @param stop [String, Array, nil] Not supported with latest reasoning models `o3` and `o4-mini`. + # This parameter is only supported for `gpt-3.5-turbo-instruct`. # - # @param stream_options [OpenAI::Models::Chat::ChatCompletionStreamOptions, nil] Options for streaming response. Only set this when you set `stream: true`. + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. # - # @param suffix [String, nil] The suffix that comes after a completion of inserted text. + # We generally recommend altering this or `top_p` but not both. # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, where the + # We generally recommend altering this or `temperature` but not both. # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/containers.rb b/lib/openai/resources/containers.rb index ebfcd96e9..5792fc0ee 100644 --- a/lib/openai/resources/containers.rb +++ b/lib/openai/resources/containers.rb @@ -10,17 +10,23 @@ class Containers # # @overload create(name:, expires_after: nil, file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, request_options: {}) # - # @param name [String] Name of the container to create. + # @param name [String] + # Name of the container to create. # - # @param expires_after [OpenAI::Models::ContainerCreateParams::ExpiresAfter] Container expiration time in seconds relative to the 'anchor' time. + # @param expires_after [OpenAI::Models::ContainerCreateParams::ExpiresAfter] + # Container expiration time in seconds relative to the 'anchor' time. # - # @param file_ids [Array] IDs of files to copy to the container. + # @param file_ids [Array] + # IDs of files to copy to the container. # - # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] Optional memory limit for the container. Defaults to "1g". + # @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] + # Optional memory limit for the container. Defaults to "1g". # - # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container. + # @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] + # Network access policy for the container. # - # @param skills [Array] An optional list of skills referenced by id or inline data. + # @param skills [Array] + # An optional list of skills referenced by id or inline data. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -59,20 +65,26 @@ def retrieve(container_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ContainerListParams} for more details. - # # List Containers # # @overload list(after: nil, limit: nil, name: nil, order: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param name [String] Filter results by container name. + # @param name [String] + # Filter results by container name. # - # @param order [Symbol, OpenAI::Models::ContainerListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::ContainerListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -97,7 +109,8 @@ def list(params = {}) # # @overload delete(container_id, request_options: {}) # - # @param container_id [String] The ID of the container to delete. + # @param container_id [String] + # The ID of the container to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/containers/files.rb b/lib/openai/resources/containers/files.rb index 92eb52c11..dbd90d530 100644 --- a/lib/openai/resources/containers/files.rb +++ b/lib/openai/resources/containers/files.rb @@ -7,9 +7,6 @@ class Files # @return [OpenAI::Resources::Containers::Files::Content] attr_reader :content - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Containers::FileCreateParams} for more details. - # # Create a Container File # # You can send either a multipart/form-data request with the raw file content, or @@ -23,9 +20,15 @@ class Files # # @param container_id [String] # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The File object (not file name) to be uploaded. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param file_id [String] Name of the file to create. + # @param file_id [String] + # Name of the file to create. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -71,20 +74,25 @@ def retrieve(file_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Containers::FileListParams} for more details. - # # List Container files # # @overload list(container_id, after: nil, limit: nil, order: nil, request_options: {}) # # @param container_id [String] # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::Containers::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::Containers::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/content_provenance_checks.rb b/lib/openai/resources/content_provenance_checks.rb index 68c6c1cc3..16b53e5b4 100644 --- a/lib/openai/resources/content_provenance_checks.rb +++ b/lib/openai/resources/content_provenance_checks.rb @@ -4,7 +4,7 @@ module OpenAI module Resources class ContentProvenanceChecks # Check whether an image or audio file contains known OpenAI provenance signals. - # [Learn more about content provenance](/api/docs/guides/content-provenance). + # [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). # # If `not_detected`, it means the tool did not find supported signals in the # uploaded file. The content could still have been generated by OpenAI if the @@ -19,7 +19,12 @@ class ContentProvenanceChecks # # @overload create(file:, request_options: {}) # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The image or audio file to check for supported OpenAI provenance signals. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The image or audio file to check for supported OpenAI provenance signals. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/conversations.rb b/lib/openai/resources/conversations.rb index 6dcc6c8b4..85d13be6a 100644 --- a/lib/openai/resources/conversations.rb +++ b/lib/openai/resources/conversations.rb @@ -8,16 +8,21 @@ class Conversations # @return [OpenAI::Resources::Conversations::Items] attr_reader :items - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationCreateParams} for more details. - # # Create a conversation. # # @overload create(items: nil, metadata: nil, request_options: {}) # - # @param items [Array, nil] Initial items to include in the conversation context. You may add up to 20 items + # @param items [Array, nil] + # Initial items to include in the conversation context. You may add up to 20 items + # at a time. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -40,7 +45,8 @@ def create(params = {}) # # @overload retrieve(conversation_id, request_options: {}) # - # @param conversation_id [String] The ID of the conversation to retrieve. + # @param conversation_id [String] + # The ID of the conversation to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -57,16 +63,20 @@ def retrieve(conversation_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details. - # # Update a conversation # # @overload update(conversation_id, metadata:, request_options: {}) # - # @param conversation_id [String] The ID of the conversation to update. + # @param conversation_id [String] + # The ID of the conversation to update. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -89,7 +99,8 @@ def update(conversation_id, params) # # @overload delete(conversation_id, request_options: {}) # - # @param conversation_id [String] The ID of the conversation to delete. + # @param conversation_id [String] + # The ID of the conversation to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/conversations/items.rb b/lib/openai/resources/conversations/items.rb index 19a389c34..19d67b2cc 100644 --- a/lib/openai/resources/conversations/items.rb +++ b/lib/openai/resources/conversations/items.rb @@ -5,18 +5,22 @@ module Resources class Conversations # Manage conversations and conversation items. class Items - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemCreateParams} for more details. - # # Create items in a conversation with the given ID. # # @overload create(conversation_id, items:, include: nil, request_options: {}) # - # @param conversation_id [String] Path param: The ID of the conversation to add the item to. + # @param conversation_id [String] + # Path param: The ID of the conversation to add the item to. # - # @param items [Array] Body param: The items to add to the conversation. You may add up to 20 items at + # @param items [Array] + # Body param: The items to add to the conversation. You may add up to 20 items at + # a time. # - # @param include [Array] Query param: Additional fields to include in the response. See the `include` + # @param include [Array] + # Query param: Additional fields to include in the response. See the `include` + # parameter for + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -38,18 +42,21 @@ def create(conversation_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemRetrieveParams} for more details. - # # Get a single item from a conversation with the given IDs. # # @overload retrieve(item_id, conversation_id:, include: nil, request_options: {}) # - # @param item_id [String] Path param: The ID of the item to retrieve. + # @param item_id [String] + # Path param: The ID of the item to retrieve. # - # @param conversation_id [String] Path param: The ID of the conversation that contains the item. + # @param conversation_id [String] + # Path param: The ID of the conversation that contains the item. # - # @param include [Array] Query param: Additional fields to include in the response. See the `include` + # @param include [Array] + # Query param: Additional fields to include in the response. See the `include` + # parameter for + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) + # for more information. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -73,22 +80,45 @@ def retrieve(item_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Conversations::ItemListParams} for more details. - # # List all items for a conversation with the given ID. # # @overload list(conversation_id, after: nil, include: nil, limit: nil, order: nil, request_options: {}) # - # @param conversation_id [String] The ID of the conversation to list items for. - # - # @param after [String] An item ID to list items after, used in pagination. - # - # @param include [Array] Specify additional output data to include in the model response. Currently suppo - # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between - # - # @param order [Symbol, OpenAI::Models::Conversations::ItemListParams::Order] The order to return the input items in. Default is `desc`. + # @param conversation_id [String] + # The ID of the conversation to list items for. + # + # @param after [String] + # An item ID to list items after, used in pagination. + # + # @param include [Array] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. + # + # @param order [Symbol, OpenAI::Models::Conversations::ItemListParams::Order] + # The order to return the input items in. Default is `desc`. + # + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -113,9 +143,11 @@ def list(conversation_id, params = {}) # # @overload delete(item_id, conversation_id:, request_options: {}) # - # @param item_id [String] The ID of the item to delete. + # @param item_id [String] + # The ID of the item to delete. # - # @param conversation_id [String] The ID of the conversation that contains the item. + # @param conversation_id [String] + # The ID of the conversation that contains the item. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/embeddings.rb b/lib/openai/resources/embeddings.rb index ecc6673f9..604b225d9 100644 --- a/lib/openai/resources/embeddings.rb +++ b/lib/openai/resources/embeddings.rb @@ -5,22 +5,40 @@ module Resources # Get a vector representation of a given input that can be easily consumed by # machine learning models and algorithms. class Embeddings - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EmbeddingCreateParams} for more details. - # # Creates an embedding vector representing the input text. # # @overload create(input:, model:, dimensions: nil, encoding_format: nil, user: nil, request_options: {}) # - # @param input [String, Array, Array, Array>] Input text to embed, encoded as a string or array of tokens. To embed multiple i + # @param input [String, Array, Array, Array>] + # Input text to embed, encoded as a string or array of tokens. To embed multiple + # inputs in a single request, pass an array of strings or array of token arrays. + # The input must not exceed the max input tokens for the model (8192 tokens for + # all embedding models), cannot be an empty string, and any array must be 2048 + # dimensions or less. + # [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) + # for counting tokens. In addition to the per-input token limit, all embedding + # models enforce a maximum of 300,000 tokens summed across all inputs in a single + # request. # - # @param model [String, Symbol, OpenAI::Models::EmbeddingModel] ID of the model to use. You can use the [List models](https://platform.openai.co + # @param model [String, Symbol, OpenAI::Models::EmbeddingModel] + # ID of the model to use. You can use the + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. # - # @param dimensions [Integer] The number of dimensions the resulting output embeddings should have. Only suppo + # @param dimensions [Integer] + # The number of dimensions the resulting output embeddings should have. Only + # supported in `text-embedding-3` and later models. # - # @param encoding_format [Symbol, OpenAI::Models::EmbeddingCreateParams::EncodingFormat] The format to return the embeddings in. Can be either `float` or [`base64`](http + # @param encoding_format [Symbol, OpenAI::Models::EmbeddingCreateParams::EncodingFormat] + # The format to return the embeddings in. Can be either `float` or + # [`base64`](https://pypi.org/project/pybase64/). # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/evals.rb b/lib/openai/resources/evals.rb index 879d22ee0..b17a1414e 100644 --- a/lib/openai/resources/evals.rb +++ b/lib/openai/resources/evals.rb @@ -8,25 +8,35 @@ class Evals # @return [OpenAI::Resources::Evals::Runs] attr_reader :runs - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalCreateParams} for more details. - # # Create the structure of an evaluation that can be used to test a model's # performance. An evaluation is a set of testing criteria and the config for a # data source, which dictates the schema of the data used in the evaluation. After # creating an evaluation, you can run it on different models and model parameters. # We support several types of graders and datasources. For more information, see - # the [Evals guide](https://platform.openai.com/docs/guides/evals). + # the [Evals guide](https://developers.openai.com/api/docs/guides/evals). # # @overload create(data_source_config:, testing_criteria:, metadata: nil, name: nil, request_options: {}) # - # @param data_source_config [OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom, OpenAI::Models::EvalCreateParams::DataSourceConfig::Logs, OpenAI::Models::EvalCreateParams::DataSourceConfig::StoredCompletions] The configuration for the data source used for the evaluation runs. Dictates the + # @param data_source_config [OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom, OpenAI::Models::EvalCreateParams::DataSourceConfig::Logs, OpenAI::Models::EvalCreateParams::DataSourceConfig::StoredCompletions] + # The configuration for the data source used for the evaluation runs. Dictates the + # schema of the data used in the evaluation. + # + # @param testing_criteria [Array] + # A list of graders for all eval runs in this group. Graders can reference + # variables in the data source using double curly braces notation, like + # `{{item.variable_name}}`. To reference the model's output, use the `sample` + # namespace (ie, `{{sample.output_text}}`). # - # @param testing_criteria [Array] A list of graders for all eval runs in this group. Graders can reference variabl + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the evaluation. + # @param name [String] + # The name of the evaluation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -49,7 +59,8 @@ def create(params) # # @overload retrieve(eval_id, request_options: {}) # - # @param eval_id [String] The ID of the evaluation to retrieve. + # @param eval_id [String] + # The ID of the evaluation to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -66,18 +77,23 @@ def retrieve(eval_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalUpdateParams} for more details. - # # Update certain properties of an evaluation. # # @overload update(eval_id, metadata: nil, name: nil, request_options: {}) # - # @param eval_id [String] The ID of the evaluation to update. + # @param eval_id [String] + # The ID of the evaluation to update. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param name [String] Rename the evaluation. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param name [String] + # Rename the evaluation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -96,20 +112,23 @@ def update(eval_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::EvalListParams} for more details. - # # List evaluations for a project. # # @overload list(after: nil, limit: nil, order: nil, order_by: nil, request_options: {}) # - # @param after [String] Identifier for the last eval from the previous pagination request. + # @param after [String] + # Identifier for the last eval from the previous pagination request. # - # @param limit [Integer] Number of evals to retrieve. + # @param limit [Integer] + # Number of evals to retrieve. # - # @param order [Symbol, OpenAI::Models::EvalListParams::Order] Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for d + # @param order [Symbol, OpenAI::Models::EvalListParams::Order] + # Sort order for evals by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # - # @param order_by [Symbol, OpenAI::Models::EvalListParams::OrderBy] Evals can be ordered by creation time or last updated time. Use + # @param order_by [Symbol, OpenAI::Models::EvalListParams::OrderBy] + # Evals can be ordered by creation time or last updated time. Use `created_at` for + # creation time or `updated_at` for last updated time. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -134,7 +153,8 @@ def list(params = {}) # # @overload delete(eval_id, request_options: {}) # - # @param eval_id [String] The ID of the evaluation to delete. + # @param eval_id [String] + # The ID of the evaluation to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/evals/runs.rb b/lib/openai/resources/evals/runs.rb index 68f057705..f8a703e43 100644 --- a/lib/openai/resources/evals/runs.rb +++ b/lib/openai/resources/evals/runs.rb @@ -9,22 +9,28 @@ class Runs # @return [OpenAI::Resources::Evals::Runs::OutputItems] attr_reader :output_items - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunCreateParams} for more details. - # # Kicks off a new run for a given evaluation, specifying the data source, and what # model configuration to use to test. The datasource will be validated against the # schema specified in the config of the evaluation. # # @overload create(eval_id, data_source:, metadata: nil, name: nil, request_options: {}) # - # @param eval_id [String] The ID of the evaluation to create a run for. + # @param eval_id [String] + # The ID of the evaluation to create a run for. + # + # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource] + # Details about the run's data source. # - # @param data_source [OpenAI::Models::Evals::CreateEvalJSONLRunDataSource, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource] Details about the run's data source. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the run. + # @param name [String] + # The name of the run. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -47,9 +53,11 @@ def create(eval_id, params) # # @overload retrieve(run_id, eval_id:, request_options: {}) # - # @param run_id [String] The ID of the run to retrieve. + # @param run_id [String] + # The ID of the run to retrieve. # - # @param eval_id [String] The ID of the evaluation to retrieve runs for. + # @param eval_id [String] + # The ID of the evaluation to retrieve runs for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -71,22 +79,26 @@ def retrieve(run_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::RunListParams} for more details. - # # Get a list of runs for an evaluation. # # @overload list(eval_id, after: nil, limit: nil, order: nil, status: nil, request_options: {}) # - # @param eval_id [String] The ID of the evaluation to retrieve runs for. + # @param eval_id [String] + # The ID of the evaluation to retrieve runs for. # - # @param after [String] Identifier for the last run from the previous pagination request. + # @param after [String] + # Identifier for the last run from the previous pagination request. # - # @param limit [Integer] Number of runs to retrieve. + # @param limit [Integer] + # Number of runs to retrieve. # - # @param order [Symbol, OpenAI::Models::Evals::RunListParams::Order] Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for de + # @param order [Symbol, OpenAI::Models::Evals::RunListParams::Order] + # Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for + # descending order. Defaults to `asc`. # - # @param status [Symbol, OpenAI::Models::Evals::RunListParams::Status] Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` + # @param status [Symbol, OpenAI::Models::Evals::RunListParams::Status] + # Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` + # | `canceled`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -111,9 +123,11 @@ def list(eval_id, params = {}) # # @overload delete(run_id, eval_id:, request_options: {}) # - # @param run_id [String] The ID of the run to delete. + # @param run_id [String] + # The ID of the run to delete. # - # @param eval_id [String] The ID of the evaluation to delete the run from. + # @param eval_id [String] + # The ID of the evaluation to delete the run from. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -139,9 +153,11 @@ def delete(run_id, params) # # @overload cancel(run_id, eval_id:, request_options: {}) # - # @param run_id [String] The ID of the run to cancel. + # @param run_id [String] + # The ID of the run to cancel. # - # @param eval_id [String] The ID of the evaluation whose run you want to cancel. + # @param eval_id [String] + # The ID of the evaluation whose run you want to cancel. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/evals/runs/output_items.rb b/lib/openai/resources/evals/runs/output_items.rb index 33d69e4d5..2e01eac0b 100644 --- a/lib/openai/resources/evals/runs/output_items.rb +++ b/lib/openai/resources/evals/runs/output_items.rb @@ -10,11 +10,14 @@ class OutputItems # # @overload retrieve(output_item_id, eval_id:, run_id:, request_options: {}) # - # @param output_item_id [String] The ID of the output item to retrieve. + # @param output_item_id [String] + # The ID of the output item to retrieve. # - # @param eval_id [String] The ID of the evaluation to retrieve runs for. + # @param eval_id [String] + # The ID of the evaluation to retrieve runs for. # - # @param run_id [String] The ID of the run to retrieve. + # @param run_id [String] + # The ID of the run to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -40,24 +43,30 @@ def retrieve(output_item_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Evals::Runs::OutputItemListParams} for more details. - # # Get a list of output items for an evaluation run. # # @overload list(run_id, eval_id:, after: nil, limit: nil, order: nil, status: nil, request_options: {}) # - # @param run_id [String] Path param: The ID of the run to retrieve output items for. + # @param run_id [String] + # Path param: The ID of the run to retrieve output items for. # - # @param eval_id [String] Path param: The ID of the evaluation to retrieve runs for. + # @param eval_id [String] + # Path param: The ID of the evaluation to retrieve runs for. # - # @param after [String] Query param: Identifier for the last output item from the previous pagination re + # @param after [String] + # Query param: Identifier for the last output item from the previous pagination + # request. # - # @param limit [Integer] Query param: Number of output items to retrieve. + # @param limit [Integer] + # Query param: Number of output items to retrieve. # - # @param order [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Order] Query param: Sort order for output items by timestamp. Use `asc` for ascending o + # @param order [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Order] + # Query param: Sort order for output items by timestamp. Use `asc` for ascending + # order or `desc` for descending order. Defaults to `asc`. # - # @param status [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Status] Query param: Filter output items by status. Use `failed` to filter by failed out + # @param status [Symbol, OpenAI::Models::Evals::Runs::OutputItemListParams::Status] + # Query param: Filter output items by status. Use `failed` to filter by failed + # output items or `pass` to filter by passed output items. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/files.rb b/lib/openai/resources/files.rb index 7be0b1f72..63a13e0ca 100644 --- a/lib/openai/resources/files.rb +++ b/lib/openai/resources/files.rb @@ -7,9 +7,6 @@ module Resources # Files are used to upload documents that can be used with features like # Assistants and Fine-tuning. class Files - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileCreateParams} for more details. - # # Upload a file that can be used across various endpoints. Individual files can be # up to 512 MB, and each project can store up to 2.5 TB of files in total. There # is no organization-wide storage limit. Uploads to this endpoint are rate-limited @@ -17,20 +14,20 @@ class Files # # - The Assistants API supports files up to 2 million tokens and of specific file # types. See the - # [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) + # [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) # for details. # - The Fine-tuning API only supports `.jsonl` files. The input also has certain # required formats for fine-tuning - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # or - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # models. # - The Batch API only supports `.jsonl` files up to 200 MB in size. The input # also has a specific required - # [format](https://platform.openai.com/docs/api-reference/batch/request-input). + # [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). # - For Retrieval or `file_search` ingestion, upload files here first. If you need # to attach multiple uploaded files to the same vector store, use - # [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # instead of attaching them one by one. Vector store attachment has separate # limits from file upload, including 2,000 attached files per minute per # organization. @@ -44,11 +41,26 @@ class Files # # @overload create(file:, purpose:, expires_after: nil, request_options: {}) # - # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded. + # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The File object (not file name) to be uploaded. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of: + # @param purpose [Symbol, OpenAI::Models::FilePurpose] + # The intended purpose of the uploaded file. One of: # - # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire + # - `assistants`: Used in the Assistants API + # - `batch`: Used in the Batch API + # - `fine-tune`: Used for fine-tuning + # - `vision`: Images used for vision fine-tuning + # - `user_data`: Flexible file type for any purpose + # - `evals`: Used for eval data sets + # + # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] + # The expiration policy for a file. By default, files with `purpose=batch` expire + # after 30 days and all other files are persisted until they are manually deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -72,7 +84,8 @@ def create(params) # # @overload retrieve(file_id, request_options: {}) # - # @param file_id [String] The ID of the file to use for this request. + # @param file_id [String] + # The ID of the file to use for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -89,20 +102,26 @@ def retrieve(file_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FileListParams} for more details. - # # Returns a list of files. # # @overload list(after: nil, limit: nil, order: nil, purpose: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 10,000, and the default is 10,000. # - # @param order [Symbol, OpenAI::Models::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # - # @param purpose [String] Only return files with the given purpose. + # @param purpose [String] + # Only return files with the given purpose. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -127,7 +146,8 @@ def list(params = {}) # # @overload delete(file_id, request_options: {}) # - # @param file_id [String] The ID of the file to use for this request. + # @param file_id [String] + # The ID of the file to use for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -148,7 +168,8 @@ def delete(file_id, params = {}) # # @overload content(file_id, request_options: {}) # - # @param file_id [String] The ID of the file to use for this request. + # @param file_id [String] + # The ID of the file to use for this request. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/fine_tuning/alpha/graders.rb b/lib/openai/resources/fine_tuning/alpha/graders.rb index 129a657a4..90d92beb1 100644 --- a/lib/openai/resources/fine_tuning/alpha/graders.rb +++ b/lib/openai/resources/fine_tuning/alpha/graders.rb @@ -6,18 +6,25 @@ class FineTuning class Alpha # Manage fine-tuning jobs to tailor a model to your specific training data. class Graders - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Alpha::GraderRunParams} for more details. - # # Run a grader. # # @overload run(grader:, model_sample:, item: nil, request_options: {}) # - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # - # @param model_sample [String] The model sample to be evaluated. This value will be used to populate + # @param model_sample [String] + # The model sample to be evaluated. This value will be used to populate the + # `sample` namespace. See + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. # - # @param item [Object] The dataset item provided to the grader. This will be used to populate + # @param item [Object] + # The dataset item provided to the grader. This will be used to populate the + # `item` namespace. See + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -40,7 +47,8 @@ def run(params) # # @overload validate(grader:, request_options: {}) # - # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] The grader used for the fine-tuning job. + # @param grader [OpenAI::Models::Graders::StringCheckGrader, OpenAI::Models::Graders::TextSimilarityGrader, OpenAI::Models::Graders::PythonGrader, OpenAI::Models::Graders::ScoreModelGrader, OpenAI::Models::Graders::MultiGrader] + # The grader used for the fine-tuning job. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/fine_tuning/checkpoints/permissions.rb b/lib/openai/resources/fine_tuning/checkpoints/permissions.rb index 761facb9d..61f10bb56 100644 --- a/lib/openai/resources/fine_tuning/checkpoints/permissions.rb +++ b/lib/openai/resources/fine_tuning/checkpoints/permissions.rb @@ -6,20 +6,19 @@ class FineTuning class Checkpoints # Manage fine-tuning jobs to tailor a model to your specific training data. class Permissions - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Checkpoints::PermissionCreateParams} for more - # details. - # - # **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** Calling this endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # This enables organization owners to share fine-tuned models with other projects # in their organization. # # @overload create(fine_tuned_model_checkpoint, project_ids:, request_options: {}) # - # @param fine_tuned_model_checkpoint [String] The ID of the fine-tuned model checkpoint to create a permission for. + # @param fine_tuned_model_checkpoint [String] + # The ID of the fine-tuned model checkpoint to create a permission for. # - # @param project_ids [Array] The project identifiers to grant access to. + # @param project_ids [Array] + # The project identifiers to grant access to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -41,26 +40,28 @@ def create(fine_tuned_model_checkpoint, params) # @deprecated Retrieve is deprecated. Please swap to the paginated list method instead. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams} for more - # details. - # - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to view all permissions for a # fine-tuned model checkpoint. # # @overload retrieve(fine_tuned_model_checkpoint, after: nil, limit: nil, order: nil, project_id: nil, request_options: {}) # - # @param fine_tuned_model_checkpoint [String] The ID of the fine-tuned model checkpoint to get permissions for. + # @param fine_tuned_model_checkpoint [String] + # The ID of the fine-tuned model checkpoint to get permissions for. # - # @param after [String] Identifier for the last permission ID from the previous pagination request. + # @param after [String] + # Identifier for the last permission ID from the previous pagination request. # - # @param limit [Integer] Number of permissions to retrieve. + # @param limit [Integer] + # Number of permissions to retrieve. # - # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams::Order] The order in which to retrieve permissions. + # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams::Order] + # The order in which to retrieve permissions. # - # @param project_id [String] The ID of the project to get permissions for. + # @param project_id [String] + # The ID of the project to get permissions for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -80,26 +81,28 @@ def retrieve(fine_tuned_model_checkpoint, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Checkpoints::PermissionListParams} for more - # details. - # - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to view all permissions for a # fine-tuned model checkpoint. # # @overload list(fine_tuned_model_checkpoint, after: nil, limit: nil, order: nil, project_id: nil, request_options: {}) # - # @param fine_tuned_model_checkpoint [String] The ID of the fine-tuned model checkpoint to get permissions for. + # @param fine_tuned_model_checkpoint [String] + # The ID of the fine-tuned model checkpoint to get permissions for. # - # @param after [String] Identifier for the last permission ID from the previous pagination request. + # @param after [String] + # Identifier for the last permission ID from the previous pagination request. # - # @param limit [Integer] Number of permissions to retrieve. + # @param limit [Integer] + # Number of permissions to retrieve. # - # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionListParams::Order] The order in which to retrieve permissions. + # @param order [Symbol, OpenAI::Models::FineTuning::Checkpoints::PermissionListParams::Order] + # The order in which to retrieve permissions. # - # @param project_id [String] The ID of the project to get permissions for. + # @param project_id [String] + # The ID of the project to get permissions for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -120,20 +123,19 @@ def list(fine_tuned_model_checkpoint, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Checkpoints::PermissionDeleteParams} for more - # details. - # - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to delete a permission for a # fine-tuned model checkpoint. # # @overload delete(permission_id, fine_tuned_model_checkpoint:, request_options: {}) # - # @param permission_id [String] The ID of the fine-tuned model checkpoint permission to delete. + # @param permission_id [String] + # The ID of the fine-tuned model checkpoint permission to delete. # - # @param fine_tuned_model_checkpoint [String] The ID of the fine-tuned model checkpoint to delete a permission for. + # @param fine_tuned_model_checkpoint [String] + # The ID of the fine-tuned model checkpoint to delete a permission for. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/fine_tuning/jobs.rb b/lib/openai/resources/fine_tuning/jobs.rb index 8da8fd897..0640f85bb 100644 --- a/lib/openai/resources/fine_tuning/jobs.rb +++ b/lib/openai/resources/fine_tuning/jobs.rb @@ -9,36 +9,85 @@ class Jobs # @return [OpenAI::Resources::FineTuning::Jobs::Checkpoints] attr_reader :checkpoints - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCreateParams} for more details. - # # Creates a fine-tuning job which begins the process of creating a new model from # a given dataset. # # Response includes details of the enqueued job including job status and the name # of the fine-tuned models once complete. # - # [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + # [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) # # @overload create(model:, training_file:, hyperparameters: nil, integrations: nil, metadata: nil, method_: nil, seed: nil, suffix: nil, validation_file: nil, request_options: {}) # - # @param model [String, Symbol, OpenAI::Models::FineTuning::JobCreateParams::Model] The name of the model to fine-tune. You can select one of the + # @param model [String, Symbol, OpenAI::Models::FineTuning::JobCreateParams::Model] + # The name of the model to fine-tune. You can select one of the + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). + # + # @param training_file [String] + # The ID of an uploaded file that contains training data. + # + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) + # for how to upload a file. + # + # Your dataset must be formatted as a JSONL file. Additionally, you must upload + # your file with the purpose `fine-tune`. + # + # The contents of the file should differ depending on if the model uses the + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) + # format, or if the fine-tuning method uses the + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) + # format. + # + # See the + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + # for more details. + # + # @param hyperparameters [OpenAI::Models::FineTuning::JobCreateParams::Hyperparameters] + # The hyperparameters used for the fine-tuning job. This value is now deprecated + # in favor of `method`, and should be passed in under the `method` parameter. + # + # @param integrations [Array, nil] + # A list of integrations to enable for your fine-tuning job. # - # @param training_file [String] The ID of an uploaded file that contains training data. + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param hyperparameters [OpenAI::Models::FineTuning::JobCreateParams::Hyperparameters] The hyperparameters used for the fine-tuning job. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param integrations [Array, nil] A list of integrations to enable for your fine-tuning job. + # @param method_ [OpenAI::Models::FineTuning::JobCreateParams::Method] + # The method used for fine-tuning. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param seed [Integer, nil] + # The seed controls the reproducibility of the job. Passing in the same seed and + # job parameters should produce the same results, but may differ in rare cases. If + # a seed is not specified, one will be generated for you. # - # @param method_ [OpenAI::Models::FineTuning::JobCreateParams::Method] The method used for fine-tuning. + # @param suffix [String, nil] + # A string of up to 64 characters that will be added to your fine-tuned model + # name. # - # @param seed [Integer, nil] The seed controls the reproducibility of the job. Passing in the same seed and j + # For example, a `suffix` of "custom-model-name" would produce a model name like + # `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. # - # @param suffix [String, nil] A string of up to 64 characters that will be added to your fine-tuned model name + # @param validation_file [String, nil] + # The ID of an uploaded file that contains validation data. # - # @param validation_file [String, nil] The ID of an uploaded file that contains validation data. + # If you provide this file, the data is used to generate validation metrics + # periodically during fine-tuning. These metrics can be viewed in the fine-tuning + # results file. The same data should not be present in both train and validation + # files. + # + # Your dataset must be formatted as a JSONL file. You must upload your file with + # the purpose `fine-tune`. + # + # See the + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + # for more details. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -57,16 +106,14 @@ def create(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobRetrieveParams} for more details. - # # Get info about a fine-tuning job. # - # [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + # [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) # # @overload retrieve(fine_tuning_job_id, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -83,18 +130,19 @@ def retrieve(fine_tuning_job_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobListParams} for more details. - # # List your organization's fine-tuning jobs # # @overload list(after: nil, limit: nil, metadata: nil, request_options: {}) # - # @param after [String] Identifier for the last job from the previous pagination request. + # @param after [String] + # Identifier for the last job from the previous pagination request. # - # @param limit [Integer] Number of fine-tuning jobs to retrieve. + # @param limit [Integer] + # Number of fine-tuning jobs to retrieve. # - # @param metadata [Hash{Symbol=>String}, nil] Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Alternative + # @param metadata [Hash{Symbol=>String}, nil] + # Optional metadata filter. To filter, use the syntax `metadata[k]=v`. + # Alternatively, set `metadata=null` to indicate no metadata. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -115,14 +163,12 @@ def list(params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobCancelParams} for more details. - # # Immediately cancel a fine-tune job. # # @overload cancel(fine_tuning_job_id, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job to cancel. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job to cancel. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -139,18 +185,18 @@ def cancel(fine_tuning_job_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobListEventsParams} for more details. - # # Get status updates for a fine-tuning job. # # @overload list_events(fine_tuning_job_id, after: nil, limit: nil, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job to get events for. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job to get events for. # - # @param after [String] Identifier for the last event from the previous pagination request. + # @param after [String] + # Identifier for the last event from the previous pagination request. # - # @param limit [Integer] Number of events to retrieve. + # @param limit [Integer] + # Number of events to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -171,14 +217,12 @@ def list_events(fine_tuning_job_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobPauseParams} for more details. - # # Pause a fine-tune job. # # @overload pause(fine_tuning_job_id, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job to pause. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job to pause. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -195,14 +239,12 @@ def pause(fine_tuning_job_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::JobResumeParams} for more details. - # # Resume a fine-tune job. # # @overload resume(fine_tuning_job_id, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job to resume. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job to resume. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/fine_tuning/jobs/checkpoints.rb b/lib/openai/resources/fine_tuning/jobs/checkpoints.rb index 0e2e256d7..d1e9d56ab 100644 --- a/lib/openai/resources/fine_tuning/jobs/checkpoints.rb +++ b/lib/openai/resources/fine_tuning/jobs/checkpoints.rb @@ -6,18 +6,18 @@ class FineTuning class Jobs # Manage fine-tuning jobs to tailor a model to your specific training data. class Checkpoints - # Some parameter documentations has been truncated, see - # {OpenAI::Models::FineTuning::Jobs::CheckpointListParams} for more details. - # # List checkpoints for a fine-tuning job. # # @overload list(fine_tuning_job_id, after: nil, limit: nil, request_options: {}) # - # @param fine_tuning_job_id [String] The ID of the fine-tuning job to get checkpoints for. + # @param fine_tuning_job_id [String] + # The ID of the fine-tuning job to get checkpoints for. # - # @param after [String] Identifier for the last checkpoint ID from the previous pagination request. + # @param after [String] + # Identifier for the last checkpoint ID from the previous pagination request. # - # @param limit [Integer] Number of checkpoints to retrieve. + # @param limit [Integer] + # Number of checkpoints to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/images.rb b/lib/openai/resources/images.rb index 1c86d3deb..ed0a00f8a 100644 --- a/lib/openai/resources/images.rb +++ b/lib/openai/resources/images.rb @@ -4,9 +4,6 @@ module OpenAI module Resources # Given a prompt and/or an input image, the model will generate a new image. class Images - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageCreateVariationParams} for more details. - # # Creates a variation of a given image. This endpoint only supports `dall-e-2`. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload @@ -15,17 +12,34 @@ class Images # # @overload create_variation(image:, model: nil, n: nil, response_format: nil, size: nil, user: nil, request_options: {}) # - # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] The image to use as the basis for the variation(s). Must be a valid PNG file, le + # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The image to use as the basis for the variation(s). Must be a valid PNG file, + # less than 4MB, and square. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. Only `dall-e-2` is supported at this time + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. Only `dall-e-2` is supported at this + # time. # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. # - # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or ` + # @param response_format [Symbol, OpenAI::Models::ImageCreateVariationParams::ResponseFormat, nil] + # The format in which the generated images are returned. Must be one of `url` or + # `b64_json`. URLs are only valid for 60 minutes after the image has been + # generated. # - # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x + # @param size [Symbol, OpenAI::Models::ImageCreateVariationParams::Size, nil] + # The size of the generated images. Must be one of `256x256`, `512x512`, or + # `1024x1024`. # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -47,9 +61,6 @@ def create_variation(params) # See {OpenAI::Resources::Images#edit_stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditParams} for more details. - # # Creates an edited or extended image given one or more source images and a # prompt. This endpoint supports GPT Image models and `dall-e-2`. # @@ -59,33 +70,113 @@ def create_variation(params) # # @overload edit(image:, prompt:, background: nil, input_fidelity: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, user: nil, request_options: {}) # - # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] The image(s) to edit. Must be a supported image file or an array of images. - # - # @param prompt [String] A text description of the desired image(s). The maximum length is 1000 character - # - # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es - # - # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] An additional image whose fully transparent areas (e.g. where alpha is zero) ind - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2` or a GPT image model (` - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter - # - # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] The quality of the image that will be generated for GPT image models. The GPT im - # - # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or ` - # - # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] + # The image(s) to edit. Must be a supported image file or an array of images. + # + # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should + # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 + # images. + # + # For `dall-e-2`, you can only provide one image, and it should be a square `png` + # file less than 4MB. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 1000 + # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # + # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. This parameter is only supported + # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for + # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + # + # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] + # An additional image whose fully transparent areas (e.g. where alpha is zero) + # indicate where `image` should be edited. If there are multiple images provided, + # the mask will be applied on the first image. Must be a valid PNG file, less than + # 4MB, and have the same dimensions as `image`. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2` or a GPT image model + # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to + # `gpt-image-1.5`. + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The + # default value is `png`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] + # The quality of the image that will be generated for GPT image models. The GPT + # image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and + # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support + # `xhigh` and `max`. Defaults to `auto`. + # + # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] + # The format in which the generated images are returned. Must be one of `url` or + # `b64_json`. URLs are only valid for 60 minutes after the image has been + # generated. This parameter is only supported for `dall-e-2` (default is `url` for + # `dall-e-2`), as GPT image models always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -112,9 +203,6 @@ def edit(params) # See {OpenAI::Resources::Images#edit} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageEditParams} for more details. - # # Creates an edited or extended image given one or more source images and a # prompt. This endpoint supports GPT Image models and `dall-e-2`. # @@ -124,33 +212,113 @@ def edit(params) # # @overload edit_stream_raw(image:, prompt:, background: nil, input_fidelity: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, user: nil, request_options: {}) # - # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] The image(s) to edit. Must be a supported image file or an array of images. - # - # @param prompt [String] A text description of the desired image(s). The maximum length is 1000 character - # - # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es - # - # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] An additional image whose fully transparent areas (e.g. where alpha is zero) ind - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2` or a GPT image model (` - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter - # - # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] The quality of the image that will be generated for GPT image models. The GPT im - # - # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] The format in which the generated images are returned. Must be one of `url` or ` - # - # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array] + # The image(s) to edit. Must be a supported image file or an array of images. + # + # For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, + # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, and `chatgpt-image-latest`), each image should + # be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16 + # images. + # + # For `dall-e-2`, you can only provide one image, and it should be a square `png` + # file less than 4MB. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 1000 + # characters for `dall-e-2`, and 32000 characters for the GPT image models. + # + # @param background [Symbol, OpenAI::Models::ImageEditParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil] + # Control how much effort the model will exert to match the style and features, + # especially facial features, of input images. This parameter is only supported + # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for + # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + # + # @param mask [Pathname, StringIO, IO, String, OpenAI::FilePart] + # An additional image whose fully transparent areas (e.g. where alpha is zero) + # indicate where `image` should be edited. If there are multiple images provided, + # the mask will be applied on the first image. Must be a valid PNG file, less than + # 4MB, and have the same dimensions as `image`. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2` or a GPT image model + # (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`). Defaults to + # `gpt-image-1.5`. + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The + # default value is `png`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageEditParams::Quality, nil] + # The quality of the image that will be generated for GPT image models. The GPT + # image models support `low`, `medium`, and `high`. `gpt-image-2.5-sunburst` and + # `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support + # `xhigh` and `max`. Defaults to `auto`. + # + # @param response_format [Symbol, OpenAI::Models::ImageEditParams::ResponseFormat, nil] + # The format in which the generated images are returned. Must be one of `url` or + # `b64_json`. URLs are only valid for 60 minutes after the image has been + # generated. This parameter is only supported for `dall-e-2` (default is `url` for + # `dall-e-2`), as GPT image models always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageEditParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -183,39 +351,102 @@ def edit_stream_raw(params) # See {OpenAI::Resources::Images#generate_stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenerateParams} for more details. - # # Creates an image given a prompt. - # [Learn more](https://platform.openai.com/docs/guides/images). + # [Learn more](https://developers.openai.com/api/docs/guides/images-vision). # # @overload generate(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, style: nil, user: nil, request_options: {}) # - # @param prompt [String] A text description of the desired image(s). The maximum length is 32000 characte - # - # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT i - # - # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] Control the content-moderation level for images generated by the GPT image model - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter is only - # - # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is only su - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] The quality of the image that will be generated. - # - # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] The format in which generated images with `dall-e-2` and `dall-e-3` are returned - # - # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] The style of the generated images. This parameter is only supported for `dall-e- - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 + # characters for `dall-e-3`. + # + # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT + # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter + # specific to the GPT image models is used. + # + # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] + # Control the content-moderation level for images generated by the GPT image + # models. Must be either `low` for less restrictive filtering or `auto` (default + # value). + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only + # `n=1` is supported. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] + # The quality of the image that will be generated. + # + # - `auto` (default value) will automatically select the best quality for the + # given model. + # - `high`, `medium` and `low` are supported for the GPT image models. + # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their + # `2026-09-08` snapshots, also support `xhigh` and `max`. + # - `hd` and `standard` are supported for `dall-e-3`. + # - `standard` is the only option for `dall-e-2`. + # + # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] + # The format in which generated images with `dall-e-2` and `dall-e-3` are + # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes + # after the image has been generated. This parameter isn't supported for the GPT + # image models, which always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] + # The style of the generated images. This parameter is only supported for + # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean + # towards generating hyper-real and dramatic images. Natural causes the model to + # produce more natural, less hyper-real looking images. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -241,39 +472,102 @@ def generate(params) # See {OpenAI::Resources::Images#generate} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ImageGenerateParams} for more details. - # # Creates an image given a prompt. - # [Learn more](https://platform.openai.com/docs/guides/images). + # [Learn more](https://developers.openai.com/api/docs/guides/images-vision). # # @overload generate_stream_raw(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, style: nil, user: nil, request_options: {}) # - # @param prompt [String] A text description of the desired image(s). The maximum length is 32000 characte - # - # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] Allows to set transparency for the background of the generated image(s). Must - # - # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT i - # - # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] Control the content-moderation level for images generated by the GPT image model - # - # @param n [Integer, nil] The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only - # - # @param output_compression [Integer, nil] The compression level (0-100%) for the generated images. This parameter is only - # - # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] The format in which the generated images are returned. This parameter is only su - # - # @param partial_images [Integer, nil] The number of partial images to generate. This parameter is used for - # - # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] The quality of the image that will be generated. - # - # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] The format in which generated images with `dall-e-2` and `dall-e-3` are returned - # - # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, ` - # - # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] The style of the generated images. This parameter is only supported for `dall-e- - # - # @param user [String] A unique identifier representing your end-user, which can help OpenAI to monitor + # @param prompt [String] + # A text description of the desired image(s). The maximum length is 32000 + # characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 + # characters for `dall-e-3`. + # + # @param background [Symbol, OpenAI::Models::ImageGenerateParams::Background, nil] + # Allows to set transparency for the background of the generated image(s). Must be + # one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + # the model will automatically determine the best background for the image. + # + # `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08` + # snapshots, support `opaque` and `transparent` backgrounds. Transparent + # backgrounds are available for supported GPT Image models. For `gpt-image-2` and + # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, + # set the output format to `png` or `webp`. + # + # @param model [String, Symbol, OpenAI::Models::ImageModel, nil] + # The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT + # image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, + # `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, + # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, + # `gpt-image-2.5-flare-2026-09-08`). Defaults to `dall-e-2` unless a parameter + # specific to the GPT image models is used. + # + # @param moderation [Symbol, OpenAI::Models::ImageGenerateParams::Moderation, nil] + # Control the content-moderation level for images generated by the GPT image + # models. Must be either `low` for less restrictive filtering or `auto` (default + # value). + # + # @param n [Integer, nil] + # The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only + # `n=1` is supported. + # + # @param output_compression [Integer, nil] + # The compression level (0-100%) for the generated images. This parameter is only + # supported for the GPT image models with the `webp` or `jpeg` output formats, and + # defaults to 100. + # + # @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil] + # The format in which the generated images are returned. This parameter is only + # supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. + # + # @param partial_images [Integer, nil] + # The number of partial images to generate. This parameter is used for streaming + # responses that return partial images. Value must be between 0 and 3. When set to + # 0, the response will be a single image sent in one streaming event. + # + # Note that the final image may be sent before the full number of partial images + # are generated if the full image is generated more quickly. + # + # @param quality [Symbol, OpenAI::Models::ImageGenerateParams::Quality, nil] + # The quality of the image that will be generated. + # + # - `auto` (default value) will automatically select the best quality for the + # given model. + # - `high`, `medium` and `low` are supported for the GPT image models. + # - `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their + # `2026-09-08` snapshots, also support `xhigh` and `max`. + # - `hd` and `standard` are supported for `dall-e-3`. + # - `standard` is the only option for `dall-e-2`. + # + # @param response_format [Symbol, OpenAI::Models::ImageGenerateParams::ResponseFormat, nil] + # The format in which generated images with `dall-e-2` and `dall-e-3` are + # returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes + # after the image has been generated. This parameter isn't supported for the GPT + # image models, which always return base64-encoded images. + # + # @param size [String, Symbol, OpenAI::Models::ImageGenerateParams::Size, nil] + # The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, + # `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, + # `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary + # resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. + # Width and height must both be divisible by 16 and the requested aspect ratio + # must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and + # the maximum supported resolution is `3840x2160`. The requested size must also + # satisfy the model's current pixel and edge limits. The standard sizes + # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; + # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use + # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of + # `1024x1024`, `1792x1024`, or `1024x1792`. + # + # @param style [Symbol, OpenAI::Models::ImageGenerateParams::Style, nil] + # The style of the generated images. This parameter is only supported for + # `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean + # towards generating hyper-real and dramatic images. Natural causes the model to + # produce more natural, less hyper-real looking images. + # + # @param user [String] + # A unique identifier representing your end-user, which can help OpenAI to monitor + # and detect abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/models.rb b/lib/openai/resources/models.rb index 0ff5f40fc..3d19e2f08 100644 --- a/lib/openai/resources/models.rb +++ b/lib/openai/resources/models.rb @@ -9,7 +9,8 @@ class Models # # @overload retrieve(model, request_options: {}) # - # @param model [String] The ID of the model to use for this request + # @param model [String] + # The ID of the model to use for this request # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -52,7 +53,8 @@ def list(params = {}) # # @overload delete(model, request_options: {}) # - # @param model [String] The model to delete + # @param model [String] + # The model to delete # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/moderations.rb b/lib/openai/resources/moderations.rb index e9aeea7e4..6fdc79207 100644 --- a/lib/openai/resources/moderations.rb +++ b/lib/openai/resources/moderations.rb @@ -5,17 +5,21 @@ module Resources # Given text and/or image inputs, classifies if those inputs are potentially # harmful. class Moderations - # Some parameter documentations has been truncated, see - # {OpenAI::Models::ModerationCreateParams} for more details. - # # Classifies if text and/or image inputs are potentially harmful. Learn more in - # the [moderation guide](https://platform.openai.com/docs/guides/moderation). + # the + # [moderation guide](https://developers.openai.com/api/docs/guides/moderation). # # @overload create(input:, model: nil, request_options: {}) # - # @param input [String, Array, Array] Input (or inputs) to classify. Can be a single string, an array of strings, or + # @param input [String, Array, Array] + # Input (or inputs) to classify. Can be a single string, an array of strings, or + # an array of multi-modal input objects similar to other models. # - # @param model [String, Symbol, OpenAI::Models::ModerationModel] The content moderation model you would like to use. Learn more in + # @param model [String, Symbol, OpenAI::Models::ModerationModel] + # The content moderation model you would like to use. Learn more in + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/realtime/calls.rb b/lib/openai/resources/realtime/calls.rb index 050690d9a..57998ac30 100644 --- a/lib/openai/resources/realtime/calls.rb +++ b/lib/openai/resources/realtime/calls.rb @@ -9,9 +9,11 @@ class Calls # # @overload create(sdp:, session: nil, request_options: {}) # - # @param sdp [String] WebRTC Session Description Protocol (SDP) offer generated by the caller. + # @param sdp [String] + # WebRTC Session Description Protocol (SDP) offer generated by the caller. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest] Realtime session object configuration. + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest] + # Realtime session object configuration. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -58,43 +60,101 @@ def create(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallAcceptParams} for more details. - # # Accept an incoming SIP call and configure the realtime session that will handle # it. # # @overload accept(call_id, audio: nil, include: nil, instructions: nil, max_output_tokens: nil, model: nil, output_modalities: nil, parallel_tool_calls: nil, prompt: nil, reasoning: nil, tool_choice: nil, tools: nil, tracing: nil, truncation: nil, type: :realtime, request_options: {}) # - # @param call_id [String] The identifier for the call provided in the - # - # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] Configuration for input and output audio. - # - # @param include [Array] Additional fields to include in server outputs. - # - # @param instructions [String] The default system instructions (i.e. system message) prepended to model calls. - # - # @param max_output_tokens [Integer, Symbol, :inf] Maximum number of output tokens for a single assistant response, - # - # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] The Realtime model used for this session. - # - # @param output_modalities [Array] The set of modalities the model can respond with. It defaults to `["audio"]`, in - # - # @param parallel_tool_calls [Boolean] Whether the model may call multiple tools in parallel. Only supported by - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model chooses tools. Provide one of the string modes or force a specific - # - # @param tools [Array] Tools available to the model. - # - # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] Realtime API can write session traces to the [Traces Dashboard](https://platform - # - # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] When the number of tokens in a conversation exceeds the model's input token limi - # - # @param type [Symbol, :realtime] The type of session to create. Always `realtime` for the Realtime API. + # @param call_id [String] + # The identifier for the call provided in the + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) + # webhook. + # + # @param audio [OpenAI::Models::Realtime::RealtimeAudioConfig] + # Configuration for input and output audio. + # + # @param include [Array] + # Additional fields to include in server outputs. + # + # `item.input_audio_transcription.logprobs`: Include logprobs for input audio + # transcription. + # + # @param instructions [String] + # The default system instructions (i.e. system message) prepended to model calls. + # This field allows the client to guide the model on desired responses. The model + # can be instructed on response content and format, (e.g. "be extremely succinct", + # "act friendly", "here are examples of good responses") and on audio behavior + # (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The + # instructions are not guaranteed to be followed by the model, but they provide + # guidance to the model on the desired behavior. + # + # Note that the server sets default instructions which will be used if this field + # is not set and are visible in the `session.created` event at the start of the + # session. + # + # @param max_output_tokens [Integer, Symbol, :inf] + # Maximum number of output tokens for a single assistant response, inclusive of + # tool calls. Provide an integer between 1 and 4096 to limit output tokens, or + # `inf` for the maximum available tokens for a given model. Defaults to `inf`. + # + # @param model [String, Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateRequest::Model] + # The Realtime model used for this session. + # + # @param output_modalities [Array] + # The set of modalities the model can respond with. It defaults to `["audio"]`, + # indicating that the model will respond with audio plus a transcript. `["text"]` + # can be used to make the model respond with text only. It is not possible to + # request both `text` and `audio` at the same time. + # + # @param parallel_tool_calls [Boolean] + # Whether the model may call multiple tools in parallel. Only supported by + # reasoning Realtime models such as `gpt-realtime-2`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param reasoning [OpenAI::Models::Realtime::RealtimeReasoning] + # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] + # How the model chooses tools. Provide one of the string modes or force a specific + # function/MCP tool. + # + # @param tools [Array] + # Tools available to the model. + # + # @param tracing [Symbol, :auto, OpenAI::Models::Realtime::RealtimeTracingConfig::TracingConfiguration, nil] + # Realtime API can write session traces to the + # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to + # disable tracing. Once tracing is enabled for a session, the configuration cannot + # be modified. + # + # `auto` will create a trace for the session with default values for the workflow + # name, group id, and metadata. + # + # @param truncation [Symbol, OpenAI::Models::Realtime::RealtimeTruncation::RealtimeTruncationStrategy, OpenAI::Models::Realtime::RealtimeTruncationRetentionRatio] + # When the number of tokens in a conversation exceeds the model's input token + # limit, the conversation be truncated, meaning messages (starting from the + # oldest) will not be included in the model's context. A 32k context model with + # 4,096 max output tokens can only include 28,224 tokens in the context before + # truncation occurs. + # + # Clients can configure truncation behavior to truncate with a lower max token + # limit, which is an effective way to control token usage and cost. + # + # Truncation will reduce the number of cached tokens on the next turn (busting the + # cache), since messages are dropped from the beginning of the context. However, + # clients can also configure truncation to retain messages up to a fraction of the + # maximum context size, which will reduce the need for future truncations and thus + # improve the cache rate. + # + # Truncation can be disabled entirely, which means the server will never truncate + # but would instead return an error if the conversation exceeds the model's input + # token limit. + # + # @param type [Symbol, :realtime] + # The type of session to create. Always `realtime` for the Realtime API. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -113,14 +173,16 @@ def accept(call_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallHangupParams} for more details. - # # End an active Realtime API call, whether it was initiated over SIP or WebRTC. # # @overload hangup(call_id, request_options: {}) # - # @param call_id [String] The identifier for the call. For SIP calls, use the value provided in the + # @param call_id [String] + # The identifier for the call. For SIP calls, use the value provided in the + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) + # webhook. For WebRTC sessions, reuse the call ID returned in the `Location` + # header when creating the call with + # [`POST /v1/realtime/calls`](https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -137,16 +199,18 @@ def hangup(call_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallReferParams} for more details. - # # Transfer an active SIP call to a new destination using the SIP REFER verb. # # @overload refer(call_id, target_uri:, request_options: {}) # - # @param call_id [String] The identifier for the call provided in the + # @param call_id [String] + # The identifier for the call provided in the + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) + # webhook. # - # @param target_uri [String] URI that should appear in the SIP Refer-To header. Supports values like + # @param target_uri [String] + # URI that should appear in the SIP Refer-To header. Supports values like + # `tel:+14155550123` or `sip:agent@example.com`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -165,16 +229,18 @@ def refer(call_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::CallRejectParams} for more details. - # # Decline an incoming SIP call by returning a SIP status code to the caller. # # @overload reject(call_id, status_code: nil, request_options: {}) # - # @param call_id [String] The identifier for the call provided in the + # @param call_id [String] + # The identifier for the call provided in the + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) + # webhook. # - # @param status_code [Integer] SIP response code to send back to the caller. Defaults to `603` (Decline) + # @param status_code [Integer] + # SIP response code to send back to the caller. Defaults to `603` (Decline) when + # omitted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/realtime/client_secrets.rb b/lib/openai/resources/realtime/client_secrets.rb index d28c8ed39..368b9e5d4 100644 --- a/lib/openai/resources/realtime/client_secrets.rb +++ b/lib/openai/resources/realtime/client_secrets.rb @@ -4,9 +4,6 @@ module OpenAI module Resources class Realtime class ClientSecrets - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Realtime::ClientSecretCreateParams} for more details. - # # Create a Realtime client secret with an associated session configuration. # # Client secrets are short-lived tokens that can be passed to a client app, such @@ -18,16 +15,22 @@ class ClientSecrets # will be applied to any sessions created using that client secret, but these can # also be overridden by the client connection. # - # [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + # [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). # # Returns the created client secret and the effective session object. The client # secret is a string that looks like `ek_1234`. # # @overload create(expires_after: nil, session: nil, request_options: {}) # - # @param expires_after [OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter] Configuration for the client secret expiration. Expiration refers to the time af + # @param expires_after [OpenAI::Models::Realtime::ClientSecretCreateParams::ExpiresAfter] + # Configuration for the client secret expiration. Expiration refers to the time + # after which a client secret will no longer be valid for creating sessions. The + # session itself may continue after that time once started. A secret can be used + # to create multiple sessions until it expires. # - # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] Session configuration to use for the client secret. Choose either a realtime + # @param session [OpenAI::Models::Realtime::RealtimeSessionCreateRequest, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest] + # Session configuration to use for the client secret. Choose either a realtime + # session or a transcription session. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/responses.rb b/lib/openai/resources/responses.rb index 73ad59b48..2d3000738 100644 --- a/lib/openai/resources/responses.rb +++ b/lib/openai/resources/responses.rb @@ -13,82 +13,264 @@ class Responses # See {OpenAI::Resources::Responses#stream_raw} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams} for more details. - # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. # # @overload create(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Responses::ResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -119,92 +301,7 @@ def create(params = {}) ) end - # See {OpenAI::Resources::Responses#create} for non-streaming counterpart. - # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams} for more details. - # - # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. - # - # @overload stream(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, response_id: nil, safety_identifier: nil, service_tier: nil, starting_after: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param context_management [Array, nil] Context management configuration for this request. - # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently suppo - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-6-astra`. OpenAI - # - # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] Configuration for running moderation on the input and output of this response. - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-turn conversations. - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] **o-series models only** - # - # @param response_id [String, nil] The ID of the response whose stream to resume. - # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param starting_after [Integer, nil] The sequence number of the event after which to resume streaming. Can only be used with `response_id`. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely tokens to - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] The truncation strategy to use for the model response. - # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use - # - # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [OpenAI::Internal::Stream] - # - # @see OpenAI::Models::Responses::ResponseCreateParams + # Creates or resumes a streaming response and parses structured outputs. def stream(params) parsed, options = OpenAI::Responses::ResponseCreateParams.dump_request(params) starting_after, response_id = parsed.values_at(:starting_after, :response_id) @@ -257,76 +354,264 @@ def stream(params) # See {OpenAI::Resources::Responses#create} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCreateParams} for more details. - # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. - # - # @overload stream_raw(background: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) - # - # @param background [Boolean, nil] Whether to run the model response in the background. - # - # @param include [Array, nil] Specify additional output data to include in the model response. Currently - # - # @param input [String, Array] Text, image, or file inputs to the model, used to generate a response. - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param max_output_tokens [Integer, nil] An upper bound for the number of tokens that can be generated for a response, in - # - # @param max_tool_calls [Integer, nil] The maximum number of total calls to built-in tools that can be processed in a r - # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-turn conversations. - # - # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. - # - # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] Deprecated. Use `prompt_cache_options.ttl` instead. - # - # @param reasoning [OpenAI::Models::Reasoning, nil] Configuration options for - # - # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. - # - # @param store [Boolean, nil] Whether to store the generated model response for later retrieval via - # - # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`. - # - # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m - # - # @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] How the model should select which tool (or tools) to use when generating - # - # @param tools [Array] An array of tools the model may call while generating a response. You - # - # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely - # - # @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling, - # - # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] The truncation strategy to use for the model response. + # @overload stream(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, response_id: nil, safety_identifier: nil, service_tier: nil, starting_after: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {}) # - # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # @param background [Boolean, nil] + # Whether to run the model response in the background. + # [Learn more](https://developers.openai.com/api/docs/guides/background). + # + # @param context_management [Array, nil] + # Context management configuration for this request. + # + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param include [Array, nil] + # Specify additional output data to include in the model response. Currently + # supported values are: + # + # - `web_search_call.action.sources`: Include the sources of the web search tool + # call. + # - `code_interpreter_call.outputs`: Includes the outputs of python code execution + # in code interpreter tool call items. + # - `computer_call_output.output.image_url`: Include image urls from the computer + # call output. + # - `file_search_call.results`: Include the search results of the file search tool + # call. + # - `message.input_image.image_url`: Include image urls from the input message. + # - `message.output_text.logprobs`: Include logprobs with assistant messages. + # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning + # tokens in reasoning item outputs. This enables reasoning items to be used in + # multi-turn conversations when using the Responses API statelessly (like when + # the `store` parameter is set to `false`, or when an organization is enrolled + # in the zero data retention program). + # + # @param input [String, Array] + # Text, image, or file inputs to the model, used to generate a response. + # + # Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. + # + # When using along with `previous_response_id`, the instructions from a previous + # response will not be carried over to the next response. This makes it simple to + # swap out system (or developer) messages in new responses. + # + # @param max_output_tokens [Integer, nil] + # An upper bound for the number of tokens that can be generated for a response, + # including visible output tokens and + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param max_tool_calls [Integer, nil] + # The maximum number of total calls to built-in tools that can be processed in a + # response. This maximum number applies across all built-in tool calls, not per + # individual tool. Any further attempts to call a tool by the model will be + # ignored. + # + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param moderation [OpenAI::Models::Responses::ResponseCreateParams::Moderation, nil] + # Configuration for running moderation on the input and output of this response. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] + # Reference to a prompt template and its variables. + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). + # + # @param prompt_cache_key [String, nil] + # Used by OpenAI to cache responses for similar requests to optimize your cache + # hit rates. Replaces the `user` field. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). + # + # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheRetention, nil] + # Deprecated. Use `prompt_cache_options.ttl` instead. + # + # The retention policy for the prompt cache. Set to `24h` to enable extended + # prompt caching, which keeps cached prefixes active for longer, up to a maximum + # of 24 hours. + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). + # This field expresses a maximum retention policy, while + # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields + # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future + # models, only `24h` is supported. + # + # For older models that support both `in_memory` and `24h`, the default depends on + # your organization's data retention policy: + # + # - Organizations without ZDR enabled default to `24h`. + # - Organizations with ZDR enabled default to `in_memory` when + # `prompt_cache_retention` is not specified. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param safety_identifier [String, nil] + # A stable identifier used to help detect users of your application that may be + # violating OpenAI's usage policies. The IDs should be a string that uniquely + # identifies each user, with a maximum length of 64 characters. We recommend + # hashing their username or email address, in order to avoid sending us any + # identifying information. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). + # + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. + # + # - 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'. + # - If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. + # - If set to 'ultrafast', then the request will be processed with the + # access-controlled Ultrafast Processing service tier. This tier is currently + # available for `gpt-5.6-sol`; a response served through it will show + # `service_tier=ultrafast`. + # - When not set, the default behavior is 'auto'. + # + # 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. + # + # @param store [Boolean, nil] + # Whether to store the generated model response for later retrieval via API. + # Defaults to true when omitted. If set to true, response data will be stored for + # at least 30 days, subject to the + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). + # + # @param stream_options [OpenAI::Models::Responses::ResponseCreateParams::StreamOptions, nil] + # Options for streaming responses. Only set this when you set `stream: true`. + # + # @param temperature [Float, nil] + # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + # make the output more random, while lower values like 0.2 will make it more + # focused and deterministic. We generally recommend altering this or `top_p` but + # not both. + # + # @param text [OpenAI::Models::Responses::ResponseTextConfig] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ResponseCreateParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell] + # How the model should select which tool (or tools) to use when generating a + # response. See the `tools` parameter to see how to specify which tools the model + # can call. + # + # @param tools [Array] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # We support the following categories of tools: + # + # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's + # capabilities, like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). + # Learn more about + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). + # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or + # predefined connectors such as Google Drive and SharePoint. Learn more about + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). + # - **Function calls (custom tools)**: Functions that are defined by you, enabling + # the model to call your own code with strongly typed arguments and outputs. + # Learn more about + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). + # You can also use custom tools to call your own code. + # + # @param top_logprobs [Integer, nil] + # An integer between 0 and 20 specifying the maximum number of most likely tokens + # to return at each token position, each with an associated log probability. In + # some cases, the number of returned tokens may be fewer than requested. + # + # @param top_p [Float, nil] + # An alternative to sampling with temperature, called nucleus sampling, where the + # model considers the results of the tokens with top_p probability mass. So 0.1 + # means only the tokens comprising the top 10% probability mass are considered. + # + # We generally recommend altering this or `temperature` but not both. + # + # @param truncation [Symbol, OpenAI::Models::Responses::ResponseCreateParams::Truncation, nil] + # The truncation strategy to use for the model response. + # + # - `auto`: If the input to this Response exceeds the model's context window size, + # the model will truncate the response to fit the context window by dropping + # items from the beginning of the conversation. + # - `disabled` (default): If the input size will exceed the context window size + # for a model, the request will fail with a 400 error. + # + # @param user [String] + # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use + # `prompt_cache_key` instead to maintain caching optimizations. A stable + # identifier for your end-users. Used to boost cache hit rates by better bucketing + # similar requests and to help OpenAI detect and prevent abuse. + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -355,20 +640,27 @@ def stream_raw(params = {}) # See {OpenAI::Resources::Responses#retrieve_streaming} for streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseRetrieveParams} for more details. - # # Retrieves a model response with the given ID. # # @overload retrieve(response_id, include: nil, include_obfuscation: nil, starting_after: nil, text: nil, tools: nil, request_options: {}) # - # @param response_id [String] The ID of the response to retrieve. + # @param response_id [String] + # The ID of the response to retrieve. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. # - # @param starting_after [Integer] The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # The sequence number of the event after which to start streaming. # # @param text [OpenAI::Responses::ResponseTextConfig, OpenAI::StructuredOutput::JsonSchemaConverter, Hash, nil] The structured-output model, # or the same typed/hash text configuration accepted by creation, used to parse retrieved text output. This is a local parsing hint and is not @@ -415,20 +707,27 @@ def retrieve(response_id, params = {}) # See {OpenAI::Resources::Responses#retrieve} for non-streaming counterpart. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseRetrieveParams} for more details. - # # Retrieves a model response with the given ID. # # @overload retrieve_streaming(response_id, include: nil, include_obfuscation: nil, starting_after: nil, request_options: {}) # - # @param response_id [String] The ID of the response to retrieve. + # @param response_id [String] + # The ID of the response to retrieve. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds + # @param include_obfuscation [Boolean] + # When true, stream obfuscation will be enabled. Stream obfuscation adds random + # characters to an `obfuscation` field on streaming delta events to normalize + # payload sizes as a mitigation to certain side-channel attacks. These obfuscation + # fields are included by default, but add a small amount of overhead to the data + # stream. You can set `include_obfuscation` to false to optimize for bandwidth if + # you trust the network links between your application and the OpenAI API. # - # @param starting_after [Integer] The sequence number of the event after which to start streaming. + # @param starting_after [Integer] + # The sequence number of the event after which to start streaming. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -476,7 +775,8 @@ def retrieve_streaming(response_id, params = {}) # # @overload delete(response_id, request_options: {}) # - # @param response_id [String] The ID of the response to delete. + # @param response_id [String] + # The ID of the response to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -495,11 +795,12 @@ def delete(response_id, params = {}) # Cancels a model response with the given ID. Only responses created with the # `background` parameter set to `true` can be cancelled. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). # # @overload cancel(response_id, request_options: {}) # - # @param response_id [String] The ID of the response to cancel. + # @param response_id [String] + # The ID of the response to cancel. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -516,33 +817,71 @@ def cancel(response_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::ResponseCompactParams} for more details. - # # Compact a conversation. Returns a compacted response object. # # Learn when and how to compact long-running conversations in the - # [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + # [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). # For ZDR-compatible compaction details, see - # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). # # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {}) # - # @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide - # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu - # - # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. - # - # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions, nil] Options for prompt caching. Supported for `gpt-5.6` and later models. By default - # - # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request. - # - # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto' + # @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] + # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide + # range of models with different capabilities, performance characteristics, and + # price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param prompt_cache_key [String, nil] + # A key to use when reading from or writing to the prompt cache. + # + # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCompactParams::PromptCacheOptions, nil] + # Options for prompt caching. Supported for `gpt-5.6` and later models. By + # default, OpenAI automatically chooses one implicit cache breakpoint. You can add + # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each + # request can write up to four breakpoints. For cache matching, OpenAI considers + # up to the latest 80 breakpoints in the conversation, without a content-block + # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The + # `ttl` defaults to `30m`, which is currently the only supported value. See the + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + # for current details. + # + # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] + # How long to retain a prompt cache entry created by this request. + # + # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] + # Specifies the processing type used for serving the request. - 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'. - + # If set to 'default', then the request will be processed with the standard + # pricing and performance for the selected model. - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/responses/input_items.rb b/lib/openai/resources/responses/input_items.rb index a395bdaa2..c307701a8 100644 --- a/lib/openai/resources/responses/input_items.rb +++ b/lib/openai/resources/responses/input_items.rb @@ -4,22 +4,29 @@ module OpenAI module Resources class Responses class InputItems - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::InputItemListParams} for more details. - # # Returns a list of input items for a given response. # # @overload list(response_id, after: nil, include: nil, limit: nil, order: nil, request_options: {}) # - # @param response_id [String] The ID of the response to retrieve input items for. + # @param response_id [String] + # The ID of the response to retrieve input items for. + # + # @param after [String] + # An item ID to list items after, used in pagination. # - # @param after [String] An item ID to list items after, used in pagination. + # @param include [Array] + # Additional fields to include in the response. See the `include` parameter for + # Response creation above for more information. # - # @param include [Array] Additional fields to include in the response. See the `include` + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between + # @param order [Symbol, OpenAI::Models::Responses::InputItemListParams::Order] + # The order to return the input items in. Default is `desc`. # - # @param order [Symbol, OpenAI::Models::Responses::InputItemListParams::Order] The order to return the input items in. Default is `desc`. + # - `asc`: Return the input items in ascending order. + # - `desc`: Return the input items in descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/responses/input_tokens.rb b/lib/openai/resources/responses/input_tokens.rb index 222259d21..d9ae1be26 100644 --- a/lib/openai/resources/responses/input_tokens.rb +++ b/lib/openai/resources/responses/input_tokens.rb @@ -4,9 +4,6 @@ module OpenAI module Resources class Responses class InputTokens - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Responses::InputTokenCountParams} for more details. - # # Returns input token counts of the request. # # Returns an object with `object` set to `response.input_tokens` and an @@ -14,29 +11,66 @@ class InputTokens # # @overload count(conversation: nil, input: nil, instructions: nil, model: nil, parallel_tool_calls: nil, personality: nil, previous_response_id: nil, reasoning: nil, text: nil, tool_choice: nil, tools: nil, truncation: nil, request_options: {}) # - # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are - # - # @param input [String, Array, nil] Text, image, or file inputs to the model, used to generate a response - # - # @param instructions [String, nil] A system (or developer) message inserted into the model's context. - # - # @param model [String, nil] Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a w - # - # @param parallel_tool_calls [Boolean, nil] Whether to allow the model to run tool calls in parallel. - # - # @param personality [String, Symbol, OpenAI::Models::Responses::InputTokenCountParams::Personality] A model-owned style preset to apply to this request. Omit this parameter to use - # - # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu - # - # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** Configuration options for [reasoning models]( - # - # @param text [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] Configuration options for a text response from the model. Can be plain - # - # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::InputTokenCountParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] Controls which tool the model should use, if any. - # - # @param tools [Array, nil] An array of tools the model may call while generating a response. You can specif - # - # @param truncation [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Truncation] The truncation strategy to use for the model response. - `auto`: If the input to + # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] + # The conversation that this response belongs to. Items from this conversation are + # prepended to `input_items` for this response request. Input items and output + # items from this response are automatically added to this conversation after this + # response completes. + # + # @param input [String, Array, nil] + # Text, image, or file inputs to the model, used to generate a response + # + # @param instructions [String, nil] + # A system (or developer) message inserted into the model's context. When used + # along with `previous_response_id`, the instructions from a previous response + # will not be carried over to the next response. This makes it simple to swap out + # system (or developer) messages in new responses. + # + # @param model [String, nil] + # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a + # wide range of models with different capabilities, performance characteristics, + # and price points. Refer to the + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. + # + # @param parallel_tool_calls [Boolean, nil] + # Whether to allow the model to run tool calls in parallel. + # + # @param personality [String, Symbol, OpenAI::Models::Responses::InputTokenCountParams::Personality] + # A model-owned style preset to apply to this request. Omit this parameter to use + # the model's default style. Supported values may expand over time. Values must be + # at most 64 characters. + # + # @param previous_response_id [String, nil] + # The unique ID of the previous response to the model. Use this to create + # multi-turn conversations. Learn more about + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). + # Cannot be used in conjunction with `conversation`. + # + # @param reasoning [OpenAI::Models::Reasoning, nil] + # **gpt-5 and o-series models only** Configuration options for + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). + # + # @param text [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] + # Configuration options for a text response from the model. Can be plain text or + # structured JSON data. Learn more: + # + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) + # + # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::InputTokenCountParams::ToolChoice::SpecificProgrammaticToolCallingParam, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] + # Controls which tool the model should use, if any. + # + # @param tools [Array, nil] + # An array of tools the model may call while generating a response. You can + # specify which tool to use by setting the `tool_choice` parameter. + # + # @param truncation [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Truncation] + # The truncation strategy to use for the model response. - `auto`: If the input to + # this Response exceeds the model's context window size, the model will truncate + # the response to fit the context window by dropping items from the beginning of + # the conversation. - `disabled` (default): If the input size will exceed the + # context window size for a model, the request will fail with a 400 error. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/safety/alerts.rb b/lib/openai/resources/safety/alerts.rb index c485cd7a5..e2f7d612b 100644 --- a/lib/openai/resources/safety/alerts.rb +++ b/lib/openai/resources/safety/alerts.rb @@ -8,7 +8,8 @@ class Alerts # # @overload retrieve(id, request_options: {}) # - # @param id [String] Project safety alert ID + # @param id [String] + # Project safety alert ID # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/skills.rb b/lib/openai/resources/skills.rb index e412a5033..dd80f0c1c 100644 --- a/lib/openai/resources/skills.rb +++ b/lib/openai/resources/skills.rb @@ -17,7 +17,12 @@ class Skills # # @overload create(files: nil, request_options: {}) # - # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] Skill files to upload (directory upload) or a single zip file. + # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] + # Skill files to upload (directory upload) or a single zip file. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -41,7 +46,8 @@ def create(params = {}) # # @overload retrieve(skill_id, request_options: {}) # - # @param skill_id [String] The identifier of the skill to retrieve. + # @param skill_id [String] + # The identifier of the skill to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -62,9 +68,11 @@ def retrieve(skill_id, params = {}) # # @overload update(skill_id, default_version:, request_options: {}) # - # @param skill_id [String] The identifier of the skill. + # @param skill_id [String] + # The identifier of the skill. # - # @param default_version [String] The skill version number to set as default. + # @param default_version [String] + # The skill version number to set as default. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -83,18 +91,19 @@ def update(skill_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::SkillListParams} for more details. - # # List all skills for the current project. # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] Identifier for the last item from the previous pagination request + # @param after [String] + # Identifier for the last item from the previous pagination request # - # @param limit [Integer] Number of items to retrieve + # @param limit [Integer] + # Number of items to retrieve # - # @param order [Symbol, OpenAI::Models::SkillListParams::Order] Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # @param order [Symbol, OpenAI::Models::SkillListParams::Order] + # Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -119,7 +128,8 @@ def list(params = {}) # # @overload delete(skill_id, request_options: {}) # - # @param skill_id [String] The identifier of the skill to delete. + # @param skill_id [String] + # The identifier of the skill to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/skills/content.rb b/lib/openai/resources/skills/content.rb index addebb997..e53c550bf 100644 --- a/lib/openai/resources/skills/content.rb +++ b/lib/openai/resources/skills/content.rb @@ -8,7 +8,8 @@ class Content # # @overload retrieve(skill_id, request_options: {}) # - # @param skill_id [String] The identifier of the skill to download. + # @param skill_id [String] + # The identifier of the skill to download. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/skills/versions.rb b/lib/openai/resources/skills/versions.rb index ec96a2168..985d2330e 100644 --- a/lib/openai/resources/skills/versions.rb +++ b/lib/openai/resources/skills/versions.rb @@ -15,11 +15,18 @@ class Versions # # @overload create(skill_id, default: nil, files: nil, request_options: {}) # - # @param skill_id [String] The identifier of the skill to version. + # @param skill_id [String] + # The identifier of the skill to version. # - # @param default [Boolean] Whether to set this version as the default. + # @param default [Boolean] + # Whether to set this version as the default. # - # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] Skill files to upload (directory upload) or a single zip file. + # @param files [Array, Pathname, StringIO, IO, String, OpenAI::FilePart] + # Skill files to upload (directory upload) or a single zip file. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -43,9 +50,11 @@ def create(skill_id, params = {}) # # @overload retrieve(version, skill_id:, request_options: {}) # - # @param version [String] The version number to retrieve. + # @param version [String] + # The version number to retrieve. # - # @param skill_id [String] The identifier of the skill. + # @param skill_id [String] + # The identifier of the skill. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -71,13 +80,17 @@ def retrieve(version, params) # # @overload list(skill_id, after: nil, limit: nil, order: nil, request_options: {}) # - # @param skill_id [String] The identifier of the skill. + # @param skill_id [String] + # The identifier of the skill. # - # @param after [String] The skill version ID to start after. + # @param after [String] + # The skill version ID to start after. # - # @param limit [Integer] Number of versions to retrieve. + # @param limit [Integer] + # Number of versions to retrieve. # - # @param order [Symbol, OpenAI::Models::Skills::VersionListParams::Order] Sort order of results by version number. + # @param order [Symbol, OpenAI::Models::Skills::VersionListParams::Order] + # Sort order of results by version number. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -102,9 +115,11 @@ def list(skill_id, params = {}) # # @overload delete(version, skill_id:, request_options: {}) # - # @param version [String] The skill version number. + # @param version [String] + # The skill version number. # - # @param skill_id [String] The identifier of the skill. + # @param skill_id [String] + # The identifier of the skill. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/skills/versions/content.rb b/lib/openai/resources/skills/versions/content.rb index 42151189b..20f7dc15b 100644 --- a/lib/openai/resources/skills/versions/content.rb +++ b/lib/openai/resources/skills/versions/content.rb @@ -9,9 +9,11 @@ class Content # # @overload retrieve(version, skill_id:, request_options: {}) # - # @param version [String] The skill version number. + # @param version [String] + # The skill version number. # - # @param skill_id [String] The identifier of the skill. + # @param skill_id [String] + # The identifier of the skill. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/uploads.rb b/lib/openai/resources/uploads.rb index 8825b122f..f215cdbec 100644 --- a/lib/openai/resources/uploads.rb +++ b/lib/openai/resources/uploads.rb @@ -8,42 +8,51 @@ class Uploads # @return [OpenAI::Resources::Uploads::Parts] attr_reader :parts - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCreateParams} for more details. - # # Creates an intermediate - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object + # [Upload](https://developers.openai.com/api/reference/resources/uploads) object # that you can add - # [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to. - # Currently, an Upload can accept at most 8 GB in total and expires after an hour - # after you create it. + # [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + # to. Currently, an Upload can accept at most 8 GB in total and expires after an + # hour after you create it. # # Once you complete the Upload, we will create a - # [File](https://platform.openai.com/docs/api-reference/files/object) object that + # [File](https://developers.openai.com/api/reference/resources/files) object that # contains all the parts you uploaded. This File is usable in the rest of our # platform as a regular File object. # # For certain `purpose` values, the correct `mime_type` must be specified. Please # refer to documentation for the - # [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files). + # [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). # # For guidance on the proper filename extensions for each purpose, please follow # the documentation on - # [creating a File](https://platform.openai.com/docs/api-reference/files/create). + # [creating a File](https://developers.openai.com/api/reference/resources/files/methods/create). # # Returns the Upload object with status `pending`. # # @overload create(bytes:, filename:, mime_type:, purpose:, expires_after: nil, request_options: {}) # - # @param bytes [Integer] The number of bytes in the file you are uploading. + # @param bytes [Integer] + # The number of bytes in the file you are uploading. + # + # @param filename [String] + # The name of the file to upload. + # + # @param mime_type [String] + # The MIME type of the file. # - # @param filename [String] The name of the file to upload. + # This must fall within the supported MIME types for your file purpose. See the + # supported MIME types for assistants and vision. # - # @param mime_type [String] The MIME type of the file. + # @param purpose [Symbol, OpenAI::Models::FilePurpose] + # The intended purpose of the uploaded file. # - # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. + # See the + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). # - # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire + # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] + # The expiration policy for a file. By default, files with `purpose=batch` expire + # after 30 days and all other files are persisted until they are manually deleted. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -62,16 +71,14 @@ def create(params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCancelParams} for more details. - # # Cancels the Upload. No Parts may be added after an Upload is cancelled. # # Returns the Upload object with status `cancelled`. # # @overload cancel(upload_id, request_options: {}) # - # @param upload_id [String] The ID of the Upload. + # @param upload_id [String] + # The ID of the Upload. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -88,14 +95,11 @@ def cancel(upload_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::UploadCompleteParams} for more details. - # # Completes the - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + # [Upload](https://developers.openai.com/api/reference/resources/uploads). # # Within the returned Upload object, there is a nested - # [File](https://platform.openai.com/docs/api-reference/files/object) object that + # [File](https://developers.openai.com/api/reference/resources/files) object that # is ready to use in the rest of the platform. # # You can specify the order of the Parts by passing in an ordered list of the Part @@ -109,11 +113,15 @@ def cancel(upload_id, params = {}) # # @overload complete(upload_id, part_ids:, md5: nil, request_options: {}) # - # @param upload_id [String] The ID of the Upload. + # @param upload_id [String] + # The ID of the Upload. # - # @param part_ids [Array] The ordered list of Part IDs. + # @param part_ids [Array] + # The ordered list of Part IDs. # - # @param md5 [String] The optional md5 checksum for the file contents to verify if the bytes uploaded + # @param md5 [String] + # The optional md5 checksum for the file contents to verify if the bytes uploaded + # matches what you expect. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/uploads/parts.rb b/lib/openai/resources/uploads/parts.rb index 530deb581..89d2ee5d5 100644 --- a/lib/openai/resources/uploads/parts.rb +++ b/lib/openai/resources/uploads/parts.rb @@ -5,20 +5,18 @@ module Resources class Uploads # Use Uploads to upload large files in multiple parts. class Parts - # Some parameter documentations has been truncated, see - # {OpenAI::Models::Uploads::PartCreateParams} for more details. - # # Adds a - # [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. - # A Part represents a chunk of bytes from the file you are trying to upload. + # [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + # to an [Upload](https://developers.openai.com/api/reference/resources/uploads) + # object. A Part represents a chunk of bytes from the file you are trying to + # upload. # # Each Part can be at most 64 MB, and you can add Parts until you hit the Upload # maximum of 8 GB. # # It is possible to add multiple Parts in parallel. You can decide the intended # order of the Parts when you - # [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + # [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload # metadata. Use `OpenAI::FilePart` when you need to override the filename or @@ -26,9 +24,15 @@ class Parts # # @overload create(upload_id, data:, request_options: {}) # - # @param upload_id [String] The ID of the Upload. + # @param upload_id [String] + # The ID of the Upload. + # + # @param data [Pathname, StringIO, IO, String, OpenAI::FilePart] + # The chunk of bytes for this Part. # - # @param data [Pathname, StringIO, IO, String, OpenAI::FilePart] The chunk of bytes for this Part. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/vector_stores.rb b/lib/openai/resources/vector_stores.rb index 4deaad8c1..95ec548e6 100644 --- a/lib/openai/resources/vector_stores.rb +++ b/lib/openai/resources/vector_stores.rb @@ -9,24 +9,36 @@ class VectorStores # @return [OpenAI::Resources::VectorStores::FileBatches] attr_reader :file_batches - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreCreateParams} for more details. - # # Create a vector store. # # @overload create(chunking_strategy: nil, description: nil, expires_after: nil, file_ids: nil, metadata: nil, name: nil, request_options: {}) # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. + # + # @param description [String] + # A description for the vector store. Can be used to describe the vector store's + # purpose. # - # @param description [String] A description for the vector store. Can be used to describe the vector store's p + # @param expires_after [OpenAI::Models::VectorStoreCreateParams::ExpiresAfter] + # The expiration policy for a vector store. # - # @param expires_after [OpenAI::Models::VectorStoreCreateParams::ExpiresAfter] The expiration policy for a vector store. + # @param file_ids [Array] + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. # - # @param file_ids [Array] A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. # - # @param name [String] The name of the vector store. + # @param name [String] + # The name of the vector store. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -49,7 +61,8 @@ def create(params = {}) # # @overload retrieve(vector_store_id, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store to retrieve. + # @param vector_store_id [String] + # The ID of the vector store to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -66,20 +79,26 @@ def retrieve(vector_store_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreUpdateParams} for more details. - # # Modifies a vector store. # # @overload update(vector_store_id, expires_after: nil, metadata: nil, name: nil, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store to modify. + # @param vector_store_id [String] + # The ID of the vector store to modify. # - # @param expires_after [OpenAI::Models::VectorStoreUpdateParams::ExpiresAfter, nil] The expiration policy for a vector store. + # @param expires_after [OpenAI::Models::VectorStoreUpdateParams::ExpiresAfter, nil] + # The expiration policy for a vector store. # - # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. # - # @param name [String, nil] The name of the vector store. + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @param name [String, nil] + # The name of the vector store. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -98,20 +117,29 @@ def update(vector_store_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreListParams} for more details. - # # Returns a list of vector stores. # # @overload list(after: nil, before: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::VectorStoreListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::VectorStoreListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -136,7 +164,8 @@ def list(params = {}) # # @overload delete(vector_store_id, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store to delete. + # @param vector_store_id [String] + # The ID of the vector store to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -153,25 +182,29 @@ def delete(vector_store_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStoreSearchParams} for more details. - # # Search a vector store for relevant chunks based on a query and file attributes # filter. # # @overload search(vector_store_id, query:, filters: nil, max_num_results: nil, ranking_options: nil, rewrite_query: nil, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store to search. + # @param vector_store_id [String] + # The ID of the vector store to search. # - # @param query [String, Array] A query string for a search + # @param query [String, Array] + # A query string for a search # - # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter] A filter to apply based on file attributes. + # @param filters [OpenAI::Models::ComparisonFilter, OpenAI::Models::CompoundFilter] + # A filter to apply based on file attributes. # - # @param max_num_results [Integer] The maximum number of results to return. This number should be between 1 and 50 + # @param max_num_results [Integer] + # The maximum number of results to return. This number should be between 1 and 50 + # inclusive. # - # @param ranking_options [OpenAI::Models::VectorStoreSearchParams::RankingOptions] Ranking options for search. + # @param ranking_options [OpenAI::Models::VectorStoreSearchParams::RankingOptions] + # Ranking options for search. # - # @param rewrite_query [Boolean] Whether to rewrite the natural language query for vector search. + # @param rewrite_query [Boolean] + # Whether to rewrite the natural language query for vector search. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/vector_stores/file_batches.rb b/lib/openai/resources/vector_stores/file_batches.rb index f23b2fb86..b154761db 100644 --- a/lib/openai/resources/vector_stores/file_batches.rb +++ b/lib/openai/resources/vector_stores/file_batches.rb @@ -6,22 +6,39 @@ module OpenAI module Resources class VectorStores class FileBatches - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileBatchCreateParams} for more details. - # # Create a vector store file batch. # # @overload create(vector_store_id, attributes: nil, chunking_strategy: nil, file_ids: nil, files: nil, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store for which to create a File Batch. - # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be - # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` - # - # @param file_ids [Array] A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # - # @param files [Array] A list of objects that each include a `file_id` plus optional `attributes` or `c + # @param vector_store_id [String] + # The ID of the vector store for which to create a File Batch. + # + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. + # + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. + # + # @param file_ids [Array] + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. + # + # @param files [Array] + # A list of objects that each include a `file_id` plus optional `attributes` or + # `chunking_strategy`. Use this when you need to override metadata for specific + # files. The global `attributes` or `chunking_strategy` will be ignored and must + # be specified for each file. The maximum batch size is 2000 files. This endpoint + # is recommended for multi-file ingestion and helps reduce per-vector-store write + # request pressure. Mutually exclusive with `file_ids`. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -107,9 +124,11 @@ def create_and_poll( # # @overload retrieve(batch_id, vector_store_id:, request_options: {}) # - # @param batch_id [String] The ID of the file batch being retrieved. + # @param batch_id [String] + # The ID of the file batch being retrieved. # - # @param vector_store_id [String] The ID of the vector store that the file batch belongs to. + # @param vector_store_id [String] + # The ID of the vector store that the file batch belongs to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -136,9 +155,11 @@ def retrieve(batch_id, params) # # @overload cancel(batch_id, vector_store_id:, request_options: {}) # - # @param batch_id [String] The ID of the file batch to cancel. + # @param batch_id [String] + # The ID of the file batch to cancel. # - # @param vector_store_id [String] The ID of the vector store that the file batch belongs to. + # @param vector_store_id [String] + # The ID of the vector store that the file batch belongs to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -160,26 +181,39 @@ def cancel(batch_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileBatchListFilesParams} for more details. - # # Returns a list of vector store files in a batch. # # @overload list_files(batch_id, vector_store_id:, after: nil, before: nil, filter: nil, limit: nil, order: nil, request_options: {}) # - # @param batch_id [String] Path param: The ID of the file batch that the files belong to. + # @param batch_id [String] + # Path param: The ID of the file batch that the files belong to. # - # @param vector_store_id [String] Path param: The ID of the vector store that the files belong to. + # @param vector_store_id [String] + # Path param: The ID of the vector store that the files belong to. # - # @param after [String] Query param: A cursor for use in pagination. `after` is an object ID that define + # @param after [String] + # Query param: A cursor for use in pagination. `after` is an object ID that + # defines your place in the list. For instance, if you make a list request and + # receive 100 objects, ending with obj_foo, your subsequent call can include + # after=obj_foo in order to fetch the next page of the list. # - # @param before [String] Query param: A cursor for use in pagination. `before` is an object ID that defin + # @param before [String] + # Query param: A cursor for use in pagination. `before` is an object ID that + # defines your place in the list. For instance, if you make a list request and + # receive 100 objects, starting with obj_foo, your subsequent call can include + # before=obj_foo in order to fetch the previous page of the list. # - # @param filter [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Filter] Query param: Filter by file status. One of `in_progress`, `completed`, `failed`, + # @param filter [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Filter] + # Query param: Filter by file status. One of `in_progress`, `completed`, `failed`, + # `cancelled`. # - # @param limit [Integer] Query param: A limit on the number of objects to be returned. Limit can range be + # @param limit [Integer] + # Query param: A limit on the number of objects to be returned. Limit can range + # between 1 and 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Order] Query param: Sort order by the `created_at` timestamp of the objects. `asc` for + # @param order [Symbol, OpenAI::Models::VectorStores::FileBatchListFilesParams::Order] + # Query param: Sort order by the `created_at` timestamp of the objects. `asc` for + # ascending order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/vector_stores/files.rb b/lib/openai/resources/vector_stores/files.rb index b976d6238..ef4b58771 100644 --- a/lib/openai/resources/vector_stores/files.rb +++ b/lib/openai/resources/vector_stores/files.rb @@ -6,22 +6,32 @@ module OpenAI module Resources class VectorStores class Files - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileCreateParams} for more details. - # # Create a vector store file by attaching a - # [File](https://platform.openai.com/docs/api-reference/files) to a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + # [File](https://developers.openai.com/api/reference/resources/files) to a + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores). # # @overload create(vector_store_id, file_id:, attributes: nil, chunking_strategy: nil, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store for which to create a File. + # @param vector_store_id [String] + # The ID of the vector store for which to create a File. # - # @param file_id [String] A [File](https://platform.openai.com/docs/api-reference/files) ID that the vecto + # @param file_id [String] + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access + # files. For multi-file ingestion, we recommend + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) + # to minimize per-vector-store write requests. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Set of 16 key-value pairs that can be attached to an object. This can be + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Set of 16 key-value pairs that can be attached to an object. This can be useful + # for storing additional information about the object in a structured format, and + # querying for objects via API or the dashboard. Keys are strings with a maximum + # length of 64 characters. Values are strings with a maximum length of 512 + # characters, booleans, or numbers. # - # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # @param chunking_strategy [OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam] + # The chunking strategy used to chunk the file(s). If not set, will use the `auto` + # strategy. Only applicable if `file_ids` is non-empty. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -102,9 +112,11 @@ def create_and_poll( # # @overload retrieve(file_id, vector_store_id:, request_options: {}) # - # @param file_id [String] The ID of the file being retrieved. + # @param file_id [String] + # The ID of the file being retrieved. # - # @param vector_store_id [String] The ID of the vector store that the file belongs to. + # @param vector_store_id [String] + # The ID of the vector store that the file belongs to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -126,18 +138,22 @@ def retrieve(file_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileUpdateParams} for more details. - # # Update attributes on a vector store file. # # @overload update(file_id, vector_store_id:, attributes:, request_options: {}) # - # @param file_id [String] Path param: The ID of the file to update attributes. + # @param file_id [String] + # Path param: The ID of the file to update attributes. # - # @param vector_store_id [String] Path param: The ID of the vector store the file belongs to. + # @param vector_store_id [String] + # Path param: The ID of the vector store the file belongs to. # - # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] Body param: Set of 16 key-value pairs that can be attached to an object. This ca + # @param attributes [Hash{Symbol=>String, Float, Boolean}, nil] + # Body param: Set of 16 key-value pairs that can be attached to an object. This + # can be useful for storing additional information about the object in a + # structured format, and querying for objects via API or the dashboard. Keys are + # strings with a maximum length of 64 characters. Values are strings with a + # maximum length of 512 characters, booleans, or numbers. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -160,24 +176,35 @@ def update(file_id, params) ) end - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VectorStores::FileListParams} for more details. - # # Returns a list of vector store files. # # @overload list(vector_store_id, after: nil, before: nil, filter: nil, limit: nil, order: nil, request_options: {}) # - # @param vector_store_id [String] The ID of the vector store that the files belong to. + # @param vector_store_id [String] + # The ID of the vector store that the files belong to. # - # @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place + # @param after [String] + # A cursor for use in pagination. `after` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # ending with obj_foo, your subsequent call can include after=obj_foo in order to + # fetch the next page of the list. # - # @param before [String] A cursor for use in pagination. `before` is an object ID that defines your place + # @param before [String] + # A cursor for use in pagination. `before` is an object ID that defines your place + # in the list. For instance, if you make a list request and receive 100 objects, + # starting with obj_foo, your subsequent call can include before=obj_foo in order + # to fetch the previous page of the list. # - # @param filter [Symbol, OpenAI::Models::VectorStores::FileListParams::Filter] Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. + # @param filter [Symbol, OpenAI::Models::VectorStores::FileListParams::Filter] + # Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`. # - # @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1 + # @param limit [Integer] + # A limit on the number of objects to be returned. Limit can range between 1 and + # 100, and the default is 20. # - # @param order [Symbol, OpenAI::Models::VectorStores::FileListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord + # @param order [Symbol, OpenAI::Models::VectorStores::FileListParams::Order] + # Sort order by the `created_at` timestamp of the objects. `asc` for ascending + # order and `desc` for descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -200,14 +227,16 @@ def list(vector_store_id, params = {}) # Delete a vector store file. This will remove the file from the vector store but # the file itself will not be deleted. To delete the file, use the - # [delete file](https://platform.openai.com/docs/api-reference/files/delete) + # [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) # endpoint. # # @overload delete(file_id, vector_store_id:, request_options: {}) # - # @param file_id [String] The ID of the file to delete. + # @param file_id [String] + # The ID of the file to delete. # - # @param vector_store_id [String] The ID of the vector store that the file belongs to. + # @param vector_store_id [String] + # The ID of the vector store that the file belongs to. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -367,9 +396,11 @@ def upload_and_poll( # # @overload content(file_id, vector_store_id:, request_options: {}) # - # @param file_id [String] The ID of the file within the vector store. + # @param file_id [String] + # The ID of the file within the vector store. # - # @param vector_store_id [String] The ID of the vector store. + # @param vector_store_id [String] + # The ID of the vector store. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/openai/resources/videos.rb b/lib/openai/resources/videos.rb index 137cd9fd6..376cfbed8 100644 --- a/lib/openai/resources/videos.rb +++ b/lib/openai/resources/videos.rb @@ -7,9 +7,6 @@ module Resources class Videos # @deprecated The Sora API is scheduled to permanently shut down on September 24, 2026. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoCreateParams} for more details. - # # Create a new video generation job from a prompt and optional reference assets. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload @@ -18,15 +15,26 @@ class Videos # # @overload create(prompt:, input_reference: nil, model: nil, seconds: nil, size: nil, request_options: {}) # - # @param prompt [String] Text prompt that describes the video to generate. + # @param prompt [String] + # Text prompt that describes the video to generate. + # + # @param input_reference [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::ImageInputReferenceParam] + # Optional reference asset upload or reference object that guides generation. # - # @param input_reference [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::ImageInputReferenceParam] Optional reference asset upload or reference object that guides generation. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # - # @param model [String, Symbol, OpenAI::Models::VideoModel] The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults + # @param model [String, Symbol, OpenAI::Models::VideoModel] + # The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults + # to `sora-2`. # - # @param seconds [Symbol, OpenAI::Models::VideoSeconds] Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + # @param seconds [Symbol, OpenAI::Models::VideoSeconds] + # Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. # - # @param size [Symbol, OpenAI::Models::VideoSize] Output resolution formatted as width x height (allowed values: 720x1280, 1280x72 + # @param size [Symbol, OpenAI::Models::VideoSize] + # Output resolution formatted as width x height (allowed values: 720x1280, + # 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -52,7 +60,8 @@ def create(params) # # @overload retrieve(video_id, request_options: {}) # - # @param video_id [String] The identifier of the video to retrieve. + # @param video_id [String] + # The identifier of the video to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -71,18 +80,19 @@ def retrieve(video_id, params = {}) # @deprecated The Sora API is scheduled to permanently shut down on September 24, 2026. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoListParams} for more details. - # # List recently generated videos for the current project. # # @overload list(after: nil, limit: nil, order: nil, request_options: {}) # - # @param after [String] Identifier for the last item from the previous pagination request + # @param after [String] + # Identifier for the last item from the previous pagination request # - # @param limit [Integer] Number of items to retrieve + # @param limit [Integer] + # Number of items to retrieve # - # @param order [Symbol, OpenAI::Models::VideoListParams::Order] Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # @param order [Symbol, OpenAI::Models::VideoListParams::Order] + # Sort order of results by timestamp. Use `asc` for ascending order or `desc` for + # descending order. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -109,7 +119,8 @@ def list(params = {}) # # @overload delete(video_id, request_options: {}) # - # @param video_id [String] The identifier of the video to delete. + # @param video_id [String] + # The identifier of the video to delete. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -136,9 +147,15 @@ def delete(video_id, params = {}) # # @overload create_character(name:, video:, request_options: {}) # - # @param name [String] Display name for this API character. + # @param name [String] + # Display name for this API character. + # + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart] + # Video file used to create a character. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart] Video file used to create a character. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -166,9 +183,11 @@ def create_character(params) # # @overload download_content(video_id, variant: nil, request_options: {}) # - # @param video_id [String] The identifier of the video whose media to download. + # @param video_id [String] + # The identifier of the video whose media to download. # - # @param variant [Symbol, OpenAI::Models::VideoDownloadContentParams::Variant] Which downloadable asset to return. Defaults to the MP4 video. + # @param variant [Symbol, OpenAI::Models::VideoDownloadContentParams::Variant] + # Which downloadable asset to return. Defaults to the MP4 video. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -200,9 +219,15 @@ def download_content(video_id, params = {}) # # @overload edit(prompt:, video:, request_options: {}) # - # @param prompt [String] Text prompt that describes how to edit the source video. + # @param prompt [String] + # Text prompt that describes how to edit the source video. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoEditParams::Video::VideoReferenceInputParam] Reference to the completed video to edit. + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoEditParams::Video::VideoReferenceInputParam] + # Reference to the completed video to edit. + # + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -224,9 +249,6 @@ def edit(params) # @deprecated The Sora API is scheduled to permanently shut down on September 24, 2026. # - # Some parameter documentations has been truncated, see - # {OpenAI::Models::VideoExtendParams} for more details. - # # Create an extension of a completed video. # # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload @@ -235,11 +257,19 @@ def edit(params) # # @overload extend_(prompt:, seconds:, video:, request_options: {}) # - # @param prompt [String] Updated text prompt that directs the extension generation. + # @param prompt [String] + # Updated text prompt that directs the extension generation. + # + # @param seconds [Symbol, OpenAI::Models::VideoSeconds] + # Length of the newly generated extension segment in seconds (allowed values: 4, + # 8, 12, 16, 20). # - # @param seconds [Symbol, OpenAI::Models::VideoSeconds] Length of the newly generated extension segment in seconds (allowed values: 4, 8 + # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoExtendParams::Video::VideoReferenceInputParam] + # Reference to the completed video to extend. # - # @param video [Pathname, StringIO, IO, String, OpenAI::FilePart, OpenAI::Models::VideoExtendParams::Video::VideoReferenceInputParam] Reference to the completed video to extend. + # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload + # metadata. Use `OpenAI::FilePart` when you need to override the filename or + # content type. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -265,7 +295,8 @@ def extend_(params) # # @overload get_character(character_id, request_options: {}) # - # @param character_id [String] The identifier of the character to retrieve. + # @param character_id [String] + # The identifier of the character to retrieve. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -288,9 +319,11 @@ def get_character(character_id, params = {}) # # @overload remix(video_id, prompt:, request_options: {}) # - # @param video_id [String] The identifier of the completed video to remix. + # @param video_id [String] + # The identifier of the completed video to remix. # - # @param prompt [String] Updated text prompt that directs the remix generation. + # @param prompt [String] + # Updated text prompt that directs the remix generation. # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/openai/models/admin/organization/audit_log_list_params.rbi b/rbi/openai/models/admin/organization/audit_log_list_params.rbi index d8ed4cff8..51d5761ca 100644 --- a/rbi/openai/models/admin/organization/audit_log_list_params.rbi +++ b/rbi/openai/models/admin/organization/audit_log_list_params.rbi @@ -63,7 +63,7 @@ module OpenAI # Return only events with a `type` in one of these values. For example, # `project.created`. For all options, see the documentation for the - # [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). sig { returns(T.nilable(T::Array[OpenAI::Admin::Organization::AuditLogListParams::EventType::OrSymbol])) } attr_reader :event_types @@ -159,7 +159,7 @@ module OpenAI # Return only events with a `type` in one of these values. For example, # `project.created`. For all options, see the documentation for the - # [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). event_types: nil, # A limit on the number of objects to be returned. Limit can range between 1 and diff --git a/rbi/openai/models/admin/organization/project_create_params.rbi b/rbi/openai/models/admin/organization/project_create_params.rbi index ba15e008e..d06be1d49 100644 --- a/rbi/openai/models/admin/organization/project_create_params.rbi +++ b/rbi/openai/models/admin/organization/project_create_params.rbi @@ -29,7 +29,7 @@ module OpenAI # Create the project with the specified data residency region. Your organization # must have access to Data residency functionality in order to use. See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. Deprecated: # use `residency` instead. Do not provide both `geography` and `residency`. sig { returns(T.nilable(String)) } @@ -38,7 +38,7 @@ module OpenAI # Create the project with the specified residency configuration. Your organization # must have access to the requested residency configuration in order to use it. # See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. sig { returns(T.nilable(OpenAI::Admin::Organization::ProjectResidency::OrSymbol)) } attr_accessor :residency @@ -68,7 +68,7 @@ module OpenAI # Create the project with the specified data residency region. Your organization # must have access to Data residency functionality in order to use. See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. Deprecated: # use `residency` instead. Do not provide both `geography` and `residency`. geography: nil, @@ -76,7 +76,7 @@ module OpenAI # Create the project with the specified residency configuration. Your organization # must have access to the requested residency configuration in order to use it. # See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. residency: nil, diff --git a/rbi/openai/models/admin/organization/projects/project_api_key.rbi b/rbi/openai/models/admin/organization/projects/project_api_key.rbi index 4b7319775..5b7f113cf 100644 --- a/rbi/openai/models/admin/organization/projects/project_api_key.rbi +++ b/rbi/openai/models/admin/organization/projects/project_api_key.rbi @@ -54,6 +54,11 @@ module OpenAI sig { returns(String) } attr_accessor :redacted_value + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # Represents an individual API key in a project. sig do params( @@ -72,6 +77,8 @@ module OpenAI redacted_value: String, + expires_at: T.nilable(Integer), + object: Symbol ) .returns(T.attached_class) @@ -98,6 +105,10 @@ module OpenAI # The redacted value of the API key redacted_value:, + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + expires_at: nil, + # The object type, which is always `organization.project.api_key` object: :"organization.project.api_key" @@ -114,7 +125,8 @@ module OpenAI object: Symbol, owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Admin::Organization::Projects::ProjectAPIKey::OwnerProjectAccess::TaggedSymbol, - redacted_value: String + redacted_value: String, + expires_at: T.nilable(Integer) } ) end diff --git a/rbi/openai/models/admin/organization/projects/service_account_create_params.rbi b/rbi/openai/models/admin/organization/projects/service_account_create_params.rbi index 837a4c01b..b4fba3faf 100644 --- a/rbi/openai/models/admin/organization/projects/service_account_create_params.rbi +++ b/rbi/openai/models/admin/organization/projects/service_account_create_params.rbi @@ -32,6 +32,14 @@ module OpenAI sig { returns(T.nilable(T::Boolean)) } attr_accessor :create_service_account_only + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_in_seconds + sig do params( @@ -41,6 +49,8 @@ module OpenAI create_service_account_only: T.nilable(T::Boolean), + expires_in_seconds: T.nilable(Integer), + request_options: OpenAI::RequestOptions::OrHash ) .returns(T.attached_class) @@ -55,6 +65,13 @@ module OpenAI # Create the service account without default roles or an API key. create_service_account_only: nil, + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. + expires_in_seconds: nil, + request_options: {} ) end @@ -65,6 +82,7 @@ module OpenAI project_id: String, name: String, create_service_account_only: T.nilable(T::Boolean), + expires_in_seconds: T.nilable(Integer), request_options: OpenAI::RequestOptions } ) diff --git a/rbi/openai/models/admin/organization/projects/service_account_create_response.rbi b/rbi/openai/models/admin/organization/projects/service_account_create_response.rbi index 2c02e22c6..b0af45d10 100644 --- a/rbi/openai/models/admin/organization/projects/service_account_create_response.rbi +++ b/rbi/openai/models/admin/organization/projects/service_account_create_response.rbi @@ -130,6 +130,11 @@ module OpenAI sig { returns(String) } attr_accessor :value + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + sig do params( @@ -141,6 +146,8 @@ module OpenAI value: String, + expires_at: T.nilable(Integer), + object: Symbol ) .returns(T.attached_class) @@ -155,6 +162,10 @@ module OpenAI value:, + # The Unix timestamp (in seconds) when the API key expires, or null if it does not + # expire. + expires_at: nil, + # The object type, which is always `organization.project.service_account.api_key` object: :"organization.project.service_account.api_key" @@ -163,7 +174,14 @@ module OpenAI sig do override.returns( - {id: String, created_at: Integer, name: String, object: Symbol, value: String} + { + id: String, + created_at: Integer, + name: String, + object: Symbol, + value: String, + expires_at: T.nilable(Integer) + } ) end def to_hash diff --git a/rbi/openai/models/audio/speech_create_params.rbi b/rbi/openai/models/audio/speech_create_params.rbi index bfee5f4dc..c52ed44de 100644 --- a/rbi/openai/models/audio/speech_create_params.rbi +++ b/rbi/openai/models/audio/speech_create_params.rbi @@ -21,7 +21,8 @@ module OpenAI sig { returns(String) } attr_accessor :input - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. sig { returns(T.any(String, OpenAI::Audio::SpeechModel::OrSymbol)) } attr_accessor :model @@ -31,7 +32,7 @@ module OpenAI # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). sig { returns( T.any( @@ -105,7 +106,8 @@ module OpenAI # The text to generate audio for. The maximum length is 4096 characters. input:, - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. model:, @@ -114,7 +116,7 @@ module OpenAI # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). voice:, # Control the voice of your generated audio with additional instructions. Does not @@ -158,7 +160,8 @@ module OpenAI def to_hash end - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. module Model extend OpenAI::Internal::Type::Union @@ -176,7 +179,7 @@ module OpenAI # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). module Voice extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/audio/transcription_create_params.rbi b/rbi/openai/models/audio/transcription_create_params.rbi index 33b7d67ef..cc4b767d7 100644 --- a/rbi/openai/models/audio/transcription_create_params.rbi +++ b/rbi/openai/models/audio/transcription_create_params.rbi @@ -106,7 +106,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should match the audio language. This field is not supported when using # `gpt-4o-transcribe-diarize`. sig { returns(T.nilable(String)) } @@ -251,7 +251,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should match the audio language. This field is not supported when using # `gpt-4o-transcribe-diarize`. prompt: nil, diff --git a/rbi/openai/models/audio/transcription_stream_event.rbi b/rbi/openai/models/audio/transcription_stream_event.rbi index a5350f76d..8db887091 100644 --- a/rbi/openai/models/audio/transcription_stream_event.rbi +++ b/rbi/openai/models/audio/transcription_stream_event.rbi @@ -7,7 +7,7 @@ module OpenAI # Emitted when a diarized transcription returns a completed segment with speaker # information. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with `stream` set to `true` and `response_format` set to `diarized_json`. module TranscriptionStreamEvent extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/audio/transcription_text_delta_event.rbi b/rbi/openai/models/audio/transcription_text_delta_event.rbi index bbcd5d2d6..90e5d977e 100644 --- a/rbi/openai/models/audio/transcription_text_delta_event.rbi +++ b/rbi/openai/models/audio/transcription_text_delta_event.rbi @@ -23,7 +23,7 @@ module OpenAI attr_accessor :type # The log probabilities of the delta. Only included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. sig { returns(T.nilable(T::Array[OpenAI::Audio::TranscriptionTextDeltaEvent::Logprob])) } attr_reader :logprobs @@ -41,7 +41,7 @@ module OpenAI # Emitted when there is an additional text delta. This is also the first event # emitted when the transcription starts. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `Stream` parameter set to `true`. sig do params( @@ -62,7 +62,7 @@ module OpenAI delta:, # The log probabilities of the delta. Only included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. logprobs: nil, diff --git a/rbi/openai/models/audio/transcription_text_done_event.rbi b/rbi/openai/models/audio/transcription_text_done_event.rbi index ce1a5c3ed..6c1cc0a96 100644 --- a/rbi/openai/models/audio/transcription_text_done_event.rbi +++ b/rbi/openai/models/audio/transcription_text_done_event.rbi @@ -32,7 +32,7 @@ module OpenAI # The log probabilities of the individual tokens in the transcription. Only # included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. sig { returns(T.nilable(T::Array[OpenAI::Audio::TranscriptionTextDoneEvent::Logprob])) } attr_reader :logprobs @@ -49,7 +49,7 @@ module OpenAI # Emitted when the transcription is complete. Contains the complete transcription # text. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `Stream` parameter set to `true`. sig do params( @@ -77,7 +77,7 @@ module OpenAI # The log probabilities of the individual tokens in the transcription. Only # included if you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with the `include[]` parameter set to `logprobs`. logprobs: nil, diff --git a/rbi/openai/models/audio/transcription_text_segment_event.rbi b/rbi/openai/models/audio/transcription_text_segment_event.rbi index 6a595a0d9..ef9ca3e0a 100644 --- a/rbi/openai/models/audio/transcription_text_segment_event.rbi +++ b/rbi/openai/models/audio/transcription_text_segment_event.rbi @@ -40,7 +40,7 @@ module OpenAI # Emitted when a diarized transcription returns a completed segment with speaker # information. Only emitted when you - # [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) + # [create a transcription](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # with `stream` set to `true` and `response_format` set to `diarized_json`. sig do params( diff --git a/rbi/openai/models/audio/translation_create_params.rbi b/rbi/openai/models/audio/translation_create_params.rbi index 5c3f2fd61..5f5980dda 100644 --- a/rbi/openai/models/audio/translation_create_params.rbi +++ b/rbi/openai/models/audio/translation_create_params.rbi @@ -35,7 +35,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should be in English. sig { returns(T.nilable(String)) } attr_reader :prompt @@ -97,7 +97,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should be in English. prompt: nil, diff --git a/rbi/openai/models/batch.rbi b/rbi/openai/models/batch.rbi index 522c6f55c..23357eb9d 100644 --- a/rbi/openai/models/batch.rbi +++ b/rbi/openai/models/batch.rbi @@ -120,8 +120,8 @@ module OpenAI # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(String)) } attr_reader :model @@ -259,8 +259,8 @@ module OpenAI # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # The ID of the file containing the outputs of successfully executed requests. diff --git a/rbi/openai/models/batch_create_params.rbi b/rbi/openai/models/batch_create_params.rbi index c931375e6..dd74b5e5a 100644 --- a/rbi/openai/models/batch_create_params.rbi +++ b/rbi/openai/models/batch_create_params.rbi @@ -31,11 +31,12 @@ module OpenAI # The ID of an uploaded file that contains requests for the new batch. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your input file must be formatted as a - # [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 # requests, and can be up to 200 MB in size. sig { returns(String) } @@ -91,11 +92,12 @@ module OpenAI # The ID of an uploaded file that contains requests for the new batch. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your input file must be formatted as a - # [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 # requests, and can be up to 200 MB in size. input_file_id:, diff --git a/rbi/openai/models/batch_usage.rbi b/rbi/openai/models/batch_usage.rbi index 408d86431..33a78174b 100644 --- a/rbi/openai/models/batch_usage.rbi +++ b/rbi/openai/models/batch_usage.rbi @@ -99,7 +99,7 @@ module OpenAI end # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(Integer) } attr_accessor :cached_tokens @@ -114,7 +114,7 @@ module OpenAI def self.new( # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cached_tokens: ) diff --git a/rbi/openai/models/beta/assistant.rbi b/rbi/openai/models/beta/assistant.rbi index d739adba0..ce3ba42e5 100644 --- a/rbi/openai/models/beta/assistant.rbi +++ b/rbi/openai/models/beta/assistant.rbi @@ -41,10 +41,10 @@ module OpenAI attr_accessor :metadata # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. sig { returns(String) } attr_accessor :model @@ -63,14 +63,14 @@ module OpenAI attr_accessor :tools # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -178,10 +178,10 @@ module OpenAI metadata:, # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The name of the assistant. The maximum length is 256 characters. @@ -193,14 +193,14 @@ module OpenAI tools:, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -320,9 +320,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter`` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -338,9 +338,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter`` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -365,7 +365,7 @@ module OpenAI end # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. sig { returns(T.nilable(T::Array[String])) } @@ -384,7 +384,7 @@ module OpenAI def self.new( # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. diff --git a/rbi/openai/models/beta/assistant_create_params.rbi b/rbi/openai/models/beta/assistant_create_params.rbi index bc4dfafbc..5acb616ff 100644 --- a/rbi/openai/models/beta/assistant_create_params.rbi +++ b/rbi/openai/models/beta/assistant_create_params.rbi @@ -18,10 +18,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. sig { returns(T.any(String, OpenAI::ChatModel::OrSymbol)) } attr_accessor :model @@ -51,20 +51,20 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -187,10 +187,10 @@ module OpenAI def self.new( # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The description of the assistant. The maximum length is 512 characters. @@ -215,19 +215,19 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -299,10 +299,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union @@ -376,9 +376,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -394,9 +394,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -421,7 +421,7 @@ module OpenAI end # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. sig { returns(T.nilable(T::Array[String])) } @@ -431,7 +431,7 @@ module OpenAI attr_writer :vector_store_ids # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this assistant. There can be a maximum of 1 # vector store attached to the assistant. sig { @@ -463,13 +463,13 @@ module OpenAI def self.new( # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. vector_store_ids: nil, # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this assistant. There can be a maximum of 1 # vector store attached to the assistant. @@ -521,10 +521,10 @@ module OpenAI } attr_writer :chunking_strategy - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -560,10 +560,10 @@ module OpenAI # strategy. chunking_strategy: nil, - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. file_ids: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful diff --git a/rbi/openai/models/beta/assistant_response_format_option.rbi b/rbi/openai/models/beta/assistant_response_format_option.rbi index 631b5c7a5..938bfbd7c 100644 --- a/rbi/openai/models/beta/assistant_response_format_option.rbi +++ b/rbi/openai/models/beta/assistant_response_format_option.rbi @@ -6,14 +6,14 @@ module OpenAI module Beta # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. diff --git a/rbi/openai/models/beta/assistant_stream_event.rbi b/rbi/openai/models/beta/assistant_stream_event.rbi index 1babc3e07..3899b9114 100644 --- a/rbi/openai/models/beta/assistant_stream_event.rbi +++ b/rbi/openai/models/beta/assistant_stream_event.rbi @@ -23,7 +23,7 @@ module OpenAI # # We may add additional events over time, so we recommend handling unknown events # gracefully in your code. See the - # [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) + # [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) # to learn how to integrate the Assistants API with streaming. module AssistantStreamEvent extend OpenAI::Internal::Type::Union @@ -66,7 +66,7 @@ module OpenAI end # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Thread) } attr_reader :data @@ -84,7 +84,7 @@ module OpenAI attr_writer :enabled # Occurs when a new - # [thread](https://platform.openai.com/docs/api-reference/threads/object) is + # [thread](https://developers.openai.com/api/docs/assistants/migration) is # created. sig do params( @@ -100,7 +100,7 @@ module OpenAI def self.new( # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). data:, # Whether to enable input audio transcription. @@ -129,7 +129,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -140,7 +140,7 @@ module OpenAI attr_accessor :event # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. sig do params( @@ -153,7 +153,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.created" @@ -179,7 +179,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -189,7 +189,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `queued` status. sig do params( @@ -203,7 +203,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.queued" @@ -229,7 +229,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -239,7 +239,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to an `in_progress` status. sig do params( @@ -253,7 +253,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.in_progress" @@ -279,7 +279,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -289,7 +289,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `requires_action` status. sig do params( @@ -303,7 +303,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.requires_action" @@ -329,7 +329,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -339,7 +339,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is completed. sig do params( @@ -353,7 +353,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.completed" @@ -379,7 +379,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -389,7 +389,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # ends with status `incomplete`. sig do params( @@ -403,7 +403,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.incomplete" @@ -429,7 +429,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -439,7 +439,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # fails. sig do params( @@ -453,7 +453,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.failed" @@ -479,7 +479,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -489,7 +489,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `cancelling` status. sig do params( @@ -503,7 +503,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.cancelling" @@ -529,7 +529,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -539,7 +539,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is cancelled. sig do params( @@ -553,7 +553,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.cancelled" @@ -579,7 +579,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -589,7 +589,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # expires. sig do params( @@ -603,7 +603,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.expired" @@ -639,8 +639,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. sig do params( @@ -688,8 +688,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # moves to an `in_progress` state. + # [run step](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. sig do params( @@ -738,8 +738,8 @@ module OpenAI attr_accessor :event # Occurs when parts of a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # are being streamed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) are + # being streamed. sig do params( @@ -788,8 +788,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is completed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # completed. sig do params( @@ -837,8 +837,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # fails. + # [run step](https://developers.openai.com/api/docs/assistants/migration) fails. sig do params( @@ -886,8 +885,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is cancelled. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # cancelled. sig do params( @@ -935,8 +934,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # expires. + # [run step](https://developers.openai.com/api/docs/assistants/migration) expires. sig do params( @@ -974,7 +972,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -985,7 +983,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. sig do params( @@ -999,7 +997,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.created" @@ -1025,7 +1023,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -1036,8 +1034,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) moves - # to an `in_progress` state. + # [message](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. sig do params( @@ -1050,7 +1048,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.in_progress" @@ -1087,8 +1085,8 @@ module OpenAI attr_accessor :event # Occurs when parts of a - # [Message](https://platform.openai.com/docs/api-reference/messages/object) are - # being streamed. + # [Message](https://developers.openai.com/api/docs/assistants/migration) are being + # streamed. sig do params( @@ -1127,7 +1125,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -1138,7 +1136,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # completed. sig do params( @@ -1152,7 +1150,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.completed" @@ -1178,7 +1176,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -1189,7 +1187,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) ends + # [message](https://developers.openai.com/api/docs/assistants/migration) ends # before it is completed. sig do params( @@ -1203,7 +1201,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.incomplete" @@ -1238,8 +1236,8 @@ module OpenAI attr_accessor :event # Occurs when an - # [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. - # This can happen due to an internal server error or a timeout. + # [error](https://developers.openai.com/api/docs/guides/error-codes#api-errors) + # occurs. This can happen due to an internal server error or a timeout. sig do params( diff --git a/rbi/openai/models/beta/assistant_update_params.rbi b/rbi/openai/models/beta/assistant_update_params.rbi index 6900e1b6a..9babfed29 100644 --- a/rbi/openai/models/beta/assistant_update_params.rbi +++ b/rbi/openai/models/beta/assistant_update_params.rbi @@ -39,10 +39,10 @@ module OpenAI attr_accessor :metadata # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. sig { returns(T.nilable(T.any(String, OpenAI::Beta::AssistantUpdateParams::Model::OrSymbol))) } attr_reader :model @@ -57,20 +57,20 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -212,10 +212,10 @@ module OpenAI metadata: nil, # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model: nil, # The name of the assistant. The maximum length is 256 characters. @@ -225,19 +225,19 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -310,10 +310,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union @@ -464,9 +464,9 @@ module OpenAI end # Overrides the list of - # [file](https://platform.openai.com/docs/api-reference/files) IDs made available - # to the `code_interpreter` tool. There can be a maximum of 20 files associated - # with the tool. + # [file](https://developers.openai.com/api/reference/resources/files) IDs made + # available to the `code_interpreter` tool. There can be a maximum of 20 files + # associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -483,9 +483,9 @@ module OpenAI def self.new( # Overrides the list of - # [file](https://platform.openai.com/docs/api-reference/files) IDs made available - # to the `code_interpreter` tool. There can be a maximum of 20 files associated - # with the tool. + # [file](https://developers.openai.com/api/reference/resources/files) IDs made + # available to the `code_interpreter` tool. There can be a maximum of 20 files + # associated with the tool. file_ids: nil ) @@ -510,7 +510,7 @@ module OpenAI end # Overrides the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. sig { returns(T.nilable(T::Array[String])) } @@ -529,7 +529,7 @@ module OpenAI def self.new( # Overrides the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. diff --git a/rbi/openai/models/beta/beta_computer_tool.rbi b/rbi/openai/models/beta/beta_computer_tool.rbi index 73d5eacae..a4335c915 100644 --- a/rbi/openai/models/beta/beta_computer_tool.rbi +++ b/rbi/openai/models/beta/beta_computer_tool.rbi @@ -21,7 +21,7 @@ module OpenAI attr_accessor :type # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). sig do params( diff --git a/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi b/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi index 37a0d646b..de8d2ca36 100644 --- a/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi +++ b/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi @@ -33,7 +33,7 @@ module OpenAI attr_accessor :type # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). sig do params( diff --git a/rbi/openai/models/beta/beta_custom_tool.rbi b/rbi/openai/models/beta/beta_custom_tool.rbi index f407d8548..13e443a51 100644 --- a/rbi/openai/models/beta/beta_custom_tool.rbi +++ b/rbi/openai/models/beta/beta_custom_tool.rbi @@ -70,7 +70,7 @@ module OpenAI attr_writer :format_ # A custom tool that processes input using a specified format. Learn more about - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) sig do params( diff --git a/rbi/openai/models/beta/beta_file_search_tool.rbi b/rbi/openai/models/beta/beta_file_search_tool.rbi index d4800474a..95954ac0d 100644 --- a/rbi/openai/models/beta/beta_file_search_tool.rbi +++ b/rbi/openai/models/beta/beta_file_search_tool.rbi @@ -54,7 +54,7 @@ module OpenAI # A tool that searches for relevant content from uploaded files. Learn more about # the - # [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). sig do params( diff --git a/rbi/openai/models/beta/beta_function_tool.rbi b/rbi/openai/models/beta/beta_function_tool.rbi index 669507de3..92bff32fd 100644 --- a/rbi/openai/models/beta/beta_function_tool.rbi +++ b/rbi/openai/models/beta/beta_function_tool.rbi @@ -61,7 +61,7 @@ module OpenAI # Defines a function in your own code the model can choose to call. Learn more # about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig do params( diff --git a/rbi/openai/models/beta/beta_response.rbi b/rbi/openai/models/beta/beta_response.rbi index 98e138783..3a6ca08fa 100644 --- a/rbi/openai/models/beta/beta_response.rbi +++ b/rbi/openai/models/beta/beta_response.rbi @@ -58,8 +58,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(OpenAI::Beta::BetaResponse::Model::Variants) } attr_accessor :model @@ -101,17 +101,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns(T::Array[OpenAI::Beta::BetaTool::Variants]) } attr_accessor :tools @@ -125,7 +126,7 @@ module OpenAI attr_accessor :top_p # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -144,7 +145,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -165,13 +166,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Beta::BetaResponsePrompt)) } attr_reader :prompt @@ -197,7 +198,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -214,7 +215,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -230,7 +231,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Beta::BetaResponse::Reasoning)) } attr_reader :reasoning @@ -242,7 +243,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -253,13 +254,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -284,8 +287,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Beta::BetaResponseTextConfig)) } attr_reader :text @@ -320,7 +323,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -502,8 +505,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # An array of content items generated by the model. @@ -536,17 +539,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools:, @@ -558,7 +562,7 @@ module OpenAI top_p:, # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Unix timestamp (in seconds) of when this Response was completed. Only present @@ -571,7 +575,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -586,12 +590,12 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Prompt cache diagnostics requested for this response. @@ -599,7 +603,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # The prompt-caching options that were applied to the response. Supported for @@ -611,7 +615,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -626,7 +630,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -634,7 +638,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -644,13 +648,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -670,8 +676,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -696,7 +702,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # The object type of this resource - always set to `response`. @@ -839,8 +845,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -1925,7 +1931,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1972,7 +1978,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::Beta::BetaResponse::Reasoning::Effort::TaggedSymbol)) } attr_accessor :effort @@ -2004,7 +2010,7 @@ module OpenAI attr_accessor :summary # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig do params( @@ -2034,7 +2040,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. effort: nil, @@ -2100,7 +2106,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module Effort extend OpenAI::Internal::Type::Enum @@ -2193,13 +2199,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/beta/beta_response_compaction_item.rbi b/rbi/openai/models/beta/beta_response_compaction_item.rbi index f80f6c46b..c4c7cdb84 100644 --- a/rbi/openai/models/beta/beta_response_compaction_item.rbi +++ b/rbi/openai/models/beta/beta_response_compaction_item.rbi @@ -43,7 +43,7 @@ module OpenAI attr_writer :created_by # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). sig do params( diff --git a/rbi/openai/models/beta/beta_response_compaction_item_param.rbi b/rbi/openai/models/beta/beta_response_compaction_item_param.rbi index b6ba8f7cc..06167e3af 100644 --- a/rbi/openai/models/beta/beta_response_compaction_item_param.rbi +++ b/rbi/openai/models/beta/beta_response_compaction_item_param.rbi @@ -36,7 +36,7 @@ module OpenAI attr_writer :agent # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). sig do params( diff --git a/rbi/openai/models/beta/beta_response_computer_tool_call.rbi b/rbi/openai/models/beta/beta_response_computer_tool_call.rbi index c45a9a9d9..d5ec0cec4 100644 --- a/rbi/openai/models/beta/beta_response_computer_tool_call.rbi +++ b/rbi/openai/models/beta/beta_response_computer_tool_call.rbi @@ -126,7 +126,7 @@ module OpenAI attr_writer :agent # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) # for more information. sig do params( diff --git a/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi b/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi index 5b680a1a7..adaa5f4e9 100644 --- a/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi +++ b/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi @@ -45,7 +45,7 @@ module OpenAI attr_accessor :results # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) # for more information. sig do params( diff --git a/rbi/openai/models/beta/beta_response_format_text_config.rbi b/rbi/openai/models/beta/beta_response_format_text_config.rbi index 25ddc6023..68e982dff 100644 --- a/rbi/openai/models/beta/beta_response_format_text_config.rbi +++ b/rbi/openai/models/beta/beta_response_format_text_config.rbi @@ -11,7 +11,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi b/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi index cdba35f36..8f2cc9ac5 100644 --- a/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi +++ b/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi @@ -42,13 +42,13 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). sig { returns(T.nilable(T::Boolean)) } attr_accessor :strict # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). sig do params( @@ -82,7 +82,7 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). strict: nil, # The type of response format being defined. Always `json_schema`. diff --git a/rbi/openai/models/beta/beta_response_function_tool_call.rbi b/rbi/openai/models/beta/beta_response_function_tool_call.rbi index 256bae139..30c9f439d 100644 --- a/rbi/openai/models/beta/beta_response_function_tool_call.rbi +++ b/rbi/openai/models/beta/beta_response_function_tool_call.rbi @@ -82,7 +82,7 @@ module OpenAI attr_writer :status # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. sig do params( diff --git a/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi b/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi index 56e1981a7..7bd36ba74 100644 --- a/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +++ b/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi @@ -33,7 +33,7 @@ module OpenAI attr_writer :created_by # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. sig do params( diff --git a/rbi/openai/models/beta/beta_response_function_web_search.rbi b/rbi/openai/models/beta/beta_response_function_web_search.rbi index 58246b0a1..3d7b30b06 100644 --- a/rbi/openai/models/beta/beta_response_function_web_search.rbi +++ b/rbi/openai/models/beta/beta_response_function_web_search.rbi @@ -49,8 +49,8 @@ module OpenAI attr_writer :agent # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for - # more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) + # for more information. sig do params( diff --git a/rbi/openai/models/beta/beta_response_input_image.rbi b/rbi/openai/models/beta/beta_response_input_image.rbi index 52acb5656..481f692e9 100644 --- a/rbi/openai/models/beta/beta_response_input_image.rbi +++ b/rbi/openai/models/beta/beta_response_input_image.rbi @@ -46,7 +46,7 @@ module OpenAI attr_writer :prompt_cache_breakpoint # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision). + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). sig do params( diff --git a/rbi/openai/models/beta/beta_response_input_image_content.rbi b/rbi/openai/models/beta/beta_response_input_image_content.rbi index 5975b0ed2..9d741d89c 100644 --- a/rbi/openai/models/beta/beta_response_input_image_content.rbi +++ b/rbi/openai/models/beta/beta_response_input_image_content.rbi @@ -51,7 +51,7 @@ module OpenAI attr_writer :prompt_cache_breakpoint # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision) + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision) sig do params( diff --git a/rbi/openai/models/beta/beta_response_prompt.rbi b/rbi/openai/models/beta/beta_response_prompt.rbi index aec9bd339..72414d85e 100644 --- a/rbi/openai/models/beta/beta_response_prompt.rbi +++ b/rbi/openai/models/beta/beta_response_prompt.rbi @@ -45,7 +45,7 @@ module OpenAI attr_accessor :version # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig do params( diff --git a/rbi/openai/models/beta/beta_response_reasoning_item.rbi b/rbi/openai/models/beta/beta_response_reasoning_item.rbi index cdf2c0bf4..16e5133cf 100644 --- a/rbi/openai/models/beta/beta_response_reasoning_item.rbi +++ b/rbi/openai/models/beta/beta_response_reasoning_item.rbi @@ -64,7 +64,7 @@ module OpenAI # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). sig do params( diff --git a/rbi/openai/models/beta/beta_response_text_config.rbi b/rbi/openai/models/beta/beta_response_text_config.rbi index 33c997379..f95c08bde 100644 --- a/rbi/openai/models/beta/beta_response_text_config.rbi +++ b/rbi/openai/models/beta/beta_response_text_config.rbi @@ -20,7 +20,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -64,8 +64,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -85,7 +85,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/beta/beta_response_usage.rbi b/rbi/openai/models/beta/beta_response_usage.rbi index e8cd02199..30972fc60 100644 --- a/rbi/openai/models/beta/beta_response_usage.rbi +++ b/rbi/openai/models/beta/beta_response_usage.rbi @@ -106,7 +106,7 @@ module OpenAI attr_accessor :cache_write_tokens # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(Integer) } attr_accessor :cached_tokens @@ -126,7 +126,7 @@ module OpenAI cache_write_tokens:, # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cached_tokens: ) diff --git a/rbi/openai/models/beta/beta_responses_client_event.rbi b/rbi/openai/models/beta/beta_responses_client_event.rbi index c0b5f07f3..516a7d0eb 100644 --- a/rbi/openai/models/beta/beta_responses_client_event.rbi +++ b/rbi/openai/models/beta/beta_responses_client_event.rbi @@ -32,7 +32,7 @@ module OpenAI attr_accessor :type # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -74,11 +74,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants)) } attr_reader :input @@ -95,7 +95,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -118,8 +118,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(T.any(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::OrSymbol, String))) } @@ -156,13 +156,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Beta::BetaResponsePrompt)) } attr_reader :prompt @@ -171,7 +171,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -182,7 +182,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -200,7 +200,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -218,7 +218,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning)) } attr_reader :reasoning @@ -232,7 +232,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -243,13 +243,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -266,7 +268,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). sig { returns(T.nilable(T::Boolean)) } attr_accessor :store @@ -274,7 +276,7 @@ module OpenAI # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. sig { returns(T.nilable(T::Boolean)) } attr_accessor :stream @@ -312,8 +314,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Beta::BetaResponseTextConfig)) } attr_reader :text @@ -367,17 +369,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns( @@ -462,7 +465,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -587,7 +590,7 @@ module OpenAI def self.new( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. @@ -623,11 +626,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. @@ -639,7 +642,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -659,8 +662,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. @@ -674,17 +677,17 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -694,7 +697,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -703,7 +706,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -718,7 +721,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -726,7 +729,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -736,13 +739,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -758,14 +763,14 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # If set to true, the model response data will be streamed to the client as it is # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. stream: nil, @@ -788,8 +793,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a @@ -804,17 +809,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, @@ -843,7 +849,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # The type of the client event. Always `response.create`. @@ -1001,11 +1007,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -1020,8 +1026,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -1798,7 +1804,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -1916,7 +1922,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1977,7 +1983,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::OrSymbol)) @@ -2028,7 +2034,7 @@ module OpenAI attr_accessor :summary # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig do params( @@ -2060,7 +2066,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. effort: nil, @@ -2149,7 +2155,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module Effort extend OpenAI::Internal::Type::Enum @@ -2304,13 +2310,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/beta/beta_tool.rbi b/rbi/openai/models/beta/beta_tool.rbi index 4322b5994..8ff47c154 100644 --- a/rbi/openai/models/beta/beta_tool.rbi +++ b/rbi/openai/models/beta/beta_tool.rbi @@ -68,7 +68,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -136,7 +136,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). sig do params( @@ -192,7 +192,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -356,7 +356,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # diff --git a/rbi/openai/models/beta/beta_tool_choice_types.rbi b/rbi/openai/models/beta/beta_tool_choice_types.rbi index 31ac75ad3..b370aeefa 100644 --- a/rbi/openai/models/beta/beta_tool_choice_types.rbi +++ b/rbi/openai/models/beta/beta_tool_choice_types.rbi @@ -17,7 +17,7 @@ module OpenAI end # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -32,7 +32,7 @@ module OpenAI attr_accessor :type # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). sig do params( @@ -43,7 +43,7 @@ module OpenAI def self.new( # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -68,7 +68,7 @@ module OpenAI end # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # diff --git a/rbi/openai/models/beta/beta_web_search_preview_tool.rbi b/rbi/openai/models/beta/beta_web_search_preview_tool.rbi index 7f58a4296..251aaa2d0 100644 --- a/rbi/openai/models/beta/beta_web_search_preview_tool.rbi +++ b/rbi/openai/models/beta/beta_web_search_preview_tool.rbi @@ -47,7 +47,7 @@ module OpenAI # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig do params( diff --git a/rbi/openai/models/beta/beta_web_search_tool.rbi b/rbi/openai/models/beta/beta_web_search_tool.rbi index bbe1e8b8b..efb15d8be 100644 --- a/rbi/openai/models/beta/beta_web_search_tool.rbi +++ b/rbi/openai/models/beta/beta_web_search_tool.rbi @@ -52,7 +52,7 @@ module OpenAI attr_writer :user_location # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig do params( diff --git a/rbi/openai/models/beta/file_search_tool.rbi b/rbi/openai/models/beta/file_search_tool.rbi index 006d727f6..2610dd9b0 100644 --- a/rbi/openai/models/beta/file_search_tool.rbi +++ b/rbi/openai/models/beta/file_search_tool.rbi @@ -67,7 +67,7 @@ module OpenAI # # Note that the file search tool may output fewer than `max_num_results` results. # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig { returns(T.nilable(Integer)) } attr_reader :max_num_results @@ -79,7 +79,7 @@ module OpenAI # will use the `auto` ranker and a score_threshold of 0. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig { returns(T.nilable(OpenAI::Beta::FileSearchTool::FileSearch::RankingOptions)) } attr_reader :ranking_options @@ -105,7 +105,7 @@ module OpenAI # # Note that the file search tool may output fewer than `max_num_results` results. # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. max_num_results: nil, @@ -113,7 +113,7 @@ module OpenAI # will use the `auto` ranker and a score_threshold of 0. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. ranking_options: nil @@ -153,7 +153,7 @@ module OpenAI # will use the `auto` ranker and a score_threshold of 0. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig do params( diff --git a/rbi/openai/models/beta/message_stream_event.rbi b/rbi/openai/models/beta/message_stream_event.rbi index 76932a8e1..824e2693e 100644 --- a/rbi/openai/models/beta/message_stream_event.rbi +++ b/rbi/openai/models/beta/message_stream_event.rbi @@ -6,7 +6,7 @@ module OpenAI module Beta # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. module MessageStreamEvent extend OpenAI::Internal::Type::Union @@ -30,7 +30,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -41,7 +41,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # created. sig do params( @@ -55,7 +55,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.created" @@ -81,7 +81,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -92,8 +92,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) moves - # to an `in_progress` state. + # [message](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. sig do params( @@ -106,7 +106,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.in_progress" @@ -143,8 +143,8 @@ module OpenAI attr_accessor :event # Occurs when parts of a - # [Message](https://platform.openai.com/docs/api-reference/messages/object) are - # being streamed. + # [Message](https://developers.openai.com/api/docs/assistants/migration) are being + # streamed. sig do params( @@ -183,7 +183,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -194,7 +194,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) is + # [message](https://developers.openai.com/api/docs/assistants/migration) is # completed. sig do params( @@ -208,7 +208,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.completed" @@ -234,7 +234,7 @@ module OpenAI end # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Message) } attr_reader :data @@ -245,7 +245,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [message](https://platform.openai.com/docs/api-reference/messages/object) ends + # [message](https://developers.openai.com/api/docs/assistants/migration) ends # before it is completed. sig do params( @@ -259,7 +259,7 @@ module OpenAI def self.new( # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.message.incomplete" diff --git a/rbi/openai/models/beta/response_compact_params.rbi b/rbi/openai/models/beta/response_compact_params.rbi index 53754f02a..f6969cf81 100644 --- a/rbi/openai/models/beta/response_compact_params.rbi +++ b/rbi/openai/models/beta/response_compact_params.rbi @@ -20,8 +20,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(T.any(OpenAI::Beta::ResponseCompactParams::Model::OrSymbol, String))) } attr_accessor :model @@ -38,7 +38,7 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id @@ -54,7 +54,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Beta::ResponseCompactParams::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -73,17 +73,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. sig { returns(T.nilable(OpenAI::Beta::ResponseCompactParams::ServiceTier::OrSymbol)) } attr_accessor :service_tier @@ -123,8 +123,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Text, image, or file inputs to the model, used to generate a response @@ -138,7 +138,7 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, @@ -152,7 +152,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -164,17 +164,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. service_tier: nil, betas: nil, @@ -205,8 +205,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -474,7 +474,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -580,17 +580,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. module ServiceTier extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/beta/response_create_params.rbi b/rbi/openai/models/beta/response_create_params.rbi index a280907ea..f7adf78ec 100644 --- a/rbi/openai/models/beta/response_create_params.rbi +++ b/rbi/openai/models/beta/response_create_params.rbi @@ -18,7 +18,7 @@ module OpenAI end # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -58,11 +58,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::Input::Variants)) } attr_reader :input @@ -79,7 +79,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -102,8 +102,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(T.any(OpenAI::Beta::ResponseCreateParams::Model::OrSymbol, String))) } attr_reader :model @@ -130,13 +130,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Beta::BetaResponsePrompt)) } attr_reader :prompt @@ -145,7 +145,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -156,7 +156,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -169,7 +169,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -185,7 +185,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning)) } attr_reader :reasoning @@ -197,7 +197,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -208,13 +208,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -231,7 +233,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). sig { returns(T.nilable(T::Boolean)) } attr_accessor :store @@ -252,8 +254,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Beta::BetaResponseTextConfig)) } attr_reader :text @@ -307,17 +309,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns( @@ -402,7 +405,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -518,7 +521,7 @@ module OpenAI def self.new( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. @@ -554,11 +557,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. @@ -570,7 +573,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -590,8 +593,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. @@ -605,17 +608,17 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -625,7 +628,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -634,7 +637,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -649,7 +652,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -657,7 +660,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -667,13 +670,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -689,7 +694,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Options for streaming responses. Only set this when you set `stream: true`. @@ -704,8 +709,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a @@ -720,17 +725,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, @@ -759,7 +765,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, betas: nil, @@ -904,11 +910,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -923,8 +929,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -1452,7 +1458,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -1545,7 +1551,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1595,7 +1601,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::Effort::OrSymbol)) } attr_accessor :effort @@ -1627,7 +1633,7 @@ module OpenAI attr_accessor :summary # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig do params( @@ -1657,7 +1663,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. effort: nil, @@ -1723,7 +1729,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module Effort extend OpenAI::Internal::Type::Enum @@ -1822,13 +1828,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/beta/responses/input_token_count_params.rbi b/rbi/openai/models/beta/responses/input_token_count_params.rbi index 623a30c89..189047267 100644 --- a/rbi/openai/models/beta/responses/input_token_count_params.rbi +++ b/rbi/openai/models/beta/responses/input_token_count_params.rbi @@ -40,8 +40,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(String)) } attr_accessor :model @@ -65,13 +65,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Beta::Responses::InputTokenCountParams::Reasoning)) } attr_reader :reasoning @@ -81,8 +81,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Beta::Responses::InputTokenCountParams::Text)) } attr_reader :text @@ -242,8 +242,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Whether to allow the model to run tool calls in parallel. @@ -256,19 +256,19 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Controls which tool the model should use, if any. @@ -425,7 +425,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::Beta::Responses::InputTokenCountParams::Reasoning::Effort::OrSymbol)) } attr_accessor :effort @@ -466,7 +466,7 @@ module OpenAI attr_accessor :summary # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig do params( @@ -498,7 +498,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. effort: nil, @@ -578,7 +578,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module Effort extend OpenAI::Internal::Type::Enum @@ -713,7 +713,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -757,8 +757,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -778,7 +778,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/beta/run_step_stream_event.rbi b/rbi/openai/models/beta/run_step_stream_event.rbi index f8e8cc8c3..8d2d21e4e 100644 --- a/rbi/openai/models/beta/run_step_stream_event.rbi +++ b/rbi/openai/models/beta/run_step_stream_event.rbi @@ -6,8 +6,8 @@ module OpenAI module Beta # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. module RunStepStreamEvent extend OpenAI::Internal::Type::Union @@ -42,8 +42,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is created. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # created. sig do params( @@ -91,8 +91,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # moves to an `in_progress` state. + # [run step](https://developers.openai.com/api/docs/assistants/migration) moves to + # an `in_progress` state. sig do params( @@ -141,8 +141,8 @@ module OpenAI attr_accessor :event # Occurs when parts of a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # are being streamed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) are + # being streamed. sig do params( @@ -191,8 +191,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is completed. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # completed. sig do params( @@ -240,8 +240,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # fails. + # [run step](https://developers.openai.com/api/docs/assistants/migration) fails. sig do params( @@ -289,8 +288,8 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # is cancelled. + # [run step](https://developers.openai.com/api/docs/assistants/migration) is + # cancelled. sig do params( @@ -338,8 +337,7 @@ module OpenAI attr_accessor :event # Occurs when a - # [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) - # expires. + # [run step](https://developers.openai.com/api/docs/assistants/migration) expires. sig do params( diff --git a/rbi/openai/models/beta/run_stream_event.rbi b/rbi/openai/models/beta/run_stream_event.rbi index a2e6523b9..ccca694d2 100644 --- a/rbi/openai/models/beta/run_stream_event.rbi +++ b/rbi/openai/models/beta/run_stream_event.rbi @@ -6,7 +6,7 @@ module OpenAI module Beta # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. module RunStreamEvent extend OpenAI::Internal::Type::Union @@ -34,7 +34,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -45,7 +45,7 @@ module OpenAI attr_accessor :event # Occurs when a new - # [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + # [run](https://developers.openai.com/api/docs/assistants/migration) is created. sig do params( @@ -58,7 +58,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.created" @@ -84,7 +84,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -94,7 +94,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `queued` status. sig do params( @@ -108,7 +108,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.queued" @@ -134,7 +134,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -144,7 +144,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to an `in_progress` status. sig do params( @@ -158,7 +158,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.in_progress" @@ -184,7 +184,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -194,7 +194,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `requires_action` status. sig do params( @@ -208,7 +208,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.requires_action" @@ -234,7 +234,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -244,7 +244,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is completed. sig do params( @@ -258,7 +258,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.completed" @@ -284,7 +284,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -294,7 +294,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # ends with status `incomplete`. sig do params( @@ -308,7 +308,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.incomplete" @@ -334,7 +334,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -344,7 +344,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # fails. sig do params( @@ -358,7 +358,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.failed" @@ -384,7 +384,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -394,7 +394,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # moves to a `cancelling` status. sig do params( @@ -408,7 +408,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.cancelling" @@ -434,7 +434,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -444,7 +444,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # is cancelled. sig do params( @@ -458,7 +458,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.cancelled" @@ -484,7 +484,7 @@ module OpenAI end # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Threads::Run) } attr_reader :data @@ -494,7 +494,7 @@ module OpenAI sig { returns(Symbol) } attr_accessor :event - # Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) + # Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) # expires. sig do params( @@ -508,7 +508,7 @@ module OpenAI def self.new( # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). data:, event: :"thread.run.expired" diff --git a/rbi/openai/models/beta/thread.rbi b/rbi/openai/models/beta/thread.rbi index da04b918a..789edb2d3 100644 --- a/rbi/openai/models/beta/thread.rbi +++ b/rbi/openai/models/beta/thread.rbi @@ -46,7 +46,7 @@ module OpenAI attr_writer :tool_resources # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). sig do params( @@ -164,9 +164,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -182,9 +182,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -209,7 +209,7 @@ module OpenAI end # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. sig { returns(T.nilable(T::Array[String])) } @@ -228,7 +228,7 @@ module OpenAI def self.new( # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. diff --git a/rbi/openai/models/beta/thread_create_and_run_params.rbi b/rbi/openai/models/beta/thread_create_and_run_params.rbi index 39e20a466..bad0e678a 100644 --- a/rbi/openai/models/beta/thread_create_and_run_params.rbi +++ b/rbi/openai/models/beta/thread_create_and_run_params.rbi @@ -18,8 +18,8 @@ module OpenAI end # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. sig { returns(String) } attr_accessor :assistant_id @@ -53,15 +53,16 @@ module OpenAI sig { returns(T.nilable(T::Hash[Symbol, String])) } attr_accessor :metadata - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. sig { returns(T.nilable(T.any(String, OpenAI::ChatModel::OrSymbol))) } attr_accessor :model # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. sig { returns(T.nilable(T::Boolean)) } attr_reader :parallel_tool_calls @@ -70,14 +71,14 @@ module OpenAI attr_writer :parallel_tool_calls # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -230,8 +231,8 @@ module OpenAI def self.new( # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # Override the default system message of the assistant. This is useful for @@ -260,26 +261,27 @@ module OpenAI # a maximum length of 512 characters. metadata: nil, - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. model: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -374,10 +376,11 @@ module OpenAI def to_hash end - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. module Model extend OpenAI::Internal::Type::Union @@ -397,8 +400,9 @@ module OpenAI ) end - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. sig { returns(T.nilable(T::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message])) } attr_reader :messages @@ -442,8 +446,9 @@ module OpenAI end def self.new( - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. messages: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -820,9 +825,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -838,9 +843,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -865,7 +870,7 @@ module OpenAI end # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. sig { returns(T.nilable(T::Array[String])) } @@ -875,7 +880,7 @@ module OpenAI attr_writer :vector_store_ids # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. sig { @@ -911,13 +916,13 @@ module OpenAI def self.new( # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. vector_store_ids: nil, # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. @@ -971,10 +976,10 @@ module OpenAI } attr_writer :chunking_strategy - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -1010,10 +1015,10 @@ module OpenAI # strategy. chunking_strategy: nil, - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. file_ids: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -1282,9 +1287,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -1300,9 +1305,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -1327,7 +1332,7 @@ module OpenAI end # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. sig { returns(T.nilable(T::Array[String])) } @@ -1346,7 +1351,7 @@ module OpenAI def self.new( # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this assistant. There can be a maximum of 1 vector store attached to # the assistant. diff --git a/rbi/openai/models/beta/thread_create_params.rbi b/rbi/openai/models/beta/thread_create_params.rbi index 1c1ee8cb1..777ce829d 100644 --- a/rbi/openai/models/beta/thread_create_params.rbi +++ b/rbi/openai/models/beta/thread_create_params.rbi @@ -17,8 +17,9 @@ module OpenAI ) end - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. sig { returns(T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::Message])) } attr_reader :messages @@ -59,8 +60,9 @@ module OpenAI end def self.new( - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. messages: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -421,9 +423,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -439,9 +441,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -466,7 +468,7 @@ module OpenAI end # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. sig { returns(T.nilable(T::Array[String])) } @@ -476,7 +478,7 @@ module OpenAI attr_writer :vector_store_ids # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. sig { @@ -508,13 +510,13 @@ module OpenAI def self.new( # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. vector_store_ids: nil, # A helper to create a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # with file_ids and attach it to this thread. There can be a maximum of 1 vector # store attached to the thread. @@ -566,10 +568,10 @@ module OpenAI } attr_writer :chunking_strategy - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -605,10 +607,10 @@ module OpenAI # strategy. chunking_strategy: nil, - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to - # add to the vector store. For vector stores created before Nov 2025, there can be - # a maximum of 10,000 files in a vector store. For vector stores created starting - # in Nov 2025, the limit is 100,000,000 files. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs to add to the vector store. For vector stores created before Nov 2025, there + # can be a maximum of 10,000 files in a vector store. For vector stores created + # starting in Nov 2025, the limit is 100,000,000 files. file_ids: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful diff --git a/rbi/openai/models/beta/thread_stream_event.rbi b/rbi/openai/models/beta/thread_stream_event.rbi index a029d94d1..15fdda9c1 100644 --- a/rbi/openai/models/beta/thread_stream_event.rbi +++ b/rbi/openai/models/beta/thread_stream_event.rbi @@ -15,7 +15,7 @@ module OpenAI end # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). sig { returns(OpenAI::Beta::Thread) } attr_reader :data @@ -33,7 +33,7 @@ module OpenAI attr_writer :enabled # Occurs when a new - # [thread](https://platform.openai.com/docs/api-reference/threads/object) is + # [thread](https://developers.openai.com/api/docs/assistants/migration) is # created. sig do params( @@ -49,7 +49,7 @@ module OpenAI def self.new( # Represents a thread that contains - # [messages](https://platform.openai.com/docs/api-reference/messages). + # [messages](https://developers.openai.com/api/docs/assistants/migration). data:, # Whether to enable input audio transcription. diff --git a/rbi/openai/models/beta/thread_update_params.rbi b/rbi/openai/models/beta/thread_update_params.rbi index 4d0ff8c60..91ee20b11 100644 --- a/rbi/openai/models/beta/thread_update_params.rbi +++ b/rbi/openai/models/beta/thread_update_params.rbi @@ -149,9 +149,9 @@ module OpenAI ) end - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -167,9 +167,9 @@ module OpenAI end def self.new( - # A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made - # available to the `code_interpreter` tool. There can be a maximum of 20 files - # associated with the tool. + # A list of [file](https://developers.openai.com/api/reference/resources/files) + # IDs made available to the `code_interpreter` tool. There can be a maximum of 20 + # files associated with the tool. file_ids: nil ) @@ -194,7 +194,7 @@ module OpenAI end # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. sig { returns(T.nilable(T::Array[String])) } @@ -213,7 +213,7 @@ module OpenAI def self.new( # The - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) # attached to this thread. There can be a maximum of 1 vector store attached to # the thread. diff --git a/rbi/openai/models/beta/threads/image_file.rbi b/rbi/openai/models/beta/threads/image_file.rbi index dfa1aa7b6..eb2fc6dee 100644 --- a/rbi/openai/models/beta/threads/image_file.rbi +++ b/rbi/openai/models/beta/threads/image_file.rbi @@ -16,9 +16,9 @@ module OpenAI ) end - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. sig { returns(String) } attr_accessor :file_id @@ -41,9 +41,9 @@ module OpenAI end def self.new( - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. file_id:, # Specifies the detail level of the image if specified by the user. `low` uses diff --git a/rbi/openai/models/beta/threads/image_file_content_block.rbi b/rbi/openai/models/beta/threads/image_file_content_block.rbi index 496b60ddb..7b48e7e65 100644 --- a/rbi/openai/models/beta/threads/image_file_content_block.rbi +++ b/rbi/openai/models/beta/threads/image_file_content_block.rbi @@ -26,8 +26,9 @@ module OpenAI sig { returns(Symbol) } attr_accessor :type - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. sig do params( diff --git a/rbi/openai/models/beta/threads/image_file_delta.rbi b/rbi/openai/models/beta/threads/image_file_delta.rbi index 06eca6a0b..bce801ecd 100644 --- a/rbi/openai/models/beta/threads/image_file_delta.rbi +++ b/rbi/openai/models/beta/threads/image_file_delta.rbi @@ -24,9 +24,9 @@ module OpenAI sig { params(detail: OpenAI::Beta::Threads::ImageFileDelta::Detail::OrSymbol).void } attr_writer :detail - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. sig { returns(T.nilable(String)) } attr_reader :file_id @@ -48,9 +48,9 @@ module OpenAI # fewer tokens, you can opt in to high resolution using `high`. detail: nil, - # The [File](https://platform.openai.com/docs/api-reference/files) ID of the image - # in the message content. Set `purpose="vision"` when uploading the File if you - # need to later display the file content. + # The [File](https://developers.openai.com/api/reference/resources/files) ID of + # the image in the message content. Set `purpose="vision"` when uploading the File + # if you need to later display the file content. file_id: nil ) diff --git a/rbi/openai/models/beta/threads/image_file_delta_block.rbi b/rbi/openai/models/beta/threads/image_file_delta_block.rbi index 1d89a42d4..2f6a17972 100644 --- a/rbi/openai/models/beta/threads/image_file_delta_block.rbi +++ b/rbi/openai/models/beta/threads/image_file_delta_block.rbi @@ -30,8 +30,9 @@ module OpenAI sig { params(image_file: OpenAI::Beta::Threads::ImageFileDelta::OrHash).void } attr_writer :image_file - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. sig do params( diff --git a/rbi/openai/models/beta/threads/message.rbi b/rbi/openai/models/beta/threads/message.rbi index 12fae70d6..c309b2b03 100644 --- a/rbi/openai/models/beta/threads/message.rbi +++ b/rbi/openai/models/beta/threads/message.rbi @@ -21,7 +21,7 @@ module OpenAI attr_accessor :id # If applicable, the ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) that + # [assistant](https://developers.openai.com/api/docs/assistants/migration) that # authored this message. sig { returns(T.nilable(String)) } attr_accessor :assistant_id @@ -70,7 +70,7 @@ module OpenAI sig { returns(OpenAI::Beta::Threads::Message::Role::TaggedSymbol) } attr_accessor :role - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) # associated with the creation of this message. Value is `null` when messages are # created manually using the create message or create thread endpoints. sig { returns(T.nilable(String)) } @@ -81,13 +81,13 @@ module OpenAI sig { returns(OpenAI::Beta::Threads::Message::Status::TaggedSymbol) } attr_accessor :status - # The [thread](https://platform.openai.com/docs/api-reference/threads) ID that - # this message belongs to. + # The [thread](https://developers.openai.com/api/docs/assistants/migration) ID + # that this message belongs to. sig { returns(String) } attr_accessor :thread_id # Represents a message within a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig do params( @@ -134,7 +134,7 @@ module OpenAI id:, # If applicable, the ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) that + # [assistant](https://developers.openai.com/api/docs/assistants/migration) that # authored this message. assistant_id:, @@ -167,7 +167,7 @@ module OpenAI # The entity that produced the message. One of `user` or `assistant`. role:, - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) # associated with the creation of this message. Value is `null` when messages are # created manually using the create message or create thread endpoints. run_id:, @@ -176,8 +176,8 @@ module OpenAI # `completed`. status:, - # The [thread](https://platform.openai.com/docs/api-reference/threads) ID that - # this message belongs to. + # The [thread](https://developers.openai.com/api/docs/assistants/migration) ID + # that this message belongs to. thread_id:, # The object type, which is always `thread.message`. diff --git a/rbi/openai/models/beta/threads/message_content.rbi b/rbi/openai/models/beta/threads/message_content.rbi index 4084b800e..b8fe95528 100644 --- a/rbi/openai/models/beta/threads/message_content.rbi +++ b/rbi/openai/models/beta/threads/message_content.rbi @@ -7,8 +7,9 @@ module OpenAI module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContent extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/beta/threads/message_content_delta.rbi b/rbi/openai/models/beta/threads/message_content_delta.rbi index 3ebdd3574..e4b38f73f 100644 --- a/rbi/openai/models/beta/threads/message_content_delta.rbi +++ b/rbi/openai/models/beta/threads/message_content_delta.rbi @@ -7,8 +7,9 @@ module OpenAI module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContentDelta extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/beta/threads/message_content_part_param.rbi b/rbi/openai/models/beta/threads/message_content_part_param.rbi index 67a30b19d..66c121aa7 100644 --- a/rbi/openai/models/beta/threads/message_content_part_param.rbi +++ b/rbi/openai/models/beta/threads/message_content_part_param.rbi @@ -7,8 +7,9 @@ module OpenAI module Threads - # References an image [File](https://platform.openai.com/docs/api-reference/files) - # in the content of a message. + # References an image + # [File](https://developers.openai.com/api/reference/resources/files) in the + # content of a message. module MessageContentPartParam extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi b/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi index f75f3c923..95f1aa53b 100644 --- a/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi +++ b/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi @@ -18,7 +18,7 @@ module OpenAI # The ID of the tool call. This ID must be referenced when you submit the tool # outputs in using the - # [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + # [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) # endpoint. sig { returns(String) } attr_accessor :id @@ -51,7 +51,7 @@ module OpenAI # The ID of the tool call. This ID must be referenced when you submit the tool # outputs in using the - # [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) + # [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) # endpoint. id:, diff --git a/rbi/openai/models/beta/threads/run.rbi b/rbi/openai/models/beta/threads/run.rbi index 195cc5c44..d25ac84d1 100644 --- a/rbi/openai/models/beta/threads/run.rbi +++ b/rbi/openai/models/beta/threads/run.rbi @@ -21,8 +21,8 @@ module OpenAI attr_accessor :id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # execution of this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for execution of this run. sig { returns(String) } attr_accessor :assistant_id @@ -55,8 +55,8 @@ module OpenAI attr_writer :incomplete_details # The instructions that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. sig { returns(String) } attr_accessor :instructions @@ -87,8 +87,8 @@ module OpenAI attr_accessor :metadata # The model that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. sig { returns(String) } attr_accessor :model @@ -97,7 +97,7 @@ module OpenAI attr_accessor :object # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. sig { returns(T::Boolean) } attr_accessor :parallel_tool_calls @@ -111,14 +111,14 @@ module OpenAI attr_writer :required_action # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -143,8 +143,9 @@ module OpenAI sig { returns(OpenAI::Beta::Threads::RunStatus::TaggedSymbol) } attr_accessor :status - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was executed on as a part of this run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # executed on as a part of this run. sig { returns(String) } attr_accessor :thread_id @@ -159,8 +160,8 @@ module OpenAI attr_accessor :tool_choice # The list of tools that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. sig { returns(T::Array[OpenAI::Beta::AssistantTool::Variants]) } attr_accessor :tools @@ -189,7 +190,7 @@ module OpenAI attr_accessor :top_p # Represents an execution run on a - # [thread](https://platform.openai.com/docs/api-reference/threads). + # [thread](https://developers.openai.com/api/docs/assistants/migration). sig do params( @@ -273,8 +274,8 @@ module OpenAI id:, # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # execution of this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for execution of this run. assistant_id:, # The Unix timestamp (in seconds) for when the run was cancelled. @@ -297,8 +298,8 @@ module OpenAI incomplete_details:, # The instructions that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. instructions:, # The last error associated with this run. Will be `null` if there are no errors. @@ -321,12 +322,12 @@ module OpenAI metadata:, # The model that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. model:, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls:, @@ -335,14 +336,14 @@ module OpenAI required_action:, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -364,8 +365,9 @@ module OpenAI # `incomplete`, or `expired`. status:, - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was executed on as a part of this run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # executed on as a part of this run. thread_id:, # Controls which (if any) tool is called by the model. `none` means the model will @@ -378,8 +380,8 @@ module OpenAI tool_choice:, # The list of tools that the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - # this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) used + # for this run. tools:, # Controls for how a thread will be truncated prior to the run. Use this to diff --git a/rbi/openai/models/beta/threads/run_create_params.rbi b/rbi/openai/models/beta/threads/run_create_params.rbi index bac6be916..5ca22e61a 100644 --- a/rbi/openai/models/beta/threads/run_create_params.rbi +++ b/rbi/openai/models/beta/threads/run_create_params.rbi @@ -23,8 +23,8 @@ module OpenAI attr_accessor :thread_id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. sig { returns(String) } attr_accessor :assistant_id @@ -33,7 +33,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig { returns(T.nilable(T::Array[OpenAI::Beta::Threads::Runs::RunStepInclude::OrSymbol])) } attr_reader :include @@ -52,8 +52,8 @@ module OpenAI attr_accessor :additional_messages # Overrides the - # [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - # of the assistant. This is useful for modifying the behavior on a per-run basis. + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. sig { returns(T.nilable(String)) } attr_accessor :instructions @@ -82,15 +82,16 @@ module OpenAI sig { returns(T.nilable(T::Hash[Symbol, String])) } attr_accessor :metadata - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. sig { returns(T.nilable(T.any(String, OpenAI::ChatModel::OrSymbol))) } attr_accessor :model # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. sig { returns(T.nilable(T::Boolean)) } attr_reader :parallel_tool_calls @@ -102,20 +103,20 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -265,8 +266,8 @@ module OpenAI thread_id:, # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # A list of additional fields to include in the response. Currently the only @@ -274,7 +275,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, @@ -287,8 +288,8 @@ module OpenAI additional_messages: nil, # Overrides the - # [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - # of the assistant. This is useful for modifying the behavior on a per-run basis. + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. instructions: nil, # The maximum number of completion tokens that may be used over the course of the @@ -313,14 +314,15 @@ module OpenAI # a maximum length of 512 characters. metadata: nil, - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. model: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, @@ -328,19 +330,19 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -712,10 +714,11 @@ module OpenAI end end - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. module Model extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi b/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi index 710023e0f..193affbef 100644 --- a/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi +++ b/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi @@ -72,8 +72,8 @@ module OpenAI ) end - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. sig { returns(T.nilable(String)) } attr_reader :file_id @@ -89,8 +89,8 @@ module OpenAI end def self.new( - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. file_id: nil ) diff --git a/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi b/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi index ff6468b06..285744dd1 100644 --- a/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi +++ b/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi @@ -260,8 +260,8 @@ module OpenAI ) end - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. sig { returns(String) } attr_accessor :file_id @@ -274,8 +274,8 @@ module OpenAI end def self.new( - # The [file](https://platform.openai.com/docs/api-reference/files) ID of the - # image. + # The [file](https://developers.openai.com/api/reference/resources/files) ID of + # the image. file_id: ) diff --git a/rbi/openai/models/beta/threads/runs/function_tool_call.rbi b/rbi/openai/models/beta/threads/runs/function_tool_call.rbi index dd8fe137e..a7b4975a5 100644 --- a/rbi/openai/models/beta/threads/runs/function_tool_call.rbi +++ b/rbi/openai/models/beta/threads/runs/function_tool_call.rbi @@ -85,8 +85,7 @@ module OpenAI attr_accessor :name # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. sig { returns(T.nilable(String)) } attr_accessor :output @@ -111,8 +110,7 @@ module OpenAI name:, # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. output: ) diff --git a/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi b/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi index 163b85600..ad29735ec 100644 --- a/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi +++ b/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi @@ -108,8 +108,7 @@ module OpenAI attr_writer :name # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. sig { returns(T.nilable(String)) } attr_accessor :output @@ -134,8 +133,7 @@ module OpenAI name: nil, # The output of the function. This will be `null` if the outputs have not been - # [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) - # yet. + # [submitted](https://developers.openai.com/api/docs/assistants/migration) yet. output: nil ) diff --git a/rbi/openai/models/beta/threads/runs/run_step.rbi b/rbi/openai/models/beta/threads/runs/run_step.rbi index 785fcca06..b7973eddf 100644 --- a/rbi/openai/models/beta/threads/runs/run_step.rbi +++ b/rbi/openai/models/beta/threads/runs/run_step.rbi @@ -25,7 +25,7 @@ module OpenAI attr_accessor :id # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) + # [assistant](https://developers.openai.com/api/docs/assistants/migration) # associated with the run step. sig { returns(String) } attr_accessor :assistant_id @@ -72,8 +72,8 @@ module OpenAI sig { returns(Symbol) } attr_accessor :object - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that - # this run step is a part of. + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + # that this run step is a part of. sig { returns(String) } attr_accessor :run_id @@ -86,8 +86,9 @@ module OpenAI sig { returns(OpenAI::Beta::Threads::Runs::RunStep::StepDetails::Variants) } attr_accessor :step_details - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. sig { returns(String) } attr_accessor :thread_id @@ -150,7 +151,7 @@ module OpenAI id:, # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) + # [assistant](https://developers.openai.com/api/docs/assistants/migration) # associated with the run step. assistant_id:, @@ -182,8 +183,8 @@ module OpenAI # a maximum length of 512 characters. metadata:, - # The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that - # this run step is a part of. + # The ID of the [run](https://developers.openai.com/api/docs/assistants/migration) + # that this run step is a part of. run_id:, # The status of the run step, which can be either `in_progress`, `cancelled`, @@ -193,8 +194,9 @@ module OpenAI # The details of the run step. step_details:, - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. thread_id:, # The type of run step, which can be either `message_creation` or `tool_calls`. diff --git a/rbi/openai/models/beta/threads/runs/step_list_params.rbi b/rbi/openai/models/beta/threads/runs/step_list_params.rbi index 332a4c0fb..6a916bb61 100644 --- a/rbi/openai/models/beta/threads/runs/step_list_params.rbi +++ b/rbi/openai/models/beta/threads/runs/step_list_params.rbi @@ -52,7 +52,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig { returns(T.nilable(T::Array[OpenAI::Beta::Threads::Runs::RunStepInclude::OrSymbol])) } attr_reader :include @@ -120,7 +120,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, diff --git a/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi b/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi index 1f7aa95d9..b80890e43 100644 --- a/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi +++ b/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi @@ -35,7 +35,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. sig { returns(T.nilable(T::Array[OpenAI::Beta::Threads::Runs::RunStepInclude::OrSymbol])) } attr_reader :include @@ -71,7 +71,7 @@ module OpenAI # to fetch the file search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, diff --git a/rbi/openai/models/chat/chat_completion.rbi b/rbi/openai/models/chat/chat_completion.rbi index 13eef9590..d2938b819 100644 --- a/rbi/openai/models/chat/chat_completion.rbi +++ b/rbi/openai/models/chat/chat_completion.rbi @@ -61,13 +61,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -155,13 +157,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -977,13 +981,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the diff --git a/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi b/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi index 9d53ed672..e926b2f35 100644 --- a/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi +++ b/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi @@ -21,7 +21,7 @@ module OpenAI attr_accessor :role # Data about a previous audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig { returns(T.nilable(OpenAI::Chat::ChatCompletionAssistantMessageParam::Audio)) } attr_reader :audio @@ -111,7 +111,7 @@ module OpenAI def self.new( # Data about a previous audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # The contents of the assistant message. Required unless `tool_calls` or @@ -172,7 +172,7 @@ module OpenAI attr_accessor :id # Data about a previous audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig do params( @@ -210,8 +210,7 @@ module OpenAI ) } - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ArrayOfContentPart extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/chat/chat_completion_audio.rbi b/rbi/openai/models/chat/chat_completion_audio.rbi index c510021f4..45d7541aa 100644 --- a/rbi/openai/models/chat/chat_completion_audio.rbi +++ b/rbi/openai/models/chat/chat_completion_audio.rbi @@ -36,7 +36,7 @@ module OpenAI # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig do params( diff --git a/rbi/openai/models/chat/chat_completion_audio_param.rbi b/rbi/openai/models/chat/chat_completion_audio_param.rbi index cc3ef2989..ac919113d 100644 --- a/rbi/openai/models/chat/chat_completion_audio_param.rbi +++ b/rbi/openai/models/chat/chat_completion_audio_param.rbi @@ -38,7 +38,7 @@ module OpenAI # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig do params( diff --git a/rbi/openai/models/chat/chat_completion_chunk.rbi b/rbi/openai/models/chat/chat_completion_chunk.rbi index 7c670bb5b..254b6b594 100644 --- a/rbi/openai/models/chat/chat_completion_chunk.rbi +++ b/rbi/openai/models/chat/chat_completion_chunk.rbi @@ -63,13 +63,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -103,7 +105,7 @@ module OpenAI # Represents a streamed chunk of a chat completion response returned by the model, # based on the provided input. - # [Learn more](https://platform.openai.com/docs/guides/streaming-responses). + # [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). sig do params( @@ -162,13 +164,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -1322,13 +1326,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the diff --git a/rbi/openai/models/chat/chat_completion_content_part.rbi b/rbi/openai/models/chat/chat_completion_content_part.rbi index 8ed6c7d50..aab0c99f9 100644 --- a/rbi/openai/models/chat/chat_completion_content_part.rbi +++ b/rbi/openai/models/chat/chat_completion_content_part.rbi @@ -7,8 +7,7 @@ module OpenAI module Chat - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ChatCompletionContentPart extend OpenAI::Internal::Type::Union @@ -53,8 +52,8 @@ module OpenAI } attr_writer :prompt_cache_breakpoint - # Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text - # generation. + # Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) + # for text generation. sig do params( diff --git a/rbi/openai/models/chat/chat_completion_content_part_image.rbi b/rbi/openai/models/chat/chat_completion_content_part_image.rbi index eec9bbabd..57bc1259c 100644 --- a/rbi/openai/models/chat/chat_completion_content_part_image.rbi +++ b/rbi/openai/models/chat/chat_completion_content_part_image.rbi @@ -38,7 +38,8 @@ module OpenAI } attr_writer :prompt_cache_breakpoint - # Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + # Learn about + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). sig do params( @@ -90,7 +91,7 @@ module OpenAI attr_accessor :url # Specifies the detail level of the image. Learn more in the - # [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). sig { returns(T.nilable(OpenAI::Chat::ChatCompletionContentPartImage::ImageURL::Detail::OrSymbol)) } attr_reader :detail @@ -112,7 +113,7 @@ module OpenAI url:, # Specifies the detail level of the image. Learn more in the - # [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). detail: nil ) @@ -127,7 +128,7 @@ module OpenAI end # Specifies the detail level of the image. Learn more in the - # [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + # [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level). module Detail extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi b/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi index f09151789..7e5c4d93b 100644 --- a/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +++ b/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi @@ -40,7 +40,7 @@ module OpenAI } attr_writer :prompt_cache_breakpoint - # Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + # Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). sig do params( diff --git a/rbi/openai/models/chat/chat_completion_content_part_text.rbi b/rbi/openai/models/chat/chat_completion_content_part_text.rbi index 4d40ef62e..987b17577 100644 --- a/rbi/openai/models/chat/chat_completion_content_part_text.rbi +++ b/rbi/openai/models/chat/chat_completion_content_part_text.rbi @@ -36,8 +36,7 @@ module OpenAI } attr_writer :prompt_cache_breakpoint - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). sig do params( diff --git a/rbi/openai/models/chat/chat_completion_message.rbi b/rbi/openai/models/chat/chat_completion_message.rbi index 5d276606e..616d767b0 100644 --- a/rbi/openai/models/chat/chat_completion_message.rbi +++ b/rbi/openai/models/chat/chat_completion_message.rbi @@ -33,7 +33,7 @@ module OpenAI attr_accessor :role # Annotations for the message, when applicable, as when using the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig { returns(T.nilable(T::Array[OpenAI::Chat::ChatCompletionMessage::Annotation])) } attr_reader :annotations @@ -42,7 +42,7 @@ module OpenAI # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig { returns(T.nilable(OpenAI::Chat::ChatCompletionAudio)) } attr_reader :audio @@ -108,12 +108,12 @@ module OpenAI refusal:, # Annotations for the message, when applicable, as when using the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). annotations: nil, # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # Deprecated and replaced by `tool_calls`. The name and arguments of a function diff --git a/rbi/openai/models/chat/chat_completion_store_message.rbi b/rbi/openai/models/chat/chat_completion_store_message.rbi index 23cf05cdb..920f2f091 100644 --- a/rbi/openai/models/chat/chat_completion_store_message.rbi +++ b/rbi/openai/models/chat/chat_completion_store_message.rbi @@ -73,12 +73,12 @@ module OpenAI id:, # Annotations for the message, when applicable, as when using the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). annotations: nil, # If the audio output modality is requested, this object contains data about the # audio response from the model. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # Deprecated and replaced by `tool_calls`. The name and arguments of a function @@ -116,8 +116,7 @@ module OpenAI def to_hash end - # Learn about - # [text inputs](https://platform.openai.com/docs/guides/text-generation). + # Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). module ContentPart extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/chat/completion_create_params.rbi b/rbi/openai/models/chat/completion_create_params.rbi index a762df074..ffa1ef4b0 100644 --- a/rbi/openai/models/chat/completion_create_params.rbi +++ b/rbi/openai/models/chat/completion_create_params.rbi @@ -18,11 +18,11 @@ module OpenAI end # A list of messages comprising the conversation so far. Depending on the - # [model](https://platform.openai.com/docs/models) you use, different message - # types (modalities) are supported, like - # [text](https://platform.openai.com/docs/guides/text-generation), - # [images](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio). + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). sig do returns( T::Array[ @@ -43,14 +43,14 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.any(String, OpenAI::ChatModel::OrSymbol)) } attr_accessor :model # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). sig { returns(T.nilable(OpenAI::Chat::ChatCompletionAudioParam)) } attr_reader :audio @@ -130,17 +130,17 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a completion, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_completion_tokens - # The maximum number of [tokens](/tokenizer) that can be generated in the chat - # completion. This value can be used to control + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control # [costs](https://openai.com/api/pricing/) for text generated via API. # # This value is now deprecated in favor of `max_completion_tokens`, and is not # compatible with - # [o-series models](https://platform.openai.com/docs/guides/reasoning). + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_tokens @@ -159,8 +159,8 @@ module OpenAI # `["text"]` # # The `gpt-4o-audio-preview` model can also be used to - # [generate audio](https://platform.openai.com/docs/guides/audio). To request that - # this model generate both text and audio responses, you can use: + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: # # `["text", "audio"]` sig { returns(T.nilable(T::Array[OpenAI::Chat::CompletionCreateParams::Modality::OrSymbol])) } @@ -180,7 +180,7 @@ module OpenAI attr_accessor :n # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. sig { returns(T.nilable(T::Boolean)) } attr_reader :parallel_tool_calls @@ -204,7 +204,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -215,7 +215,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Chat::CompletionCreateParams::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -228,7 +228,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -247,7 +247,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort @@ -257,7 +257,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -296,7 +296,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -315,13 +315,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -339,8 +341,9 @@ module OpenAI attr_accessor :stop # Whether or not to store the output of this chat completion request for use in - # our [model distillation](https://platform.openai.com/docs/guides/distillation) - # or [evals](https://platform.openai.com/docs/guides/evals) products. + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. # # Supports text and image inputs. Note: image inputs over 8MB will be dropped. sig { returns(T.nilable(T::Boolean)) } @@ -399,8 +402,9 @@ module OpenAI attr_writer :tool_choice # A list of tools the model may call. You can provide either - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - # or [function tools](https://platform.openai.com/docs/guides/function-calling). + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). sig do returns( T.nilable(T::Array[T.any(OpenAI::Chat::ChatCompletionFunctionTool, OpenAI::Chat::ChatCompletionCustomTool)]) @@ -443,7 +447,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -459,7 +463,7 @@ module OpenAI # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig { returns(T.nilable(OpenAI::Chat::CompletionCreateParams::WebSearchOptions)) } attr_reader :web_search_options @@ -576,23 +580,23 @@ module OpenAI def self.new( # A list of messages comprising the conversation so far. Depending on the - # [model](https://platform.openai.com/docs/models) you use, different message - # types (modalities) are supported, like - # [text](https://platform.openai.com/docs/guides/text-generation), - # [images](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio). + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). messages:, # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # Number between -2.0 and 2.0. Positive values penalize new tokens based on their @@ -638,16 +642,16 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a completion, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_completion_tokens: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the chat - # completion. This value can be used to control + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control # [costs](https://openai.com/api/pricing/) for text generated via API. # # This value is now deprecated in favor of `max_completion_tokens`, and is not # compatible with - # [o-series models](https://platform.openai.com/docs/guides/reasoning). + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). max_tokens: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -664,8 +668,8 @@ module OpenAI # `["text"]` # # The `gpt-4o-audio-preview` model can also be used to - # [generate audio](https://platform.openai.com/docs/guides/audio). To request that - # this model generate both text and audio responses, you can use: + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: # # `["text", "audio"]` modalities: nil, @@ -679,7 +683,7 @@ module OpenAI n: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, @@ -694,7 +698,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -704,7 +708,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -713,7 +717,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -731,7 +735,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -740,7 +744,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -752,7 +756,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # This feature is in Beta. If specified, our system will make a best effort to @@ -769,13 +773,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -791,8 +797,9 @@ module OpenAI stop: nil, # Whether or not to store the output of this chat completion request for use in - # our [model distillation](https://platform.openai.com/docs/guides/distillation) - # or [evals](https://platform.openai.com/docs/guides/evals) products. + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. # # Supports text and image inputs. Note: image inputs over 8MB will be dropped. store: nil, @@ -818,8 +825,9 @@ module OpenAI tool_choice: nil, # A list of tools the model may call. You can provide either - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - # or [function tools](https://platform.openai.com/docs/guides/function-calling). + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -839,7 +847,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # Constrains the verbosity of the model's response. Lower values will result in @@ -850,7 +858,7 @@ module OpenAI # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). web_search_options: nil, request_options: {} @@ -933,8 +941,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -1021,8 +1029,8 @@ module OpenAI attr_writer :description # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -1055,8 +1063,8 @@ module OpenAI description: nil, # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -1356,7 +1364,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -1446,7 +1454,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1480,7 +1488,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -1510,13 +1518,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -1619,7 +1629,7 @@ module OpenAI # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig do params( diff --git a/rbi/openai/models/completion_create_params.rbi b/rbi/openai/models/completion_create_params.rbi index 935850271..bd710cd13 100644 --- a/rbi/openai/models/completion_create_params.rbi +++ b/rbi/openai/models/completion_create_params.rbi @@ -16,10 +16,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. sig { returns(T.any(String, OpenAI::CompletionCreateParams::Model::OrSymbol)) } attr_accessor :model @@ -52,7 +52,7 @@ module OpenAI # existing frequency in the text so far, decreasing the model's likelihood to # repeat the same line verbatim. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) sig { returns(T.nilable(Float)) } attr_accessor :frequency_penalty @@ -60,11 +60,12 @@ module OpenAI # # Accepts a JSON object that maps tokens (specified by their token ID in the GPT # tokenizer) to an associated bias value from -100 to 100. You can use this - # [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - # Mathematically, the bias is added to the logits generated by the model prior to - # sampling. The exact effect will vary per model, but values between -1 and 1 - # should decrease or increase likelihood of selection; values like -100 or 100 - # should result in a ban or exclusive selection of the relevant token. + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token # from being generated. @@ -80,8 +81,8 @@ module OpenAI sig { returns(T.nilable(Integer)) } attr_accessor :logprobs - # The maximum number of [tokens](/tokenizer) that can be generated in the - # completion. + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # # The token count of your prompt plus `max_tokens` cannot exceed the model's # context length. @@ -102,7 +103,7 @@ module OpenAI # whether they appear in the text so far, increasing the model's likelihood to # talk about new topics. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) sig { returns(T.nilable(Float)) } attr_accessor :presence_penalty @@ -153,7 +154,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -204,10 +205,10 @@ module OpenAI def self.new( # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The prompt(s) to generate completions for, encoded as a string, array of @@ -236,18 +237,19 @@ module OpenAI # existing frequency in the text so far, decreasing the model's likelihood to # repeat the same line verbatim. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) frequency_penalty: nil, # Modify the likelihood of specified tokens appearing in the completion. # # Accepts a JSON object that maps tokens (specified by their token ID in the GPT # tokenizer) to an associated bias value from -100 to 100. You can use this - # [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - # Mathematically, the bias is added to the logits generated by the model prior to - # sampling. The exact effect will vary per model, but values between -1 and 1 - # should decrease or increase likelihood of selection; values like -100 or 100 - # should result in a ban or exclusive selection of the relevant token. + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token # from being generated. @@ -261,8 +263,8 @@ module OpenAI # The maximum value for `logprobs` is 5. logprobs: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the - # completion. + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # # The token count of your prompt plus `max_tokens` cannot exceed the model's # context length. @@ -281,7 +283,7 @@ module OpenAI # whether they appear in the text so far, increasing the model's likelihood to # talk about new topics. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) presence_penalty: nil, # If specified, our system will make a best effort to sample deterministically, @@ -322,7 +324,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} @@ -357,10 +359,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/conversations/conversation_item.rbi b/rbi/openai/models/conversations/conversation_item.rbi index 26e065801..111ae71c4 100644 --- a/rbi/openai/models/conversations/conversation_item.rbi +++ b/rbi/openai/models/conversations/conversation_item.rbi @@ -9,7 +9,7 @@ module OpenAI # A single item within a conversation. The set of possible types are the same as # the `output` type of a - # [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output). + # [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output). module ConversationItem extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/conversations/item_create_params.rbi b/rbi/openai/models/conversations/item_create_params.rbi index a84403f96..fac1a6428 100644 --- a/rbi/openai/models/conversations/item_create_params.rbi +++ b/rbi/openai/models/conversations/item_create_params.rbi @@ -65,7 +65,7 @@ module OpenAI attr_accessor :items # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol])) } attr_reader :include @@ -130,7 +130,7 @@ module OpenAI items:, # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. include: nil, diff --git a/rbi/openai/models/conversations/item_retrieve_params.rbi b/rbi/openai/models/conversations/item_retrieve_params.rbi index 0d2f615e5..4bd750062 100644 --- a/rbi/openai/models/conversations/item_retrieve_params.rbi +++ b/rbi/openai/models/conversations/item_retrieve_params.rbi @@ -24,7 +24,7 @@ module OpenAI attr_accessor :item_id # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol])) } attr_reader :include @@ -52,7 +52,7 @@ module OpenAI item_id:, # Additional fields to include in the response. See the `include` parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. include: nil, diff --git a/rbi/openai/models/embedding.rbi b/rbi/openai/models/embedding.rbi index 1fbcc5e06..822e4a515 100644 --- a/rbi/openai/models/embedding.rbi +++ b/rbi/openai/models/embedding.rbi @@ -14,7 +14,7 @@ module OpenAI # The embedding vector, which is a list of floats. The length of vector depends on # the model as listed in the - # [embedding guide](https://platform.openai.com/docs/guides/embeddings). + # [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). sig { returns(T::Array[Float]) } attr_accessor :embedding @@ -42,7 +42,7 @@ module OpenAI # The embedding vector, which is a list of floats. The length of vector depends on # the model as listed in the - # [embedding guide](https://platform.openai.com/docs/guides/embeddings). + # [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). embedding:, # The index of the embedding in the list of embeddings. diff --git a/rbi/openai/models/embedding_create_params.rbi b/rbi/openai/models/embedding_create_params.rbi index 089701354..b40318045 100644 --- a/rbi/openai/models/embedding_create_params.rbi +++ b/rbi/openai/models/embedding_create_params.rbi @@ -28,10 +28,10 @@ module OpenAI attr_accessor :input # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. sig { returns(T.any(String, OpenAI::EmbeddingModel::OrSymbol)) } attr_accessor :model @@ -53,7 +53,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -91,10 +91,10 @@ module OpenAI input:, # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The number of dimensions the resulting output embeddings should have. Only @@ -107,7 +107,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} @@ -165,10 +165,10 @@ module OpenAI end # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. module Model extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi b/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi index 92c01fb71..e346d0aa2 100644 --- a/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +++ b/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi @@ -929,7 +929,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort @@ -939,7 +939,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -1027,7 +1027,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1036,7 +1036,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -1085,7 +1085,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is diff --git a/rbi/openai/models/evals/run_cancel_response.rbi b/rbi/openai/models/evals/run_cancel_response.rbi index b1b9d7b83..28731ff4c 100644 --- a/rbi/openai/models/evals/run_cancel_response.rbi +++ b/rbi/openai/models/evals/run_cancel_response.rbi @@ -524,7 +524,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -599,7 +599,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1187,7 +1187,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -1209,8 +1209,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns( T.nilable(OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text) @@ -1233,13 +1233,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig { returns(T.nilable(T::Array[OpenAI::Responses::Tool::Variants])) } attr_reader :tools @@ -1324,7 +1325,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1337,8 +1338,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An array of tools the model may call while generating a response. You can @@ -1348,13 +1349,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. @@ -1391,7 +1393,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -1418,8 +1420,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -1437,7 +1439,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/evals/run_create_params.rbi b/rbi/openai/models/evals/run_create_params.rbi index c7422355a..c654b72c1 100644 --- a/rbi/openai/models/evals/run_create_params.rbi +++ b/rbi/openai/models/evals/run_create_params.rbi @@ -460,7 +460,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort @@ -535,7 +535,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1188,7 +1188,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort @@ -1210,8 +1210,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns( T.nilable( @@ -1236,13 +1236,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig { returns( T.nilable( @@ -1352,7 +1353,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1365,8 +1366,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An array of tools the model may call while generating a response. You can @@ -1376,13 +1377,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. @@ -1438,7 +1440,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -1475,8 +1477,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -1494,7 +1496,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/evals/run_create_response.rbi b/rbi/openai/models/evals/run_create_response.rbi index e06b9c887..0bb64637f 100644 --- a/rbi/openai/models/evals/run_create_response.rbi +++ b/rbi/openai/models/evals/run_create_response.rbi @@ -524,7 +524,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -599,7 +599,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1187,7 +1187,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -1209,8 +1209,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns( T.nilable(OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text) @@ -1233,13 +1233,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig { returns(T.nilable(T::Array[OpenAI::Responses::Tool::Variants])) } attr_reader :tools @@ -1324,7 +1325,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1337,8 +1338,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An array of tools the model may call while generating a response. You can @@ -1348,13 +1349,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. @@ -1391,7 +1393,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -1418,8 +1420,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -1437,7 +1439,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/evals/run_list_response.rbi b/rbi/openai/models/evals/run_list_response.rbi index 5fd5b7113..0e6457133 100644 --- a/rbi/openai/models/evals/run_list_response.rbi +++ b/rbi/openai/models/evals/run_list_response.rbi @@ -522,7 +522,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -597,7 +597,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1185,7 +1185,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -1207,8 +1207,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text)) } @@ -1229,13 +1229,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig { returns(T.nilable(T::Array[OpenAI::Responses::Tool::Variants])) } attr_reader :tools @@ -1320,7 +1321,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1333,8 +1334,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An array of tools the model may call while generating a response. You can @@ -1344,13 +1345,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. @@ -1387,7 +1389,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -1414,8 +1416,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -1433,7 +1435,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/evals/run_retrieve_response.rbi b/rbi/openai/models/evals/run_retrieve_response.rbi index 964f6ad10..9e3f451fc 100644 --- a/rbi/openai/models/evals/run_retrieve_response.rbi +++ b/rbi/openai/models/evals/run_retrieve_response.rbi @@ -528,7 +528,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -603,7 +603,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1191,7 +1191,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) } attr_accessor :reasoning_effort @@ -1213,8 +1213,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns( T.nilable(OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text) @@ -1237,13 +1237,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig { returns(T.nilable(T::Array[OpenAI::Responses::Tool::Variants])) } attr_reader :tools @@ -1328,7 +1329,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, @@ -1341,8 +1342,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An array of tools the model may call while generating a response. You can @@ -1352,13 +1353,14 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code. Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An alternative to temperature for nucleus sampling; 1.0 includes all tokens. @@ -1395,7 +1397,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -1422,8 +1424,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -1441,7 +1443,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/fine_tuning/alpha/grader_run_params.rbi b/rbi/openai/models/fine_tuning/alpha/grader_run_params.rbi index 9188afaa4..dd0a9be98 100644 --- a/rbi/openai/models/fine_tuning/alpha/grader_run_params.rbi +++ b/rbi/openai/models/fine_tuning/alpha/grader_run_params.rbi @@ -35,15 +35,16 @@ module OpenAI # The model sample to be evaluated. This value will be used to populate the # `sample` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. - # The `output_json` variable will be populated if the model sample is a valid JSON - # string. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. sig { returns(String) } attr_accessor :model_sample # The dataset item provided to the grader. This will be used to populate the # `item` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. sig { returns(T.nilable(T.anything)) } attr_reader :item @@ -76,14 +77,15 @@ module OpenAI # The model sample to be evaluated. This value will be used to populate the # `sample` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. - # The `output_json` variable will be populated if the model sample is a valid JSON - # string. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. model_sample:, # The dataset item provided to the grader. This will be used to populate the # `item` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. item: nil, request_options: {} diff --git a/rbi/openai/models/fine_tuning/fine_tuning_job.rbi b/rbi/openai/models/fine_tuning/fine_tuning_job.rbi index 9445c27bf..e214e2815 100644 --- a/rbi/openai/models/fine_tuning/fine_tuning_job.rbi +++ b/rbi/openai/models/fine_tuning/fine_tuning_job.rbi @@ -64,7 +64,7 @@ module OpenAI # The compiled results file ID(s) for the fine-tuning job. You can retrieve the # results with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). sig { returns(T::Array[String]) } attr_accessor :result_files @@ -83,13 +83,13 @@ module OpenAI attr_accessor :trained_tokens # The file ID used for training. You can retrieve the training data with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). sig { returns(String) } attr_accessor :training_file # The file ID used for validation. You can retrieve the validation results with # the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). sig { returns(T.nilable(String)) } attr_accessor :validation_file @@ -195,7 +195,7 @@ module OpenAI # The compiled results file ID(s) for the fine-tuning job. You can retrieve the # results with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). result_files:, # The seed used for the fine-tuning job. @@ -210,12 +210,12 @@ module OpenAI trained_tokens:, # The file ID used for training. You can retrieve the training data with the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). training_file:, # The file ID used for validation. You can retrieve the validation results with # the - # [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + # [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). validation_file:, # The Unix timestamp (in seconds) for when the fine-tuning job is estimated to diff --git a/rbi/openai/models/fine_tuning/job_create_params.rbi b/rbi/openai/models/fine_tuning/job_create_params.rbi index 0ef559a4d..e4b43097f 100644 --- a/rbi/openai/models/fine_tuning/job_create_params.rbi +++ b/rbi/openai/models/fine_tuning/job_create_params.rbi @@ -18,27 +18,28 @@ module OpenAI end # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). sig { returns(T.any(String, OpenAI::FineTuning::JobCreateParams::Model::OrSymbol)) } attr_accessor :model # The ID of an uploaded file that contains training data. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your dataset must be formatted as a JSONL file. Additionally, you must upload # your file with the purpose `fine-tune`. # # The contents of the file should differ depending on if the model uses the - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # format, or if the fine-tuning method uses the - # [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) # format. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. sig { returns(String) } attr_accessor :training_file @@ -96,7 +97,7 @@ module OpenAI # the purpose `fine-tune`. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. sig { returns(T.nilable(String)) } attr_accessor :validation_file @@ -129,26 +130,27 @@ module OpenAI def self.new( # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). model:, # The ID of an uploaded file that contains training data. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your dataset must be formatted as a JSONL file. Additionally, you must upload # your file with the purpose `fine-tune`. # # The contents of the file should differ depending on if the model uses the - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # format, or if the fine-tuning method uses the - # [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) # format. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. training_file:, @@ -193,7 +195,7 @@ module OpenAI # the purpose `fine-tune`. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. validation_file: nil, @@ -221,7 +223,7 @@ module OpenAI end # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). module Model extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/function_definition.rbi b/rbi/openai/models/function_definition.rbi index 9e126b08a..58fe47e2e 100644 --- a/rbi/openai/models/function_definition.rbi +++ b/rbi/openai/models/function_definition.rbi @@ -26,8 +26,8 @@ module OpenAI attr_writer :description # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -42,7 +42,7 @@ module OpenAI # set to true, the model will follow the exact schema defined in the `parameters` # field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn # more about Structured Outputs in the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling). + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). sig { returns(T.nilable(T::Boolean)) } attr_accessor :strict @@ -70,8 +70,8 @@ module OpenAI description: nil, # The parameters the functions accepts, described as a JSON Schema object. See the - # [guide](https://platform.openai.com/docs/guides/function-calling) for examples, - # and the + # [guide](https://developers.openai.com/api/docs/guides/function-calling) for + # examples, and the # [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for # documentation about the format. # @@ -82,7 +82,7 @@ module OpenAI # set to true, the model will follow the exact schema defined in the `parameters` # field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn # more about Structured Outputs in the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling). + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). strict: nil ) diff --git a/rbi/openai/models/graders/score_model_grader.rbi b/rbi/openai/models/graders/score_model_grader.rbi index 57cc4d764..bf1b48342 100644 --- a/rbi/openai/models/graders/score_model_grader.rbi +++ b/rbi/openai/models/graders/score_model_grader.rbi @@ -401,7 +401,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :reasoning_effort @@ -443,7 +443,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, diff --git a/rbi/openai/models/image_create_variation_params.rbi b/rbi/openai/models/image_create_variation_params.rbi index f54646915..26bbbb504 100644 --- a/rbi/openai/models/image_create_variation_params.rbi +++ b/rbi/openai/models/image_create_variation_params.rbi @@ -46,7 +46,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -100,7 +100,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} diff --git a/rbi/openai/models/image_edit_params.rbi b/rbi/openai/models/image_edit_params.rbi index 5c31783e4..7db53db00 100644 --- a/rbi/openai/models/image_edit_params.rbi +++ b/rbi/openai/models/image_edit_params.rbi @@ -136,7 +136,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -285,7 +285,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} diff --git a/rbi/openai/models/image_generate_params.rbi b/rbi/openai/models/image_generate_params.rbi index cd2d2f2b0..6aa1813a1 100644 --- a/rbi/openai/models/image_generate_params.rbi +++ b/rbi/openai/models/image_generate_params.rbi @@ -116,7 +116,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -247,7 +247,7 @@ module OpenAI # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} diff --git a/rbi/openai/models/moderation_create_params.rbi b/rbi/openai/models/moderation_create_params.rbi index bd469f808..d262b0282 100644 --- a/rbi/openai/models/moderation_create_params.rbi +++ b/rbi/openai/models/moderation_create_params.rbi @@ -21,9 +21,9 @@ module OpenAI attr_accessor :input # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). sig { returns(T.nilable(T.any(String, OpenAI::ModerationModel::OrSymbol))) } attr_reader :model @@ -48,9 +48,9 @@ module OpenAI input:, # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). model: nil, request_options: {} @@ -95,9 +95,9 @@ module OpenAI end # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). module Model extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/realtime/audio_transcription.rbi b/rbi/openai/models/realtime/audio_transcription.rbi index d18b232a5..d6aab92ad 100644 --- a/rbi/openai/models/realtime/audio_transcription.rbi +++ b/rbi/openai/models/realtime/audio_transcription.rbi @@ -62,7 +62,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. For `whisper-1`, the - # [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + # [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). # For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the # prompt is a free text string, for example "expect words related to technology". # Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. @@ -119,7 +119,7 @@ module OpenAI # An optional text to guide the model's style or continue a previous audio # segment. For `whisper-1`, the - # [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). + # [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting). # For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the # prompt is a free text string, for example "expect words related to technology". # Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions. diff --git a/rbi/openai/models/realtime/call_accept_params.rbi b/rbi/openai/models/realtime/call_accept_params.rbi index df400ffbe..68128aca4 100644 --- a/rbi/openai/models/realtime/call_accept_params.rbi +++ b/rbi/openai/models/realtime/call_accept_params.rbi @@ -114,7 +114,7 @@ module OpenAI parallel_tool_calls: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. diff --git a/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi b/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi index 6bf54de72..4a4005ba2 100644 --- a/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi +++ b/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi @@ -29,7 +29,7 @@ module OpenAI # trigger the server to stop generating audio and emit a # `output_audio_buffer.cleared` event. This event should be preceded by a # `response.cancel` client event to stop the generation of the current response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). sig do params( diff --git a/rbi/openai/models/realtime/realtime_audio_config_input.rbi b/rbi/openai/models/realtime/realtime_audio_config_input.rbi index 7213bf849..b9aaa670c 100644 --- a/rbi/openai/models/realtime/realtime_audio_config_input.rbi +++ b/rbi/openai/models/realtime/realtime_audio_config_input.rbi @@ -55,7 +55,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -131,7 +131,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. diff --git a/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi b/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi index d71dd44ce..2813fed2e 100644 --- a/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +++ b/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi @@ -48,7 +48,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -116,7 +116,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). sig do params( @@ -177,7 +177,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -348,7 +348,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # diff --git a/rbi/openai/models/realtime/realtime_response_create_params.rbi b/rbi/openai/models/realtime/realtime_response_create_params.rbi index 85c49a8bd..eae8a0003 100644 --- a/rbi/openai/models/realtime/realtime_response_create_params.rbi +++ b/rbi/openai/models/realtime/realtime_response_create_params.rbi @@ -138,7 +138,7 @@ module OpenAI attr_writer :parallel_tool_calls # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -307,7 +307,7 @@ module OpenAI parallel_tool_calls: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. @@ -440,7 +440,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module Tool extend OpenAI::Internal::Type::Union diff --git a/rbi/openai/models/realtime/realtime_server_event.rbi b/rbi/openai/models/realtime/realtime_server_event.rbi index 4ac037274..03ecdcf18 100644 --- a/rbi/openai/models/realtime/realtime_server_event.rbi +++ b/rbi/openai/models/realtime/realtime_server_event.rbi @@ -181,7 +181,7 @@ module OpenAI # **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the # client. This event is emitted after an audio content part has been added # (`response.content_part.added`) to the response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). sig do params( @@ -240,7 +240,7 @@ module OpenAI # **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely # drained on the server, and no more audio is forthcoming. This event is emitted # after the full response data has been sent to the client (`response.done`). - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). sig do params( @@ -301,7 +301,7 @@ module OpenAI # (`input_audio_buffer.speech_started`), or when the client has emitted the # `output_audio_buffer.clear` event to manually cut off the current audio # response. - # [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + # [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). sig do params( diff --git a/rbi/openai/models/realtime/realtime_session.rbi b/rbi/openai/models/realtime/realtime_session.rbi index ffd6abaaf..069c9b3ca 100644 --- a/rbi/openai/models/realtime/realtime_session.rbi +++ b/rbi/openai/models/realtime/realtime_session.rbi @@ -61,7 +61,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -128,7 +128,7 @@ module OpenAI attr_writer :output_audio_format # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -293,7 +293,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -332,7 +332,7 @@ module OpenAI output_audio_format: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the diff --git a/rbi/openai/models/realtime/realtime_session_create_request.rbi b/rbi/openai/models/realtime/realtime_session_create_request.rbi index ce1e195e2..aee355744 100644 --- a/rbi/openai/models/realtime/realtime_session_create_request.rbi +++ b/rbi/openai/models/realtime/realtime_session_create_request.rbi @@ -90,7 +90,7 @@ module OpenAI attr_writer :parallel_tool_calls # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -294,7 +294,7 @@ module OpenAI parallel_tool_calls: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. diff --git a/rbi/openai/models/realtime/realtime_session_create_response.rbi b/rbi/openai/models/realtime/realtime_session_create_response.rbi index 41087889e..cefddc033 100644 --- a/rbi/openai/models/realtime/realtime_session_create_response.rbi +++ b/rbi/openai/models/realtime/realtime_session_create_response.rbi @@ -101,7 +101,7 @@ module OpenAI attr_writer :output_modalities # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -288,7 +288,7 @@ module OpenAI output_modalities: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. @@ -1263,7 +1263,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module Tool extend OpenAI::Internal::Type::Union @@ -1318,7 +1318,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -1390,7 +1390,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). sig do params( @@ -1451,7 +1451,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -1635,7 +1635,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # diff --git a/rbi/openai/models/realtime/realtime_tools_config_union.rbi b/rbi/openai/models/realtime/realtime_tools_config_union.rbi index 4fdca2f65..1705934cd 100644 --- a/rbi/openai/models/realtime/realtime_tools_config_union.rbi +++ b/rbi/openai/models/realtime/realtime_tools_config_union.rbi @@ -7,7 +7,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). module RealtimeToolsConfigUnion extend OpenAI::Internal::Type::Union @@ -62,7 +62,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -130,7 +130,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). sig do params( @@ -191,7 +191,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -364,7 +364,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # diff --git a/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi b/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi index b5df9ab81..918a764d7 100644 --- a/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +++ b/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi @@ -57,7 +57,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. @@ -133,7 +133,7 @@ module OpenAI # `null` to turn off once on. Input audio transcription is not native to the # model, since the model consumes audio directly. Transcription runs # asynchronously through - # [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) + # [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create) # and should be treated as guidance of input audio content rather than precisely # what the model heard. The client can optionally set the language and prompt for # transcription, these offer additional guidance to the transcription service. diff --git a/rbi/openai/models/reasoning.rbi b/rbi/openai/models/reasoning.rbi index 7895b979c..88da94678 100644 --- a/rbi/openai/models/reasoning.rbi +++ b/rbi/openai/models/reasoning.rbi @@ -25,7 +25,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) } attr_accessor :effort @@ -57,7 +57,7 @@ module OpenAI attr_accessor :summary # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig do params( @@ -87,7 +87,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. effort: nil, diff --git a/rbi/openai/models/reasoning_effort.rbi b/rbi/openai/models/reasoning_effort.rbi index 8ca49064c..70c18b946 100644 --- a/rbi/openai/models/reasoning_effort.rbi +++ b/rbi/openai/models/reasoning_effort.rbi @@ -7,7 +7,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. module ReasoningEffort extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/response_format_json_schema.rbi b/rbi/openai/models/response_format_json_schema.rbi index 27171ed65..86e6595d6 100644 --- a/rbi/openai/models/response_format_json_schema.rbi +++ b/rbi/openai/models/response_format_json_schema.rbi @@ -37,7 +37,7 @@ module OpenAI # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). sig do params( json_schema: T.any( @@ -100,7 +100,7 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). sig { returns(T.nilable(T::Boolean)) } attr_accessor :strict @@ -136,7 +136,7 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). strict: nil ) diff --git a/rbi/openai/models/response_format_text_grammar.rbi b/rbi/openai/models/response_format_text_grammar.rbi index 037ed3a44..810de086f 100644 --- a/rbi/openai/models/response_format_text_grammar.rbi +++ b/rbi/openai/models/response_format_text_grammar.rbi @@ -21,7 +21,7 @@ module OpenAI attr_accessor :type # A custom grammar for the model to follow when generating text. Learn more in the - # [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + # [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars). sig do params( diff --git a/rbi/openai/models/response_format_text_python.rbi b/rbi/openai/models/response_format_text_python.rbi index a7b1827ff..8d6351e50 100644 --- a/rbi/openai/models/response_format_text_python.rbi +++ b/rbi/openai/models/response_format_text_python.rbi @@ -17,7 +17,7 @@ module OpenAI attr_accessor :type # Configure the model to generate valid Python code. See the - # [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) + # [custom grammars guide](https://developers.openai.com/api/docs/guides/function-calling#context-free-grammars) # for more details. sig do params( diff --git a/rbi/openai/models/responses/computer_tool.rbi b/rbi/openai/models/responses/computer_tool.rbi index 70fa0c507..b5bc51c00 100644 --- a/rbi/openai/models/responses/computer_tool.rbi +++ b/rbi/openai/models/responses/computer_tool.rbi @@ -19,7 +19,7 @@ module OpenAI attr_accessor :type # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). sig do params( diff --git a/rbi/openai/models/responses/computer_use_preview_tool.rbi b/rbi/openai/models/responses/computer_use_preview_tool.rbi index c4052011a..14bf5193d 100644 --- a/rbi/openai/models/responses/computer_use_preview_tool.rbi +++ b/rbi/openai/models/responses/computer_use_preview_tool.rbi @@ -31,7 +31,7 @@ module OpenAI attr_accessor :type # A tool that controls a virtual computer. Learn more about the - # [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + # [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use). sig do params( diff --git a/rbi/openai/models/responses/custom_tool.rbi b/rbi/openai/models/responses/custom_tool.rbi index c89c31e63..0b69cc5fa 100644 --- a/rbi/openai/models/responses/custom_tool.rbi +++ b/rbi/openai/models/responses/custom_tool.rbi @@ -61,7 +61,7 @@ module OpenAI attr_writer :format_ # A custom tool that processes input using a specified format. Learn more about - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) sig do params( diff --git a/rbi/openai/models/responses/file_search_tool.rbi b/rbi/openai/models/responses/file_search_tool.rbi index 0c910d4bf..461dfb6d4 100644 --- a/rbi/openai/models/responses/file_search_tool.rbi +++ b/rbi/openai/models/responses/file_search_tool.rbi @@ -43,7 +43,7 @@ module OpenAI # A tool that searches for relevant content from uploaded files. Learn more about # the - # [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + # [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search). sig do params( diff --git a/rbi/openai/models/responses/function_tool.rbi b/rbi/openai/models/responses/function_tool.rbi index 1394d1c70..42f76428b 100644 --- a/rbi/openai/models/responses/function_tool.rbi +++ b/rbi/openai/models/responses/function_tool.rbi @@ -59,7 +59,7 @@ module OpenAI # Defines a function in your own code the model can choose to call. Learn more # about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). sig do params( diff --git a/rbi/openai/models/responses/input_token_count_params.rbi b/rbi/openai/models/responses/input_token_count_params.rbi index 4684be897..6a73b490c 100644 --- a/rbi/openai/models/responses/input_token_count_params.rbi +++ b/rbi/openai/models/responses/input_token_count_params.rbi @@ -38,8 +38,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(String)) } attr_accessor :model @@ -60,13 +60,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Reasoning)) } attr_reader :reasoning @@ -76,8 +76,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Responses::InputTokenCountParams::Text)) } attr_reader :text @@ -229,8 +229,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Whether to allow the model to run tool calls in parallel. @@ -243,19 +243,19 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Controls which tool the model should use, if any. @@ -400,7 +400,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -444,8 +444,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -465,7 +465,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/responses/response.rbi b/rbi/openai/models/responses/response.rbi index 6a01e658c..978d0f453 100644 --- a/rbi/openai/models/responses/response.rbi +++ b/rbi/openai/models/responses/response.rbi @@ -56,8 +56,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(OpenAI::ResponsesModel::Variants) } attr_accessor :model @@ -104,17 +104,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns(T::Array[OpenAI::Responses::Tool::Variants]) } attr_accessor :tools @@ -128,7 +129,7 @@ module OpenAI attr_accessor :top_p # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -147,7 +148,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -168,13 +169,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -200,7 +201,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -217,7 +218,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -233,7 +234,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Reasoning)) } attr_reader :reasoning @@ -245,7 +246,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -256,13 +257,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -287,8 +290,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Responses::ResponseTextConfig)) } attr_reader :text @@ -323,7 +326,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -502,8 +505,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # An array of content items generated by the model. @@ -536,17 +539,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools:, @@ -558,7 +562,7 @@ module OpenAI top_p:, # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Unix timestamp (in seconds) of when this Response was completed. Only present @@ -571,7 +575,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -586,12 +590,12 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Prompt cache diagnostics requested for this response. @@ -599,7 +603,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # The prompt-caching options that were applied to the response. Supported for @@ -611,7 +615,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -626,7 +630,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -634,7 +638,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -644,13 +648,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -670,8 +676,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -696,7 +702,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # The object type of this resource - always set to `response`. @@ -1769,7 +1775,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1802,13 +1808,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/responses/response_compact_params.rbi b/rbi/openai/models/responses/response_compact_params.rbi index 9e6d49c64..a88b486ba 100644 --- a/rbi/openai/models/responses/response_compact_params.rbi +++ b/rbi/openai/models/responses/response_compact_params.rbi @@ -20,8 +20,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns(T.nilable(T.any(OpenAI::Responses::ResponseCompactParams::Model::OrSymbol, String))) } attr_accessor :model @@ -38,7 +38,7 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id @@ -54,7 +54,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Responses::ResponseCompactParams::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -74,17 +74,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. sig { returns(T.nilable(OpenAI::Responses::ResponseCompactParams::ServiceTier::OrSymbol)) } attr_accessor :service_tier @@ -116,8 +116,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Text, image, or file inputs to the model, used to generate a response @@ -131,7 +131,7 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, @@ -145,7 +145,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -157,17 +157,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. service_tier: nil, request_options: {} @@ -197,8 +197,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. module Model extend OpenAI::Internal::Type::Union @@ -517,7 +517,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -637,17 +637,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. module ServiceTier extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/response_compaction_item.rbi b/rbi/openai/models/responses/response_compaction_item.rbi index 8da10b419..3e8436782 100644 --- a/rbi/openai/models/responses/response_compaction_item.rbi +++ b/rbi/openai/models/responses/response_compaction_item.rbi @@ -34,7 +34,7 @@ module OpenAI attr_writer :created_by # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). sig do params( diff --git a/rbi/openai/models/responses/response_compaction_item_param.rbi b/rbi/openai/models/responses/response_compaction_item_param.rbi index 4395e71ee..6f91b2e5b 100644 --- a/rbi/openai/models/responses/response_compaction_item_param.rbi +++ b/rbi/openai/models/responses/response_compaction_item_param.rbi @@ -27,7 +27,7 @@ module OpenAI attr_accessor :id # A compaction item generated by the - # [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + # [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact). sig do params( diff --git a/rbi/openai/models/responses/response_computer_tool_call.rbi b/rbi/openai/models/responses/response_computer_tool_call.rbi index 6fda1a74d..7c0c50ce5 100644 --- a/rbi/openai/models/responses/response_computer_tool_call.rbi +++ b/rbi/openai/models/responses/response_computer_tool_call.rbi @@ -117,7 +117,7 @@ module OpenAI attr_writer :actions # A tool call to a computer use tool. See the - # [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) + # [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) # for more information. sig do params( diff --git a/rbi/openai/models/responses/response_create_params.rbi b/rbi/openai/models/responses/response_create_params.rbi index 1d007711a..88266c8ab 100644 --- a/rbi/openai/models/responses/response_create_params.rbi +++ b/rbi/openai/models/responses/response_create_params.rbi @@ -18,7 +18,7 @@ module OpenAI end # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -58,11 +58,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::Input::Variants)) } attr_reader :input @@ -79,7 +79,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -102,8 +102,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns( T.nilable(T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol)) @@ -132,13 +132,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -147,7 +147,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -158,7 +158,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -171,7 +171,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -187,7 +187,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Reasoning)) } attr_reader :reasoning @@ -199,7 +199,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -210,13 +210,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -233,7 +235,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). sig { returns(T.nilable(T::Boolean)) } attr_accessor :store @@ -254,8 +256,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Responses::ResponseTextConfig)) } attr_reader :text @@ -318,17 +320,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns( @@ -413,7 +416,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -519,7 +522,7 @@ module OpenAI def self.new( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. @@ -555,11 +558,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. @@ -571,7 +574,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -591,8 +594,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. @@ -603,17 +606,17 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -623,7 +626,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -632,7 +635,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -647,7 +650,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -655,7 +658,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -665,13 +668,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -687,7 +692,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Options for streaming responses. Only set this when you set `stream: true`. @@ -702,8 +707,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a @@ -718,17 +723,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, @@ -757,7 +763,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} @@ -898,11 +904,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -1186,7 +1192,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -1285,7 +1291,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1323,13 +1329,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/responses/response_file_search_tool_call.rbi b/rbi/openai/models/responses/response_file_search_tool_call.rbi index c2d5c06cc..388935809 100644 --- a/rbi/openai/models/responses/response_file_search_tool_call.rbi +++ b/rbi/openai/models/responses/response_file_search_tool_call.rbi @@ -36,7 +36,7 @@ module OpenAI attr_accessor :results # The results of a file search tool call. See the - # [file search guide](https://platform.openai.com/docs/guides/tools-file-search) + # [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) # for more information. sig do params( diff --git a/rbi/openai/models/responses/response_format_text_config.rbi b/rbi/openai/models/responses/response_format_text_config.rbi index b4dbd5e2b..ad743b519 100644 --- a/rbi/openai/models/responses/response_format_text_config.rbi +++ b/rbi/openai/models/responses/response_format_text_config.rbi @@ -9,7 +9,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/responses/response_format_text_json_schema_config.rbi b/rbi/openai/models/responses/response_format_text_json_schema_config.rbi index 306aad2e2..e89064735 100644 --- a/rbi/openai/models/responses/response_format_text_json_schema_config.rbi +++ b/rbi/openai/models/responses/response_format_text_json_schema_config.rbi @@ -40,13 +40,13 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). sig { returns(T.nilable(T::Boolean)) } attr_accessor :strict # JSON Schema response format. Used to generate structured JSON responses. Learn # more about - # [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs). sig do params( @@ -80,7 +80,7 @@ module OpenAI # true, the model will always follow the exact schema defined in the `schema` # field. Only a subset of JSON Schema is supported when `strict` is `true`. To # learn more, read the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). strict: nil, # The type of response format being defined. Always `json_schema`. diff --git a/rbi/openai/models/responses/response_function_tool_call.rbi b/rbi/openai/models/responses/response_function_tool_call.rbi index a6b6e0eb3..47662b997 100644 --- a/rbi/openai/models/responses/response_function_tool_call.rbi +++ b/rbi/openai/models/responses/response_function_tool_call.rbi @@ -77,7 +77,7 @@ module OpenAI attr_writer :status # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. sig do params( diff --git a/rbi/openai/models/responses/response_function_tool_call_item.rbi b/rbi/openai/models/responses/response_function_tool_call_item.rbi index ab6c1757a..738883c6e 100644 --- a/rbi/openai/models/responses/response_function_tool_call_item.rbi +++ b/rbi/openai/models/responses/response_function_tool_call_item.rbi @@ -31,7 +31,7 @@ module OpenAI attr_writer :created_by # A tool call to run a function. See the - # [function calling guide](https://platform.openai.com/docs/guides/function-calling) + # [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) # for more information. sig do params( diff --git a/rbi/openai/models/responses/response_function_web_search.rbi b/rbi/openai/models/responses/response_function_web_search.rbi index 393f4833a..49799cf24 100644 --- a/rbi/openai/models/responses/response_function_web_search.rbi +++ b/rbi/openai/models/responses/response_function_web_search.rbi @@ -41,8 +41,8 @@ module OpenAI attr_accessor :type # The results of a web search tool call. See the - # [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for - # more information. + # [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) + # for more information. sig do params( diff --git a/rbi/openai/models/responses/response_input_image.rbi b/rbi/openai/models/responses/response_input_image.rbi index 991968641..ff4efaff2 100644 --- a/rbi/openai/models/responses/response_input_image.rbi +++ b/rbi/openai/models/responses/response_input_image.rbi @@ -44,7 +44,7 @@ module OpenAI attr_writer :prompt_cache_breakpoint # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision). + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision). sig do params( diff --git a/rbi/openai/models/responses/response_input_image_content.rbi b/rbi/openai/models/responses/response_input_image_content.rbi index a95a7b153..42facbe6e 100644 --- a/rbi/openai/models/responses/response_input_image_content.rbi +++ b/rbi/openai/models/responses/response_input_image_content.rbi @@ -49,7 +49,7 @@ module OpenAI attr_writer :prompt_cache_breakpoint # An image input to the model. Learn about - # [image inputs](https://platform.openai.com/docs/guides/vision) + # [image inputs](https://developers.openai.com/api/docs/guides/images-vision) sig do params( diff --git a/rbi/openai/models/responses/response_prompt.rbi b/rbi/openai/models/responses/response_prompt.rbi index 41894187e..3165a501c 100644 --- a/rbi/openai/models/responses/response_prompt.rbi +++ b/rbi/openai/models/responses/response_prompt.rbi @@ -43,7 +43,7 @@ module OpenAI attr_accessor :version # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig do params( diff --git a/rbi/openai/models/responses/response_reasoning_item.rbi b/rbi/openai/models/responses/response_reasoning_item.rbi index 2aeb620e0..834b6dff1 100644 --- a/rbi/openai/models/responses/response_reasoning_item.rbi +++ b/rbi/openai/models/responses/response_reasoning_item.rbi @@ -55,7 +55,7 @@ module OpenAI # A description of the chain of thought used by a reasoning model while generating # a response. Be sure to include these items in your `input` to the Responses API # for subsequent turns of a conversation if you are manually - # [managing context](https://platform.openai.com/docs/guides/conversation-state). + # [managing context](https://developers.openai.com/api/docs/guides/conversation-state). sig do params( diff --git a/rbi/openai/models/responses/response_text_config.rbi b/rbi/openai/models/responses/response_text_config.rbi index 93c2e7e9e..bbdb659a4 100644 --- a/rbi/openai/models/responses/response_text_config.rbi +++ b/rbi/openai/models/responses/response_text_config.rbi @@ -18,7 +18,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # @@ -62,8 +62,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig do params( @@ -83,7 +83,7 @@ module OpenAI # # Configuring `{ "type": "json_schema" }` enables Structured Outputs, which # ensures the model will match your supplied JSON schema. Learn more in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # The default format is `{ "type": "text" }` with no additional options. # diff --git a/rbi/openai/models/responses/response_usage.rbi b/rbi/openai/models/responses/response_usage.rbi index e214d6aec..d2ac4f316 100644 --- a/rbi/openai/models/responses/response_usage.rbi +++ b/rbi/openai/models/responses/response_usage.rbi @@ -104,7 +104,7 @@ module OpenAI attr_accessor :cache_write_tokens # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(Integer) } attr_accessor :cached_tokens @@ -124,7 +124,7 @@ module OpenAI cache_write_tokens:, # The number of tokens that were retrieved from the cache. - # [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching). cached_tokens: ) diff --git a/rbi/openai/models/responses/responses_client_event.rbi b/rbi/openai/models/responses/responses_client_event.rbi index fc73f88e5..4d566be31 100644 --- a/rbi/openai/models/responses/responses_client_event.rbi +++ b/rbi/openai/models/responses/responses_client_event.rbi @@ -29,7 +29,7 @@ module OpenAI attr_accessor :type # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { returns(T.nilable(T::Boolean)) } attr_accessor :background @@ -71,11 +71,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants)) } attr_reader :input @@ -92,7 +92,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(Integer)) } attr_accessor :max_output_tokens @@ -115,8 +115,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. sig { returns( T.nilable( @@ -150,13 +150,13 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. sig { returns(T.nilable(String)) } attr_accessor :previous_response_id # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) } attr_reader :prompt @@ -165,7 +165,7 @@ module OpenAI # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } attr_accessor :prompt_cache_key @@ -176,7 +176,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions)) } attr_reader :prompt_cache_options @@ -194,7 +194,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -212,7 +212,7 @@ module OpenAI attr_accessor :prompt_cache_retention # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). sig { returns(T.nilable(OpenAI::Reasoning)) } attr_reader :reasoning @@ -224,7 +224,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_accessor :safety_identifier @@ -235,13 +235,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -258,7 +260,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). sig { returns(T.nilable(T::Boolean)) } attr_accessor :store @@ -266,7 +268,7 @@ module OpenAI # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. sig { returns(T.nilable(T::Boolean)) } attr_accessor :stream @@ -304,8 +306,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) sig { returns(T.nilable(OpenAI::Responses::ResponseTextConfig)) } attr_reader :text @@ -359,17 +361,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. sig { returns( @@ -454,7 +457,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). sig { returns(T.nilable(String)) } attr_reader :user @@ -577,7 +580,7 @@ module OpenAI def self.new( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. @@ -613,11 +616,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. @@ -629,7 +632,7 @@ module OpenAI # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a @@ -649,8 +652,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. @@ -661,17 +664,17 @@ module OpenAI # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -681,7 +684,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, @@ -690,7 +693,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -705,7 +708,7 @@ module OpenAI prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be @@ -713,7 +716,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. @@ -723,13 +726,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -745,14 +750,14 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # If set to true, the model response data will be streamed to the client as it is # generated using # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). # See the - # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming) + # [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) # for more information. stream: nil, @@ -775,8 +780,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a @@ -791,17 +796,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, @@ -830,7 +836,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # The type of the client event. Always `response.create`. @@ -991,11 +997,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) module Input extend OpenAI::Internal::Type::Union @@ -1344,7 +1350,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. sig do params( @@ -1462,7 +1468,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -1507,13 +1513,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show diff --git a/rbi/openai/models/responses/tool.rbi b/rbi/openai/models/responses/tool.rbi index 44a52cbfe..cb035d080 100644 --- a/rbi/openai/models/responses/tool.rbi +++ b/rbi/openai/models/responses/tool.rbi @@ -68,7 +68,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -136,7 +136,7 @@ module OpenAI # Give the model access to additional tools via remote Model Context Protocol # (MCP) servers. - # [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + # [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). sig do params( @@ -192,7 +192,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # @@ -356,7 +356,7 @@ module OpenAI # Identifier for service connectors, like those available in ChatGPT. One of # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about # service connectors - # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + # [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors). # # Currently supported `connector_id` values are: # diff --git a/rbi/openai/models/responses/tool_choice_types.rbi b/rbi/openai/models/responses/tool_choice_types.rbi index db8079e0e..72b243fcd 100644 --- a/rbi/openai/models/responses/tool_choice_types.rbi +++ b/rbi/openai/models/responses/tool_choice_types.rbi @@ -15,7 +15,7 @@ module OpenAI end # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -30,7 +30,7 @@ module OpenAI attr_accessor :type # Indicates that the model should use a built-in tool to generate a response. - # [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + # [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools). sig do params( @@ -41,7 +41,7 @@ module OpenAI def self.new( # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # @@ -66,7 +66,7 @@ module OpenAI end # The type of hosted tool the model should to use. Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # # Allowed values are: # diff --git a/rbi/openai/models/responses/web_search_preview_tool.rbi b/rbi/openai/models/responses/web_search_preview_tool.rbi index b42696c62..3b9bd7740 100644 --- a/rbi/openai/models/responses/web_search_preview_tool.rbi +++ b/rbi/openai/models/responses/web_search_preview_tool.rbi @@ -45,7 +45,7 @@ module OpenAI # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig do params( diff --git a/rbi/openai/models/responses/web_search_tool.rbi b/rbi/openai/models/responses/web_search_tool.rbi index 236443757..bb258d439 100644 --- a/rbi/openai/models/responses/web_search_tool.rbi +++ b/rbi/openai/models/responses/web_search_tool.rbi @@ -50,7 +50,7 @@ module OpenAI attr_writer :user_location # Search the Internet for sources related to the prompt. Learn more about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). sig do params( diff --git a/rbi/openai/models/upload.rbi b/rbi/openai/models/upload.rbi index 403687fe9..17d5e1dbf 100644 --- a/rbi/openai/models/upload.rbi +++ b/rbi/openai/models/upload.rbi @@ -37,7 +37,7 @@ module OpenAI attr_accessor :object # The intended purpose of the file. - # [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) + # [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) # for acceptable values. sig { returns(String) } attr_accessor :purpose @@ -95,7 +95,7 @@ module OpenAI filename:, # The intended purpose of the file. - # [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) + # [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) # for acceptable values. purpose:, diff --git a/rbi/openai/models/upload_create_params.rbi b/rbi/openai/models/upload_create_params.rbi index ed54d7191..d641c07d4 100644 --- a/rbi/openai/models/upload_create_params.rbi +++ b/rbi/openai/models/upload_create_params.rbi @@ -33,7 +33,7 @@ module OpenAI # The intended purpose of the uploaded file. # # See the - # [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). sig { returns(OpenAI::FilePurpose::OrSymbol) } attr_accessor :purpose @@ -79,7 +79,7 @@ module OpenAI # The intended purpose of the uploaded file. # # See the - # [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). purpose:, # The expiration policy for a file. By default, files with `purpose=batch` expire diff --git a/rbi/openai/models/vector_store_create_params.rbi b/rbi/openai/models/vector_store_create_params.rbi index 1483194ce..01e969d54 100644 --- a/rbi/openai/models/vector_store_create_params.rbi +++ b/rbi/openai/models/vector_store_create_params.rbi @@ -48,9 +48,9 @@ module OpenAI sig { params(expires_after: OpenAI::VectorStoreCreateParams::ExpiresAfter::OrHash).void } attr_writer :expires_after - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -108,9 +108,9 @@ module OpenAI # The expiration policy for a vector store. expires_after: nil, - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. file_ids: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful diff --git a/rbi/openai/models/vector_stores/file_batch_create_params.rbi b/rbi/openai/models/vector_stores/file_batch_create_params.rbi index 4ed97aa6d..de36b8ae2 100644 --- a/rbi/openai/models/vector_stores/file_batch_create_params.rbi +++ b/rbi/openai/models/vector_stores/file_batch_create_params.rbi @@ -48,12 +48,12 @@ module OpenAI } attr_writer :chunking_strategy - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. If `attributes` or `chunking_strategy` are provided, they will be applied - # to all files in the batch. The maximum batch size is 2000 files. This endpoint - # is recommended for multi-file ingestion and helps reduce per-vector-store write - # request pressure. Mutually exclusive with `files`. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. sig { returns(T.nilable(T::Array[String])) } attr_reader :file_ids @@ -107,12 +107,12 @@ module OpenAI # strategy. Only applicable if `file_ids` is non-empty. chunking_strategy: nil, - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. If `attributes` or `chunking_strategy` are provided, they will be applied - # to all files in the batch. The maximum batch size is 2000 files. This endpoint - # is recommended for multi-file ingestion and helps reduce per-vector-store write - # request pressure. Mutually exclusive with `files`. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. file_ids: nil, # A list of objects that each include a `file_id` plus optional `attributes` or @@ -164,10 +164,10 @@ module OpenAI ) end - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. sig { returns(String) } attr_accessor :file_id @@ -220,10 +220,10 @@ module OpenAI end def self.new( - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. file_id:, diff --git a/rbi/openai/models/vector_stores/file_create_params.rbi b/rbi/openai/models/vector_stores/file_create_params.rbi index 81b278437..17e9e52eb 100644 --- a/rbi/openai/models/vector_stores/file_create_params.rbi +++ b/rbi/openai/models/vector_stores/file_create_params.rbi @@ -20,10 +20,10 @@ module OpenAI sig { returns(String) } attr_accessor :vector_store_id - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. sig { returns(String) } attr_accessor :file_id @@ -78,10 +78,10 @@ module OpenAI vector_store_id:, - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. file_id:, diff --git a/rbi/openai/models/vector_stores/vector_store_file.rbi b/rbi/openai/models/vector_stores/vector_store_file.rbi index 3f0fdbfa3..b3747de09 100644 --- a/rbi/openai/models/vector_stores/vector_store_file.rbi +++ b/rbi/openai/models/vector_stores/vector_store_file.rbi @@ -48,8 +48,8 @@ module OpenAI attr_accessor :usage_bytes # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. sig { returns(String) } attr_accessor :vector_store_id @@ -126,8 +126,8 @@ module OpenAI usage_bytes:, # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. vector_store_id:, diff --git a/rbi/openai/models/vector_stores/vector_store_file_batch.rbi b/rbi/openai/models/vector_stores/vector_store_file_batch.rbi index f844a6e1d..86301f0dc 100644 --- a/rbi/openai/models/vector_stores/vector_store_file_batch.rbi +++ b/rbi/openai/models/vector_stores/vector_store_file_batch.rbi @@ -41,8 +41,8 @@ module OpenAI attr_accessor :status # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. sig { returns(String) } attr_accessor :vector_store_id @@ -81,8 +81,8 @@ module OpenAI status:, # The ID of the - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) - # that the [File](https://platform.openai.com/docs/api-reference/files) is + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores) + # that the [File](https://developers.openai.com/api/reference/resources/files) is # attached to. vector_store_id:, diff --git a/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi b/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi index 6870f1171..be9fc2f6d 100644 --- a/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +++ b/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi @@ -105,7 +105,9 @@ module OpenAI sig { returns(String) } attr_accessor :session_id - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. sig { returns(T::Array[OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader]) } attr_accessor :sip_headers @@ -125,7 +127,9 @@ module OpenAI # accepting or rejecting the call through the Live API. session_id:, - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. sip_headers: ) diff --git a/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi b/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi index 3799ed0b8..87ce99071 100644 --- a/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +++ b/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi @@ -107,7 +107,9 @@ module OpenAI sig { returns(String) } attr_accessor :call_id - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. sig { returns(T::Array[OpenAI::Webhooks::RealtimeCallIncomingWebhookEvent::Data::SipHeader]) } attr_accessor :sip_headers @@ -129,7 +131,9 @@ module OpenAI # Realtime or Live API. call_id:, - # Headers from the SIP Invite. + # Headers from the SIP INVITE, excluding SIP authorization headers. Retained + # names, values, repeated entries, and order are preserved. Treat these values as + # untrusted call metadata. sip_headers: ) diff --git a/rbi/openai/resources/admin/organization/audit_logs.rbi b/rbi/openai/resources/admin/organization/audit_logs.rbi index d9b18cf90..074fb0d8b 100644 --- a/rbi/openai/resources/admin/organization/audit_logs.rbi +++ b/rbi/openai/resources/admin/organization/audit_logs.rbi @@ -49,7 +49,7 @@ module OpenAI effective_at: nil, # Return only events with a `type` in one of these values. For example, # `project.created`. For all options, see the documentation for the - # [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object). + # [audit log object](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/audit_logs). event_types: nil, # A limit on the number of objects to be returned. Limit can range between 1 and # 100, and the default is 20. diff --git a/rbi/openai/resources/admin/organization/projects.rbi b/rbi/openai/resources/admin/organization/projects.rbi index ba4f19775..37a42efad 100644 --- a/rbi/openai/resources/admin/organization/projects.rbi +++ b/rbi/openai/resources/admin/organization/projects.rbi @@ -64,14 +64,14 @@ module OpenAI external_key_id: nil, # Create the project with the specified data residency region. Your organization # must have access to Data residency functionality in order to use. See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. Deprecated: # use `residency` instead. Do not provide both `geography` and `residency`. geography: nil, # Create the project with the specified residency configuration. Your organization # must have access to the requested residency configuration in order to use it. # See - # [data residency controls](https://platform.openai.com/docs/guides/your-data#data-residency-controls) + # [data residency controls](https://developers.openai.com/api/docs/guides/your-data#data-residency-controls) # to review the functionality and limitations of setting this field. residency: nil, request_options: {} diff --git a/rbi/openai/resources/admin/organization/projects/service_accounts.rbi b/rbi/openai/resources/admin/organization/projects/service_accounts.rbi index f568cdc7d..4ed651bff 100644 --- a/rbi/openai/resources/admin/organization/projects/service_accounts.rbi +++ b/rbi/openai/resources/admin/organization/projects/service_accounts.rbi @@ -21,6 +21,7 @@ module OpenAI project_id: String, name: String, create_service_account_only: T.nilable(T::Boolean), + expires_in_seconds: T.nilable(Integer), request_options: OpenAI::RequestOptions::OrHash ) .returns(OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse) @@ -32,6 +33,12 @@ module OpenAI name:, # Create the service account without default roles or an API key. create_service_account_only: nil, + # Number of seconds until the initial API key expires. If omitted or null, the key + # does not expire unless the effective organization or project policy requires an + # expiration. When a policy sets a maximum lifetime, this value must be provided + # and must not exceed that limit. A non-null value cannot be used when + # `create_service_account_only` is true. + expires_in_seconds: nil, request_options: {} ) end diff --git a/rbi/openai/resources/audio/speech.rbi b/rbi/openai/resources/audio/speech.rbi index 7fca80db6..47dd52c61 100644 --- a/rbi/openai/resources/audio/speech.rbi +++ b/rbi/openai/resources/audio/speech.rbi @@ -31,7 +31,8 @@ module OpenAI def create( # The text to generate audio for. The maximum length is 4096 characters. input:, - # One of the available [TTS models](https://platform.openai.com/docs/models#tts): + # One of the available + # [TTS models](https://developers.openai.com/api/docs/guides/text-to-speech): # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. model:, # The voice to use when generating the audio. Supported built-in voices are @@ -39,7 +40,7 @@ module OpenAI # `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the # voices are available in the - # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options). + # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). voice:, # Control the voice of your generated audio with additional instructions. Does not # work with `tts-1` or `tts-1-hd`. diff --git a/rbi/openai/resources/audio/transcriptions.rbi b/rbi/openai/resources/audio/transcriptions.rbi index 71b91eb98..bd0ed6dc0 100644 --- a/rbi/openai/resources/audio/transcriptions.rbi +++ b/rbi/openai/resources/audio/transcriptions.rbi @@ -89,7 +89,7 @@ module OpenAI languages: nil, # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should match the audio language. This field is not supported when using # `gpt-4o-transcribe-diarize`. prompt: nil, @@ -200,7 +200,7 @@ module OpenAI languages: nil, # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should match the audio language. This field is not supported when using # `gpt-4o-transcribe-diarize`. prompt: nil, diff --git a/rbi/openai/resources/audio/translations.rbi b/rbi/openai/resources/audio/translations.rbi index 034e6112e..332cf184a 100644 --- a/rbi/openai/resources/audio/translations.rbi +++ b/rbi/openai/resources/audio/translations.rbi @@ -35,7 +35,7 @@ module OpenAI model:, # An optional text to guide the model's style or continue a previous audio # segment. The - # [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) + # [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) # should be in English. prompt: nil, # The format of the output, in one of these options: `json`, `text`, `srt`, diff --git a/rbi/openai/resources/batches.rbi b/rbi/openai/resources/batches.rbi index f33432fa7..d8777874c 100644 --- a/rbi/openai/resources/batches.rbi +++ b/rbi/openai/resources/batches.rbi @@ -31,11 +31,12 @@ module OpenAI endpoint:, # The ID of an uploaded file that contains requests for the new batch. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your input file must be formatted as a - # [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), + # [JSONL file](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file), # and must be uploaded with the purpose `batch`. The file can contain up to 50,000 # requests, and can be up to 200 MB in size. input_file_id:, diff --git a/rbi/openai/resources/beta/assistants.rbi b/rbi/openai/resources/beta/assistants.rbi index 446c61b33..7763839df 100644 --- a/rbi/openai/resources/beta/assistants.rbi +++ b/rbi/openai/resources/beta/assistants.rbi @@ -41,10 +41,10 @@ module OpenAI } def create( # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The description of the assistant. The maximum length is 512 characters. description: nil, @@ -64,18 +64,18 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -170,10 +170,10 @@ module OpenAI # a maximum length of 512 characters. metadata: nil, # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model: nil, # The name of the assistant. The maximum length is 256 characters. name: nil, @@ -181,18 +181,18 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. diff --git a/rbi/openai/resources/beta/responses.rbi b/rbi/openai/resources/beta/responses.rbi index ed89e1137..b2360b15b 100644 --- a/rbi/openai/resources/beta/responses.rbi +++ b/rbi/openai/resources/beta/responses.rbi @@ -16,16 +16,16 @@ module OpenAI # See {OpenAI::Resources::Beta::Responses#stream_raw} for streaming counterpart. # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. sig { params( background: T.nilable(T::Boolean), @@ -96,7 +96,7 @@ module OpenAI } def create( # Body param: Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Body param: Context management configuration for this request. context_management: nil, @@ -129,11 +129,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # Body param: A system (or developer) message inserted into the model's context. # @@ -143,7 +143,7 @@ module OpenAI instructions: nil, # Body param: An upper bound for the number of tokens that can be generated for a # response, including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # Body param: The maximum number of total calls to built-in tools that can be # processed in a response. This maximum number applies across all built-in tool @@ -160,8 +160,8 @@ module OpenAI # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Body param: Configuration for running moderation on the input and output of this # response. @@ -172,15 +172,15 @@ module OpenAI parallel_tool_calls: nil, # Body param: The unique ID of the previous response to the model. Use this to # create multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Body param: Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Body param: Used by OpenAI to cache responses for similar requests to optimize # your cache hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Body param: Options for prompt caching. Supported for `gpt-5.6` and later # models. By default, OpenAI automatically chooses one implicit cache breakpoint. @@ -190,7 +190,7 @@ module OpenAI # conversation, without a content-block lookback limit. Set `mode` to `explicit` # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is # currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Body param: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -198,7 +198,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -212,14 +212,14 @@ module OpenAI # `prompt_cache_retention` is not specified. prompt_cache_retention: nil, # Body param: Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Body param: A stable identifier used to help detect users of your application # that may be violating OpenAI's usage policies. The IDs should be a string that # uniquely identifies each user, with a maximum length of 64 characters. We # recommend hashing their username or email address, in order to avoid sending us # any identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Body param: Specifies the processing type used for serving the request. # @@ -228,13 +228,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -249,7 +251,7 @@ module OpenAI # Body param: Whether to store the generated model response for later retrieval # via API. Defaults to true when omitted. If set to true, response data will be # stored for at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Body param: Options for streaming responses. Only set this when you set # `stream: true`. @@ -262,8 +264,8 @@ module OpenAI # Body param: Configuration options for a text response from the model. Can be # plain text or structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Body param: How the model should select which tool (or tools) to use when # generating a response. See the `tools` parameter to see how to specify which @@ -276,17 +278,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, # Body param: An integer between 0 and 20 specifying the maximum number of most @@ -314,7 +317,7 @@ module OpenAI # optimizations. A stable identifier for your end-users. Used to boost cache hit # rates by better bucketing similar requests and to help OpenAI detect and prevent # abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # Header param: Optional beta features to enable for this request. betas: nil, @@ -328,16 +331,16 @@ module OpenAI # See {OpenAI::Resources::Beta::Responses#create} for non-streaming counterpart. # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. sig { params( background: T.nilable(T::Boolean), @@ -412,7 +415,7 @@ module OpenAI } def stream_raw( # Body param: Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Body param: Context management configuration for this request. context_management: nil, @@ -445,11 +448,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # Body param: A system (or developer) message inserted into the model's context. # @@ -459,7 +462,7 @@ module OpenAI instructions: nil, # Body param: An upper bound for the number of tokens that can be generated for a # response, including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # Body param: The maximum number of total calls to built-in tools that can be # processed in a response. This maximum number applies across all built-in tool @@ -476,8 +479,8 @@ module OpenAI # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Body param: Configuration for running moderation on the input and output of this # response. @@ -488,15 +491,15 @@ module OpenAI parallel_tool_calls: nil, # Body param: The unique ID of the previous response to the model. Use this to # create multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Body param: Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Body param: Used by OpenAI to cache responses for similar requests to optimize # your cache hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Body param: Options for prompt caching. Supported for `gpt-5.6` and later # models. By default, OpenAI automatically chooses one implicit cache breakpoint. @@ -506,7 +509,7 @@ module OpenAI # conversation, without a content-block lookback limit. Set `mode` to `explicit` # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is # currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Body param: Deprecated. Use `prompt_cache_options.ttl` instead. @@ -514,7 +517,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -528,14 +531,14 @@ module OpenAI # `prompt_cache_retention` is not specified. prompt_cache_retention: nil, # Body param: Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Body param: A stable identifier used to help detect users of your application # that may be violating OpenAI's usage policies. The IDs should be a string that # uniquely identifies each user, with a maximum length of 64 characters. We # recommend hashing their username or email address, in order to avoid sending us # any identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Body param: Specifies the processing type used for serving the request. # @@ -544,13 +547,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -565,7 +570,7 @@ module OpenAI # Body param: Whether to store the generated model response for later retrieval # via API. Defaults to true when omitted. If set to true, response data will be # stored for at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Body param: Options for streaming responses. Only set this when you set # `stream: true`. @@ -578,8 +583,8 @@ module OpenAI # Body param: Configuration options for a text response from the model. Can be # plain text or structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Body param: How the model should select which tool (or tools) to use when # generating a response. See the `tools` parameter to see how to specify which @@ -592,17 +597,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, # Body param: An integer between 0 and 20 specifying the maximum number of most @@ -630,7 +636,7 @@ module OpenAI # optimizations. A stable identifier for your end-users. Used to boost cache hit # rates by better bucketing similar requests and to help OpenAI detect and prevent # abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # Header param: Optional beta features to enable for this request. betas: nil, @@ -746,7 +752,7 @@ module OpenAI # Cancels a model response with the given ID. Only responses created with the # `background` parameter set to `true` can be cancelled. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig { params( response_id: String, @@ -767,9 +773,9 @@ module OpenAI # Compact a conversation. Returns a compacted response object. # # Learn when and how to compact long-running conversations in the - # [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + # [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). # For ZDR-compatible compaction details, see - # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). sig { params( model: T.nilable(T.any(OpenAI::Beta::ResponseCompactParams::Model::OrSymbol, String)), @@ -789,8 +795,8 @@ module OpenAI # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Body param: Text, image, or file inputs to the model, used to generate a # response @@ -802,7 +808,7 @@ module OpenAI instructions: nil, # Body param: The unique ID of the previous response to the model. Use this to # create multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Body param: A key to use when reading from or writing to the prompt cache. @@ -815,7 +821,7 @@ module OpenAI # conversation, without a content-block lookback limit. Set `mode` to `explicit` # to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is # currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Body param: How long to retain a prompt cache entry created by this request. @@ -825,17 +831,17 @@ module OpenAI # in the Project settings. Unless otherwise configured, the Project will use # 'default'. - If set to 'default', then the request will be processed with the # standard pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. service_tier: nil, # Header param: Optional beta features to enable for this request. betas: nil, diff --git a/rbi/openai/resources/beta/responses/input_tokens.rbi b/rbi/openai/resources/beta/responses/input_tokens.rbi index 1e966321f..e65585217 100644 --- a/rbi/openai/resources/beta/responses/input_tokens.rbi +++ b/rbi/openai/resources/beta/responses/input_tokens.rbi @@ -82,8 +82,8 @@ module OpenAI # Body param: Model ID used to generate the response, like `gpt-4o` or `o3`. # OpenAI offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Body param: Whether to allow the model to run tool calls in parallel. parallel_tool_calls: nil, @@ -93,17 +93,17 @@ module OpenAI personality: nil, # Body param: The unique ID of the previous response to the model. Use this to # create multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Body param: **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Body param: Configuration options for a text response from the model. Can be # plain text or structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Body param: Controls which tool the model should use, if any. tool_choice: nil, diff --git a/rbi/openai/resources/beta/threads.rbi b/rbi/openai/resources/beta/threads.rbi index 8ddfc2a34..e5fc9458b 100644 --- a/rbi/openai/resources/beta/threads.rbi +++ b/rbi/openai/resources/beta/threads.rbi @@ -27,8 +27,9 @@ module OpenAI .returns(OpenAI::Beta::Thread) } def create( - # A list of [messages](https://platform.openai.com/docs/api-reference/messages) to - # start the thread with. + # A list of + # [messages](https://developers.openai.com/api/docs/assistants/migration) to start + # the thread with. messages: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and @@ -143,8 +144,8 @@ module OpenAI } def create_and_run( # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # Override the default system message of the assistant. This is useful for # modifying the behavior on a per-run basis. @@ -168,24 +169,25 @@ module OpenAI # Keys are strings with a maximum length of 64 characters. Values are strings with # a maximum length of 512 characters. metadata: nil, - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. model: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -282,8 +284,8 @@ module OpenAI } def stream_raw( # The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # Override the default system message of the assistant. This is useful for # modifying the behavior on a per-run basis. @@ -307,24 +309,25 @@ module OpenAI # Keys are strings with a maximum length of 64 characters. Values are strings with # a maximum length of 512 characters. metadata: nil, - # The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to - # be used to execute this run. If a value is provided here, it will override the - # model associated with the assistant. If not, the model associated with the - # assistant will be used. + # The ID of the + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model + # associated with the assistant. If not, the model associated with the assistant + # will be used. model: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. diff --git a/rbi/openai/resources/beta/threads/messages.rbi b/rbi/openai/resources/beta/threads/messages.rbi index 87894e93d..8bb6aff20 100644 --- a/rbi/openai/resources/beta/threads/messages.rbi +++ b/rbi/openai/resources/beta/threads/messages.rbi @@ -23,8 +23,9 @@ module OpenAI .returns(OpenAI::Beta::Threads::Message) } def create( - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # to create a message for. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to create + # a message for. thread_id, # The text contents of the message. content:, @@ -57,8 +58,9 @@ module OpenAI def retrieve( # The ID of the message to retrieve. message_id, - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # to which this message belongs. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this message belongs. thread_id:, request_options: {} ) @@ -104,8 +106,9 @@ module OpenAI .returns(OpenAI::Internal::CursorPage[OpenAI::Beta::Threads::Message]) } def list( - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # the messages belong to. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) the + # messages belong to. thread_id, # A cursor for use in pagination. `after` is an object ID that defines your place # in the list. For instance, if you make a list request and receive 100 objects, diff --git a/rbi/openai/resources/beta/threads/runs.rbi b/rbi/openai/resources/beta/threads/runs.rbi index 890068060..ebe887cae 100644 --- a/rbi/openai/resources/beta/threads/runs.rbi +++ b/rbi/openai/resources/beta/threads/runs.rbi @@ -69,8 +69,8 @@ module OpenAI # Path param: The ID of the thread to run. thread_id, # Body param: The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # Query param: A list of additional fields to include in the response. Currently # the only supported value is @@ -78,7 +78,7 @@ module OpenAI # search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, # Body param: Appends additional instructions at the end of the instructions for @@ -88,8 +88,8 @@ module OpenAI # Body param: Adds additional messages to the thread before creating the run. additional_messages: nil, # Body param: Overrides the - # [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - # of the assistant. This is useful for modifying the behavior on a per-run basis. + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. instructions: nil, # Body param: The maximum number of completion tokens that may be used over the # course of the run. The run will make a best effort to use only the number of @@ -111,31 +111,32 @@ module OpenAI # a maximum length of 512 characters. metadata: nil, # Body param: The ID of the - # [Model](https://platform.openai.com/docs/api-reference/models) to be used to - # execute this run. If a value is provided here, it will override the model + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model # associated with the assistant. If not, the model associated with the assistant # will be used. model: nil, # Body param: Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Body param: Constrains effort on reasoning for reasoning models. Currently # supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and # `max`. Reducing reasoning effort can result in faster responses and fewer tokens # used on reasoning in a response. Not all reasoning models support every value. - # See the [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Body param: Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -236,8 +237,8 @@ module OpenAI # Path param: The ID of the thread to run. thread_id, # Body param: The ID of the - # [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to - # execute this run. + # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use + # to execute this run. assistant_id:, # Query param: A list of additional fields to include in the response. Currently # the only supported value is @@ -245,7 +246,7 @@ module OpenAI # search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, # Body param: Appends additional instructions at the end of the instructions for @@ -255,8 +256,8 @@ module OpenAI # Body param: Adds additional messages to the thread before creating the run. additional_messages: nil, # Body param: Overrides the - # [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) - # of the assistant. This is useful for modifying the behavior on a per-run basis. + # [instructions](https://developers.openai.com/api/docs/assistants/migration) of + # the assistant. This is useful for modifying the behavior on a per-run basis. instructions: nil, # Body param: The maximum number of completion tokens that may be used over the # course of the run. The run will make a best effort to use only the number of @@ -278,31 +279,32 @@ module OpenAI # a maximum length of 512 characters. metadata: nil, # Body param: The ID of the - # [Model](https://platform.openai.com/docs/api-reference/models) to be used to - # execute this run. If a value is provided here, it will override the model + # [Model](https://developers.openai.com/api/reference/resources/models) to be used + # to execute this run. If a value is provided here, it will override the model # associated with the assistant. If not, the model associated with the assistant # will be used. model: nil, # Body param: Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Body param: Constrains effort on reasoning for reasoning models. Currently # supported values are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and # `max`. Reducing reasoning effort can result in faster responses and fewer tokens # used on reasoning in a response. Not all reasoning models support every value. - # See the [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # See the + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # Body param: Specifies the format that the model must output. Compatible with - # [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), - # [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), - # and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. + # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o), + # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and + # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`. # # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the # message the model generates is valid JSON. @@ -357,8 +359,9 @@ module OpenAI def retrieve( # The ID of the run to retrieve. run_id, - # The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) - # that was run. + # The ID of the + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. thread_id:, request_options: {} ) @@ -378,7 +381,8 @@ module OpenAI # Path param: The ID of the run to modify. run_id, # Path param: The ID of the - # [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + # [thread](https://developers.openai.com/api/docs/assistants/migration) that was + # run. thread_id:, # Body param: Set of 16 key-value pairs that can be attached to an object. This # can be useful for storing additional information about the object in a @@ -462,8 +466,8 @@ module OpenAI # Path param: The ID of the run that requires the tool output submission. run_id, # Path param: The ID of the - # [thread](https://platform.openai.com/docs/api-reference/threads) to which this - # run belongs. + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this run belongs. thread_id:, # Body param: A list of tools for which the outputs are being submitted. tool_outputs:, @@ -496,8 +500,8 @@ module OpenAI # Path param: The ID of the run that requires the tool output submission. run_id, # Path param: The ID of the - # [thread](https://platform.openai.com/docs/api-reference/threads) to which this - # run belongs. + # [thread](https://developers.openai.com/api/docs/assistants/migration) to which + # this run belongs. thread_id:, # Body param: A list of tools for which the outputs are being submitted. tool_outputs:, diff --git a/rbi/openai/resources/beta/threads/runs/steps.rbi b/rbi/openai/resources/beta/threads/runs/steps.rbi index c1155e9fb..997cacb48 100644 --- a/rbi/openai/resources/beta/threads/runs/steps.rbi +++ b/rbi/openai/resources/beta/threads/runs/steps.rbi @@ -36,7 +36,7 @@ module OpenAI # search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, request_options: {} @@ -78,7 +78,7 @@ module OpenAI # search result content. # # See the - # [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) + # [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) # for more information. include: nil, # Query param: A limit on the number of objects to be returned. Limit can range diff --git a/rbi/openai/resources/chat/completions.rbi b/rbi/openai/resources/chat/completions.rbi index 43708919c..ecf82d5ed 100644 --- a/rbi/openai/resources/chat/completions.rbi +++ b/rbi/openai/resources/chat/completions.rbi @@ -17,22 +17,22 @@ module OpenAI # See {OpenAI::Resources::Chat::Completions#stream_raw} for streaming counterpart. # # **Starting a new project?** We recommend trying - # [Responses](https://platform.openai.com/docs/api-reference/responses) to take - # advantage of the latest OpenAI platform features. Compare - # [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + # [Responses](https://developers.openai.com/api/reference/resources/responses) to + # take advantage of the latest OpenAI platform features. Compare + # [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). # # --- # # Creates a model response for the given chat conversation. Learn more in the - # [text generation](https://platform.openai.com/docs/guides/text-generation), - # [vision](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio) guides. + # [text generation](https://developers.openai.com/api/docs/guides/text), + # [vision](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio) guides. # # Parameter support can differ depending on the model used to generate the # response, particularly for newer reasoning models. Parameters that are only # supported for reasoning models are noted below. For the current state of # unsupported parameters in reasoning models, - # [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + # [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). # # Returns a chat completion object, or a streamed sequence of chat completion # chunk objects if the request is streamed. @@ -109,21 +109,21 @@ module OpenAI end def create( # A list of messages comprising the conversation so far. Depending on the - # [model](https://platform.openai.com/docs/models) you use, different message - # types (modalities) are supported, like - # [text](https://platform.openai.com/docs/guides/text-generation), - # [images](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio). + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). messages:, # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # Number between -2.0 and 2.0. Positive values penalize new tokens based on their # existing frequency in the text so far, decreasing the model's likelihood to @@ -163,15 +163,15 @@ module OpenAI logprobs: nil, # An upper bound for the number of tokens that can be generated for a completion, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_completion_tokens: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the chat - # completion. This value can be used to control + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control # [costs](https://openai.com/api/pricing/) for text generated via API. # # This value is now deprecated in favor of `max_completion_tokens`, and is not # compatible with - # [o-series models](https://platform.openai.com/docs/guides/reasoning). + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). max_tokens: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and @@ -186,8 +186,8 @@ module OpenAI # `["text"]` # # The `gpt-4o-audio-preview` model can also be used to - # [generate audio](https://platform.openai.com/docs/guides/audio). To request that - # this model generate both text and audio responses, you can use: + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: # # `["text", "audio"]` modalities: nil, @@ -198,7 +198,7 @@ module OpenAI # choices. Keep `n` as `1` to minimize costs. n: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Static predicted output content, such as the content of a text file that is @@ -210,7 +210,7 @@ module OpenAI presence_penalty: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -219,7 +219,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Deprecated. Use `prompt_cache_options.ttl` instead. @@ -227,7 +227,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -244,7 +244,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # An object specifying the format that the model must output. @@ -252,7 +252,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -263,7 +263,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # This feature is in Beta. If specified, our system will make a best effort to # sample deterministically, such that repeated requests with the same `seed` and @@ -278,13 +278,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -298,8 +300,9 @@ module OpenAI # returned text will not contain the stop sequence. stop: nil, # Whether or not to store the output of this chat completion request for use in - # our [model distillation](https://platform.openai.com/docs/guides/distillation) - # or [evals](https://platform.openai.com/docs/guides/evals) products. + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. # # Supports text and image inputs. Note: image inputs over 8MB will be dropped. store: nil, @@ -321,8 +324,9 @@ module OpenAI # are present. tool_choice: nil, # A list of tools the model may call. You can provide either - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - # or [function tools](https://platform.openai.com/docs/guides/function-calling). + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens # to return at each token position, each with an associated log probability. In @@ -339,7 +343,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose @@ -348,7 +352,7 @@ module OpenAI verbosity: nil, # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). web_search_options: nil, # There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create` # for streaming and non-streaming use cases, respectively. @@ -360,22 +364,22 @@ module OpenAI # See {OpenAI::Resources::Chat::Completions#create} for non-streaming counterpart. # # **Starting a new project?** We recommend trying - # [Responses](https://platform.openai.com/docs/api-reference/responses) to take - # advantage of the latest OpenAI platform features. Compare - # [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses). + # [Responses](https://developers.openai.com/api/reference/resources/responses) to + # take advantage of the latest OpenAI platform features. Compare + # [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses). # # --- # # Creates a model response for the given chat conversation. Learn more in the - # [text generation](https://platform.openai.com/docs/guides/text-generation), - # [vision](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio) guides. + # [text generation](https://developers.openai.com/api/docs/guides/text), + # [vision](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio) guides. # # Parameter support can differ depending on the model used to generate the # response, particularly for newer reasoning models. Parameters that are only # supported for reasoning models are noted below. For the current state of # unsupported parameters in reasoning models, - # [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + # [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning). # # Returns a chat completion object, or a streamed sequence of chat completion # chunk objects if the request is streamed. @@ -447,21 +451,21 @@ module OpenAI end def stream_raw( # A list of messages comprising the conversation so far. Depending on the - # [model](https://platform.openai.com/docs/models) you use, different message - # types (modalities) are supported, like - # [text](https://platform.openai.com/docs/guides/text-generation), - # [images](https://platform.openai.com/docs/guides/vision), and - # [audio](https://platform.openai.com/docs/guides/audio). + # [model](https://developers.openai.com/api/docs/models) you use, different + # message types (modalities) are supported, like + # [text](https://developers.openai.com/api/docs/guides/text), + # [images](https://developers.openai.com/api/docs/guides/images-vision), and + # [audio](https://developers.openai.com/api/docs/guides/audio). messages:, # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI # offers a wide range of models with different capabilities, performance # characteristics, and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Parameters for audio output. Required when audio output is requested with # `modalities: ["audio"]`. - # [Learn more](https://platform.openai.com/docs/guides/audio). + # [Learn more](https://developers.openai.com/api/docs/guides/audio). audio: nil, # Number between -2.0 and 2.0. Positive values penalize new tokens based on their # existing frequency in the text so far, decreasing the model's likelihood to @@ -501,15 +505,15 @@ module OpenAI logprobs: nil, # An upper bound for the number of tokens that can be generated for a completion, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_completion_tokens: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the chat - # completion. This value can be used to control + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the chat completion. This value can be used to control # [costs](https://openai.com/api/pricing/) for text generated via API. # # This value is now deprecated in favor of `max_completion_tokens`, and is not # compatible with - # [o-series models](https://platform.openai.com/docs/guides/reasoning). + # [o-series models](https://developers.openai.com/api/docs/guides/reasoning). max_tokens: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and @@ -524,8 +528,8 @@ module OpenAI # `["text"]` # # The `gpt-4o-audio-preview` model can also be used to - # [generate audio](https://platform.openai.com/docs/guides/audio). To request that - # this model generate both text and audio responses, you can use: + # [generate audio](https://developers.openai.com/api/docs/guides/audio). To + # request that this model generate both text and audio responses, you can use: # # `["text", "audio"]` modalities: nil, @@ -536,7 +540,7 @@ module OpenAI # choices. Keep `n` as `1` to minimize costs. n: nil, # Whether to enable - # [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) + # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling) # during tool use. parallel_tool_calls: nil, # Static predicted output content, such as the content of a text file that is @@ -548,7 +552,7 @@ module OpenAI presence_penalty: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -557,7 +561,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Deprecated. Use `prompt_cache_options.ttl` instead. @@ -565,7 +569,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -582,7 +586,7 @@ module OpenAI # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing # reasoning effort can result in faster responses and fewer tokens used on # reasoning in a response. Not all reasoning models support every value. See the - # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for + # [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for # model-specific support. reasoning_effort: nil, # An object specifying the format that the model must output. @@ -590,7 +594,7 @@ module OpenAI # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured # Outputs which ensures the model will match your supplied JSON schema. Learn more # in the - # [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). # # Setting to `{ "type": "json_object" }` enables the older JSON mode, which # ensures the message the model generates is valid JSON. Using `json_schema` is @@ -601,7 +605,7 @@ module OpenAI # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # This feature is in Beta. If specified, our system will make a best effort to # sample deterministically, such that repeated requests with the same `seed` and @@ -616,13 +620,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - When not set, the default behavior is 'auto'. # # When the `service_tier` parameter is set, the response body will include the @@ -636,8 +642,9 @@ module OpenAI # returned text will not contain the stop sequence. stop: nil, # Whether or not to store the output of this chat completion request for use in - # our [model distillation](https://platform.openai.com/docs/guides/distillation) - # or [evals](https://platform.openai.com/docs/guides/evals) products. + # our + # [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model) + # or [evals](https://developers.openai.com/api/docs/guides/evals) products. # # Supports text and image inputs. Note: image inputs over 8MB will be dropped. store: nil, @@ -659,8 +666,9 @@ module OpenAI # are present. tool_choice: nil, # A list of tools the model may call. You can provide either - # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) - # or [function tools](https://platform.openai.com/docs/guides/function-calling). + # [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) + # or + # [function tools](https://developers.openai.com/api/docs/guides/function-calling). tools: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens # to return at each token position, each with an associated log probability. In @@ -677,7 +685,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose @@ -686,7 +694,7 @@ module OpenAI verbosity: nil, # This tool searches the web for relevant results to use in a response. Learn more # about the - # [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + # [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). web_search_options: nil, # There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create` # for streaming and non-streaming use cases, respectively. diff --git a/rbi/openai/resources/completions.rbi b/rbi/openai/resources/completions.rbi index 18da131ab..a946445e6 100644 --- a/rbi/openai/resources/completions.rbi +++ b/rbi/openai/resources/completions.rbi @@ -39,10 +39,10 @@ module OpenAI } def create( # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The prompt(s) to generate completions for, encoded as a string, array of # strings, array of tokens, or array of token arrays. @@ -67,17 +67,18 @@ module OpenAI # existing frequency in the text so far, decreasing the model's likelihood to # repeat the same line verbatim. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) frequency_penalty: nil, # Modify the likelihood of specified tokens appearing in the completion. # # Accepts a JSON object that maps tokens (specified by their token ID in the GPT # tokenizer) to an associated bias value from -100 to 100. You can use this - # [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - # Mathematically, the bias is added to the logits generated by the model prior to - # sampling. The exact effect will vary per model, but values between -1 and 1 - # should decrease or increase likelihood of selection; values like -100 or 100 - # should result in a ban or exclusive selection of the relevant token. + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token # from being generated. @@ -89,8 +90,8 @@ module OpenAI # # The maximum value for `logprobs` is 5. logprobs: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the - # completion. + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # # The token count of your prompt plus `max_tokens` cannot exceed the model's # context length. @@ -107,7 +108,7 @@ module OpenAI # whether they appear in the text so far, increasing the model's likelihood to # talk about new topics. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) presence_penalty: nil, # If specified, our system will make a best effort to sample deterministically, # such that repeated requests with the same `seed` and parameters should return @@ -141,7 +142,7 @@ module OpenAI top_p: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#create_streaming` or # `#create` for streaming and non-streaming use cases, respectively. @@ -182,10 +183,10 @@ module OpenAI } def create_streaming( # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The prompt(s) to generate completions for, encoded as a string, array of # strings, array of tokens, or array of token arrays. @@ -210,17 +211,18 @@ module OpenAI # existing frequency in the text so far, decreasing the model's likelihood to # repeat the same line verbatim. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) frequency_penalty: nil, # Modify the likelihood of specified tokens appearing in the completion. # # Accepts a JSON object that maps tokens (specified by their token ID in the GPT # tokenizer) to an associated bias value from -100 to 100. You can use this - # [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. - # Mathematically, the bias is added to the logits generated by the model prior to - # sampling. The exact effect will vary per model, but values between -1 and 1 - # should decrease or increase likelihood of selection; values like -100 or 100 - # should result in a ban or exclusive selection of the relevant token. + # [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text + # to token IDs. Mathematically, the bias is added to the logits generated by the + # model prior to sampling. The exact effect will vary per model, but values + # between -1 and 1 should decrease or increase likelihood of selection; values + # like -100 or 100 should result in a ban or exclusive selection of the relevant + # token. # # As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token # from being generated. @@ -232,8 +234,8 @@ module OpenAI # # The maximum value for `logprobs` is 5. logprobs: nil, - # The maximum number of [tokens](/tokenizer) that can be generated in the - # completion. + # The maximum number of [tokens](https://platform.openai.com/tokenizer) that can + # be generated in the completion. # # The token count of your prompt plus `max_tokens` cannot exceed the model's # context length. @@ -250,7 +252,7 @@ module OpenAI # whether they appear in the text so far, increasing the model's likelihood to # talk about new topics. # - # [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation) + # [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text) presence_penalty: nil, # If specified, our system will make a best effort to sample deterministically, # such that repeated requests with the same `seed` and parameters should return @@ -284,7 +286,7 @@ module OpenAI top_p: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#create_streaming` or # `#create` for streaming and non-streaming use cases, respectively. diff --git a/rbi/openai/resources/content_provenance_checks.rbi b/rbi/openai/resources/content_provenance_checks.rbi index 4c5001849..dc55483b2 100644 --- a/rbi/openai/resources/content_provenance_checks.rbi +++ b/rbi/openai/resources/content_provenance_checks.rbi @@ -6,7 +6,7 @@ module OpenAI class ContentProvenanceChecks # Check whether an image or audio file contains known OpenAI provenance signals. - # [Learn more about content provenance](/api/docs/guides/content-provenance). + # [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance). # # If `not_detected`, it means the tool did not find supported signals in the # uploaded file. The content could still have been generated by OpenAI if the diff --git a/rbi/openai/resources/conversations/items.rbi b/rbi/openai/resources/conversations/items.rbi index fff63736c..8b86d536e 100644 --- a/rbi/openai/resources/conversations/items.rbi +++ b/rbi/openai/resources/conversations/items.rbi @@ -62,7 +62,7 @@ module OpenAI items:, # Query param: Additional fields to include in the response. See the `include` # parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. include: nil, request_options: {} @@ -86,7 +86,7 @@ module OpenAI conversation_id:, # Query param: Additional fields to include in the response. See the `include` # parameter for - # [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) + # [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29) # for more information. include: nil, request_options: {} diff --git a/rbi/openai/resources/embeddings.rbi b/rbi/openai/resources/embeddings.rbi index 4913af0c3..cf9b6f775 100644 --- a/rbi/openai/resources/embeddings.rbi +++ b/rbi/openai/resources/embeddings.rbi @@ -31,10 +31,10 @@ module OpenAI # request. input:, # ID of the model to use. You can use the - # [List models](https://platform.openai.com/docs/api-reference/models/list) API to - # see all of your available models, or see our - # [Model overview](https://platform.openai.com/docs/models) for descriptions of - # them. + # [List models](https://developers.openai.com/api/reference/resources/models/methods/list) + # API to see all of your available models, or see our + # [Model overview](https://developers.openai.com/api/docs/models) for descriptions + # of them. model:, # The number of dimensions the resulting output embeddings should have. Only # supported in `text-embedding-3` and later models. @@ -44,7 +44,7 @@ module OpenAI encoding_format: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} ) diff --git a/rbi/openai/resources/evals.rbi b/rbi/openai/resources/evals.rbi index 6ce80f47e..d8ed3da21 100644 --- a/rbi/openai/resources/evals.rbi +++ b/rbi/openai/resources/evals.rbi @@ -15,7 +15,7 @@ module OpenAI # data source, which dictates the schema of the data used in the evaluation. After # creating an evaluation, you can run it on different models and model parameters. # We support several types of graders and datasources. For more information, see - # the [Evals guide](https://platform.openai.com/docs/guides/evals). + # the [Evals guide](https://developers.openai.com/api/docs/guides/evals). sig { params( data_source_config: T.any( diff --git a/rbi/openai/resources/files.rbi b/rbi/openai/resources/files.rbi index 5eebdb311..8cddc023a 100644 --- a/rbi/openai/resources/files.rbi +++ b/rbi/openai/resources/files.rbi @@ -14,20 +14,20 @@ module OpenAI # # - The Assistants API supports files up to 2 million tokens and of specific file # types. See the - # [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) + # [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) # for details. # - The Fine-tuning API only supports `.jsonl` files. The input also has certain # required formats for fine-tuning - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # or - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # models. # - The Batch API only supports `.jsonl` files up to 200 MB in size. The input # also has a specific required - # [format](https://platform.openai.com/docs/api-reference/batch/request-input). + # [format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file). # - For Retrieval or `file_search` ingestion, upload files here first. If you need # to attach multiple uploaded files to the same vector store, use - # [`/vector_stores/{vector_store_id}/file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # instead of attaching them one by one. Vector store attachment has separate # limits from file upload, including 2,000 attached files per minute per # organization. diff --git a/rbi/openai/resources/fine_tuning/alpha/graders.rbi b/rbi/openai/resources/fine_tuning/alpha/graders.rbi index 1f6d10622..a25cd3014 100644 --- a/rbi/openai/resources/fine_tuning/alpha/graders.rbi +++ b/rbi/openai/resources/fine_tuning/alpha/graders.rbi @@ -31,13 +31,14 @@ module OpenAI grader:, # The model sample to be evaluated. This value will be used to populate the # `sample` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. - # The `output_json` variable will be populated if the model sample is a valid JSON - # string. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. The `output_json` variable will be populated if the model sample is a + # valid JSON string. model_sample:, # The dataset item provided to the grader. This will be used to populate the # `item` namespace. See - # [the guide](https://platform.openai.com/docs/guides/graders) for more details. + # [the guide](https://developers.openai.com/api/docs/guides/graders) for more + # details. item: nil, request_options: {} ) diff --git a/rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi b/rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi index 145f3bbf0..915ee2283 100644 --- a/rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi +++ b/rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi @@ -10,7 +10,8 @@ module OpenAI # Manage fine-tuning jobs to tailor a model to your specific training data. class Permissions - # **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** Calling this endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # This enables organization owners to share fine-tuned models with other projects # in their organization. @@ -31,7 +32,8 @@ module OpenAI ) end - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to view all permissions for a # fine-tuned model checkpoint. @@ -61,7 +63,8 @@ module OpenAI ) end - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to view all permissions for a # fine-tuned model checkpoint. @@ -95,7 +98,8 @@ module OpenAI ) end - # **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). + # **NOTE:** This endpoint requires an + # [admin API key](https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/admin_api_keys). # # Organization owners can use this endpoint to delete a permission for a # fine-tuned model checkpoint. diff --git a/rbi/openai/resources/fine_tuning/jobs.rbi b/rbi/openai/resources/fine_tuning/jobs.rbi index 639c8e625..f1aefabd4 100644 --- a/rbi/openai/resources/fine_tuning/jobs.rbi +++ b/rbi/openai/resources/fine_tuning/jobs.rbi @@ -18,7 +18,7 @@ module OpenAI # Response includes details of the enqueued job including job status and the name # of the fine-tuned models once complete. # - # [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + # [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) sig { params( model: T.any(String, OpenAI::FineTuning::JobCreateParams::Model::OrSymbol), @@ -36,25 +36,26 @@ module OpenAI } def create( # The name of the model to fine-tune. You can select one of the - # [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned). + # [supported models](https://developers.openai.com/api/docs/guides/model-optimization#fine-tuning-methods). model:, # The ID of an uploaded file that contains training data. # - # See [upload file](https://platform.openai.com/docs/api-reference/files/create) + # See + # [upload file](https://developers.openai.com/api/reference/resources/files/methods/create) # for how to upload a file. # # Your dataset must be formatted as a JSONL file. Additionally, you must upload # your file with the purpose `fine-tune`. # # The contents of the file should differ depending on if the model uses the - # [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), - # [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) + # [chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data), + # [completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) # format, or if the fine-tuning method uses the - # [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) + # [preference](https://developers.openai.com/api/docs/guides/direct-preference-optimization) # format. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. training_file:, # The hyperparameters used for the fine-tuning job. This value is now deprecated @@ -92,7 +93,7 @@ module OpenAI # the purpose `fine-tune`. # # See the - # [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) + # [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) # for more details. validation_file: nil, request_options: {} @@ -101,7 +102,7 @@ module OpenAI # Get info about a fine-tuning job. # - # [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + # [Learn more about fine-tuning](https://developers.openai.com/api/docs/guides/model-optimization) sig { params(fine_tuning_job_id: String, request_options: OpenAI::RequestOptions::OrHash).returns( OpenAI::FineTuning::FineTuningJob diff --git a/rbi/openai/resources/images.rbi b/rbi/openai/resources/images.rbi index 9961eca6f..3bf0ea50f 100644 --- a/rbi/openai/resources/images.rbi +++ b/rbi/openai/resources/images.rbi @@ -41,7 +41,7 @@ module OpenAI size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, request_options: {} ) @@ -165,7 +165,7 @@ module OpenAI size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or # `#edit` for streaming and non-streaming use cases, respectively. @@ -292,7 +292,7 @@ module OpenAI size: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or # `#edit` for streaming and non-streaming use cases, respectively. @@ -304,7 +304,7 @@ module OpenAI # See {OpenAI::Resources::Images#generate_stream_raw} for streaming counterpart. # # Creates an image given a prompt. - # [Learn more](https://platform.openai.com/docs/guides/images). + # [Learn more](https://developers.openai.com/api/docs/guides/images-vision). sig { params( prompt: String, @@ -403,7 +403,7 @@ module OpenAI style: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or # `#generate` for streaming and non-streaming use cases, respectively. @@ -415,7 +415,7 @@ module OpenAI # See {OpenAI::Resources::Images#generate} for non-streaming counterpart. # # Creates an image given a prompt. - # [Learn more](https://platform.openai.com/docs/guides/images). + # [Learn more](https://developers.openai.com/api/docs/guides/images-vision). sig { params( prompt: String, @@ -514,7 +514,7 @@ module OpenAI style: nil, # A unique identifier representing your end-user, which can help OpenAI to monitor # and detect abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or # `#generate` for streaming and non-streaming use cases, respectively. diff --git a/rbi/openai/resources/moderations.rbi b/rbi/openai/resources/moderations.rbi index c0486af2b..7604b6e3f 100644 --- a/rbi/openai/resources/moderations.rbi +++ b/rbi/openai/resources/moderations.rbi @@ -8,7 +8,8 @@ module OpenAI class Moderations # Classifies if text and/or image inputs are potentially harmful. Learn more in - # the [moderation guide](https://platform.openai.com/docs/guides/moderation). + # the + # [moderation guide](https://developers.openai.com/api/docs/guides/moderation). sig { params( input: OpenAI::ModerationCreateParams::Input::Variants, @@ -22,9 +23,9 @@ module OpenAI # an array of multi-modal input objects similar to other models. input:, # The content moderation model you would like to use. Learn more in - # [the moderation guide](https://platform.openai.com/docs/guides/moderation), and - # learn about available models - # [here](https://platform.openai.com/docs/models#moderation). + # [the moderation guide](https://developers.openai.com/api/docs/guides/moderation), + # and learn about available models + # [here](https://developers.openai.com/api/docs/guides/moderation). model: nil, request_options: {} ) diff --git a/rbi/openai/resources/realtime/calls.rbi b/rbi/openai/resources/realtime/calls.rbi index dd75e9fdc..a66d44b3b 100644 --- a/rbi/openai/resources/realtime/calls.rbi +++ b/rbi/openai/resources/realtime/calls.rbi @@ -63,7 +63,7 @@ module OpenAI } def accept( # The identifier for the call provided in the - # [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) # webhook. call_id, # Configuration for input and output audio. @@ -100,7 +100,7 @@ module OpenAI # reasoning Realtime models such as `gpt-realtime-2`. parallel_tool_calls: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`. reasoning: nil, @@ -146,10 +146,10 @@ module OpenAI sig { params(call_id: String, request_options: OpenAI::RequestOptions::OrHash).void } def hangup( # The identifier for the call. For SIP calls, use the value provided in the - # [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) # webhook. For WebRTC sessions, reuse the call ID returned in the `Location` # header when creating the call with - # [`POST /v1/realtime/calls`](https://platform.openai.com/docs/api-reference/realtime/create-call). + # [`POST /v1/realtime/calls`](https://developers.openai.com/api/reference/resources/realtime/subresources/calls/methods/create). call_id, request_options: {} ) @@ -159,7 +159,7 @@ module OpenAI sig { params(call_id: String, target_uri: String, request_options: OpenAI::RequestOptions::OrHash).void } def refer( # The identifier for the call provided in the - # [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) # webhook. call_id, # URI that should appear in the SIP Refer-To header. Supports values like @@ -173,7 +173,7 @@ module OpenAI sig { params(call_id: String, status_code: Integer, request_options: OpenAI::RequestOptions::OrHash).void } def reject( # The identifier for the call provided in the - # [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook-events/realtime/call/incoming) + # [`realtime.call.incoming`](https://developers.openai.com/api/reference/resources/webhooks#realtime.call.incoming) # webhook. call_id, # SIP response code to send back to the caller. Defaults to `603` (Decline) when diff --git a/rbi/openai/resources/realtime/client_secrets.rbi b/rbi/openai/resources/realtime/client_secrets.rbi index 2424bf378..07554aac7 100644 --- a/rbi/openai/resources/realtime/client_secrets.rbi +++ b/rbi/openai/resources/realtime/client_secrets.rbi @@ -18,7 +18,7 @@ module OpenAI # will be applied to any sessions created using that client secret, but these can # also be overridden by the client connection. # - # [Learn more about authentication with client secrets over WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + # [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc). # # Returns the created client secret and the effective session object. The client # secret is a string that looks like `ek_1234`. diff --git a/rbi/openai/resources/responses.rbi b/rbi/openai/resources/responses.rbi index af91719e9..1c72bae55 100644 --- a/rbi/openai/resources/responses.rbi +++ b/rbi/openai/resources/responses.rbi @@ -14,16 +14,16 @@ module OpenAI # See {OpenAI::Resources::Responses#stream_raw} for streaming counterpart. # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. sig do params( background: T.nilable(T::Boolean), @@ -95,7 +95,7 @@ module OpenAI end def create( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. context_management: nil, @@ -127,11 +127,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. # @@ -141,7 +141,7 @@ module OpenAI instructions: nil, # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a # response. This maximum number applies across all built-in tool calls, not per @@ -158,8 +158,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. moderation: nil, @@ -167,15 +167,15 @@ module OpenAI parallel_tool_calls: nil, # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -184,7 +184,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Deprecated. Use `prompt_cache_options.ttl` instead. @@ -192,7 +192,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -206,14 +206,14 @@ module OpenAI # `prompt_cache_retention` is not specified. prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be # violating OpenAI's usage policies. The IDs should be a string that uniquely # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. # @@ -222,13 +222,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -243,7 +245,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Options for streaming responses. Only set this when you set `stream: true`. stream_options: nil, @@ -255,8 +257,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a # response. See the `tools` parameter to see how to specify which tools the model @@ -269,17 +271,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -304,7 +307,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create` # for streaming and non-streaming use cases, respectively. @@ -316,16 +319,16 @@ module OpenAI # See {OpenAI::Resources::Responses#create} for non-streaming counterpart. # # Creates a model response. Provide - # [text](https://platform.openai.com/docs/guides/text) or - # [image](https://platform.openai.com/docs/guides/images) inputs to generate - # [text](https://platform.openai.com/docs/guides/text) or - # [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have - # the model call your own - # [custom code](https://platform.openai.com/docs/guides/function-calling) or use - # built-in [tools](https://platform.openai.com/docs/guides/tools) like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search) to use - # your own data as input for the model's response. + # [text](https://developers.openai.com/api/docs/guides/text) or + # [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to + # generate [text](https://developers.openai.com/api/docs/guides/text) or + # [JSON](https://developers.openai.com/api/docs/guides/structured-outputs) + # outputs. Have the model call your own + # [custom code](https://developers.openai.com/api/docs/guides/function-calling) or + # use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search) + # to use your own data as input for the model's response. sig do params( background: T.nilable(T::Boolean), @@ -403,7 +406,7 @@ module OpenAI end def stream_raw( # Whether to run the model response in the background. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). background: nil, # Context management configuration for this request. context_management: nil, @@ -435,11 +438,11 @@ module OpenAI # # Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Image inputs](https://platform.openai.com/docs/guides/images) - # - [File inputs](https://platform.openai.com/docs/guides/pdf-files) - # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state) - # - [Function calling](https://platform.openai.com/docs/guides/function-calling) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision) + # - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs) + # - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state) + # - [Function calling](https://developers.openai.com/api/docs/guides/function-calling) input: nil, # A system (or developer) message inserted into the model's context. # @@ -449,7 +452,7 @@ module OpenAI instructions: nil, # An upper bound for the number of tokens that can be generated for a response, # including visible output tokens and - # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). + # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning). max_output_tokens: nil, # The maximum number of total calls to built-in tools that can be processed in a # response. This maximum number applies across all built-in tool calls, not per @@ -466,8 +469,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Configuration for running moderation on the input and output of this response. moderation: nil, @@ -475,15 +478,15 @@ module OpenAI parallel_tool_calls: nil, # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # Reference to a prompt template and its variables. - # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + # [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). prompt: nil, # Used by OpenAI to cache responses for similar requests to optimize your cache # hit rates. Replaces the `user` field. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching). prompt_cache_key: nil, # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -492,7 +495,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # Deprecated. Use `prompt_cache_options.ttl` instead. @@ -500,7 +503,7 @@ module OpenAI # The retention policy for the prompt cache. Set to `24h` to enable extended # prompt caching, which keeps cached prefixes active for longer, up to a maximum # of 24 hours. - # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + # [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention). # This field expresses a maximum retention policy, while # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future @@ -514,14 +517,14 @@ module OpenAI # `prompt_cache_retention` is not specified. prompt_cache_retention: nil, # Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # A stable identifier used to help detect users of your application that may be # violating OpenAI's usage policies. The IDs should be a string that uniquely # identifies each user, with a maximum length of 64 characters. We recommend # hashing their username or email address, in order to avoid sending us any # identifying information. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). safety_identifier: nil, # Specifies the processing type used for serving the request. # @@ -530,13 +533,15 @@ module OpenAI # will use 'default'. # - If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)', - # then the request will be processed with the Flex Processing service tier. - # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level, - # include the `service_tier=fast` or `service_tier=priority` parameter for - # Responses or Chat Completions. The response will show `service_tier=priority` - # regardless of if you specify `service_tier=fast` or `priority` in your - # request. + # - If set to + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. + # - To opt-in to + # [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. The response will show + # `service_tier=priority` regardless of if you specify `service_tier=fast` or + # `priority` in your request. # - If set to 'ultrafast', then the request will be processed with the # access-controlled Ultrafast Processing service tier. This tier is currently # available for `gpt-5.6-sol`; a response served through it will show @@ -551,7 +556,7 @@ module OpenAI # Whether to store the generated model response for later retrieval via API. # Defaults to true when omitted. If set to true, response data will be stored for # at least 30 days, subject to the - # [data retention exceptions](/api/docs/guides/your-data#v1responses). + # [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). store: nil, # Options for streaming responses. Only set this when you set `stream: true`. stream_options: nil, @@ -563,8 +568,8 @@ module OpenAI # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # How the model should select which tool (or tools) to use when generating a # response. See the `tools` parameter to see how to specify which tools the model @@ -577,17 +582,18 @@ module OpenAI # # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's # capabilities, like - # [web search](https://platform.openai.com/docs/guides/tools-web-search) or - # [file search](https://platform.openai.com/docs/guides/tools-file-search). + # [web search](https://developers.openai.com/api/docs/guides/tools-web-search) + # or + # [file search](https://developers.openai.com/api/docs/guides/tools-file-search). # Learn more about - # [built-in tools](https://platform.openai.com/docs/guides/tools). + # [built-in tools](https://developers.openai.com/api/docs/guides/tools). # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or # predefined connectors such as Google Drive and SharePoint. Learn more about - # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp). + # [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp). # - **Function calls (custom tools)**: Functions that are defined by you, enabling # the model to call your own code with strongly typed arguments and outputs. # Learn more about - # [function calling](https://platform.openai.com/docs/guides/function-calling). + # [function calling](https://developers.openai.com/api/docs/guides/function-calling). # You can also use custom tools to call your own code. tools: nil, # An integer between 0 and 20 specifying the maximum number of most likely tokens @@ -612,7 +618,7 @@ module OpenAI # `prompt_cache_key` instead to maintain caching optimizations. A stable # identifier for your end-users. Used to boost cache hit rates by better bucketing # similar requests and to help OpenAI detect and prevent abuse. - # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). + # [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers). user: nil, # There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create` # for streaming and non-streaming use cases, respectively. @@ -983,7 +989,7 @@ module OpenAI # Cancels a model response with the given ID. Only responses created with the # `background` parameter set to `true` can be cancelled. - # [Learn more](https://platform.openai.com/docs/guides/background). + # [Learn more](https://developers.openai.com/api/docs/guides/background). sig do params( response_id: String, @@ -1001,9 +1007,9 @@ module OpenAI # Compact a conversation. Returns a compacted response object. # # Learn when and how to compact long-running conversations in the - # [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). + # [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window). # For ZDR-compatible compaction details, see - # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). + # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced). sig do params( model: T.nilable(T.any(OpenAI::Responses::ResponseCompactParams::Model::OrSymbol, String)), @@ -1022,8 +1028,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide # range of models with different capabilities, performance characteristics, and # price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model:, # Text, image, or file inputs to the model, used to generate a response input: nil, @@ -1034,7 +1040,7 @@ module OpenAI instructions: nil, # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # A key to use when reading from or writing to the prompt cache. @@ -1046,7 +1052,7 @@ module OpenAI # up to the latest 80 breakpoints in the conversation, without a content-block # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The # `ttl` defaults to `30m`, which is currently the only supported value. See the - # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching) + # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) # for current details. prompt_cache_options: nil, # How long to retain a prompt cache entry created by this request. @@ -1056,17 +1062,17 @@ module OpenAI # Project settings. Unless otherwise configured, the Project will use 'default'. - # If set to 'default', then the request will be processed with the standard # pricing and performance for the selected model. - If set to - # '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the - # request will be processed with the Flex Processing service tier. - To opt-in to - # [Fast mode](/api/docs/guides/fast-mode) at the request level, include the - # `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat - # Completions. For models with a dedicated Fast tier, either value resolves to - # `service_tier=fast`; for other models, either value resolves to - # `service_tier=priority`. - When not set, the default behavior is 'auto'. 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. + # '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then + # the request will be processed with the Flex Processing service tier. - To opt-in + # to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the + # request level, include the `service_tier=fast` or `service_tier=priority` + # parameter for Responses or Chat Completions. For models with a dedicated Fast + # tier, either value resolves to `service_tier=fast`; for other models, either + # value resolves to `service_tier=priority`. - When not set, the default behavior + # is 'auto'. 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. service_tier: nil, request_options: {} ) diff --git a/rbi/openai/resources/responses/input_tokens.rbi b/rbi/openai/resources/responses/input_tokens.rbi index 650831245..6e7ddf027 100644 --- a/rbi/openai/resources/responses/input_tokens.rbi +++ b/rbi/openai/resources/responses/input_tokens.rbi @@ -78,8 +78,8 @@ module OpenAI # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a # wide range of models with different capabilities, performance characteristics, # and price points. Refer to the - # [model guide](https://platform.openai.com/docs/models) to browse and compare - # available models. + # [model guide](https://developers.openai.com/api/docs/models) to browse and + # compare available models. model: nil, # Whether to allow the model to run tool calls in parallel. parallel_tool_calls: nil, @@ -89,17 +89,17 @@ module OpenAI personality: nil, # The unique ID of the previous response to the model. Use this to create # multi-turn conversations. Learn more about - # [conversation state](https://platform.openai.com/docs/guides/conversation-state). + # [conversation state](https://developers.openai.com/api/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, # **gpt-5 and o-series models only** Configuration options for - # [reasoning models](https://platform.openai.com/docs/guides/reasoning). + # [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). reasoning: nil, # Configuration options for a text response from the model. Can be plain text or # structured JSON data. Learn more: # - # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text) - # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) + # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) text: nil, # Controls which tool the model should use, if any. tool_choice: nil, diff --git a/rbi/openai/resources/uploads.rbi b/rbi/openai/resources/uploads.rbi index 8e5f3200c..64961997d 100644 --- a/rbi/openai/resources/uploads.rbi +++ b/rbi/openai/resources/uploads.rbi @@ -11,24 +11,24 @@ module OpenAI attr_reader :parts # Creates an intermediate - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object + # [Upload](https://developers.openai.com/api/reference/resources/uploads) object # that you can add - # [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to. - # Currently, an Upload can accept at most 8 GB in total and expires after an hour - # after you create it. + # [Parts](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + # to. Currently, an Upload can accept at most 8 GB in total and expires after an + # hour after you create it. # # Once you complete the Upload, we will create a - # [File](https://platform.openai.com/docs/api-reference/files/object) object that + # [File](https://developers.openai.com/api/reference/resources/files) object that # contains all the parts you uploaded. This File is usable in the rest of our # platform as a regular File object. # # For certain `purpose` values, the correct `mime_type` must be specified. Please # refer to documentation for the - # [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files). + # [supported MIME types for your use case](https://developers.openai.com/api/docs/guides/tools-file-search#supported-files). # # For guidance on the proper filename extensions for each purpose, please follow # the documentation on - # [creating a File](https://platform.openai.com/docs/api-reference/files/create). + # [creating a File](https://developers.openai.com/api/reference/resources/files/methods/create). # # Returns the Upload object with status `pending`. sig { @@ -55,7 +55,7 @@ module OpenAI # The intended purpose of the uploaded file. # # See the - # [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + # [documentation on File purposes](https://developers.openai.com/api/reference/resources/files/methods/create#%28resource%29%20files%20%3E%20%28method%29%20create%20%3E%20%28params%29%200%20%3E%20%28param%29%20purpose%20%3E%20%28schema%29). purpose:, # The expiration policy for a file. By default, files with `purpose=batch` expire # after 30 days and all other files are persisted until they are manually deleted. @@ -76,10 +76,10 @@ module OpenAI end # Completes the - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + # [Upload](https://developers.openai.com/api/reference/resources/uploads). # # Within the returned Upload object, there is a nested - # [File](https://platform.openai.com/docs/api-reference/files/object) object that + # [File](https://developers.openai.com/api/reference/resources/files) object that # is ready to use in the rest of the platform. # # You can specify the order of the Parts by passing in an ordered list of the Part diff --git a/rbi/openai/resources/uploads/parts.rbi b/rbi/openai/resources/uploads/parts.rbi index 6a1fabfd8..a361d30bd 100644 --- a/rbi/openai/resources/uploads/parts.rbi +++ b/rbi/openai/resources/uploads/parts.rbi @@ -9,16 +9,17 @@ module OpenAI class Parts # Adds a - # [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an - # [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. - # A Part represents a chunk of bytes from the file you are trying to upload. + # [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts) + # to an [Upload](https://developers.openai.com/api/reference/resources/uploads) + # object. A Part represents a chunk of bytes from the file you are trying to + # upload. # # Each Part can be at most 64 MB, and you can add Parts until you hit the Upload # maximum of 8 GB. # # It is possible to add multiple Parts in parallel. You can decide the intended # order of the Parts when you - # [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + # [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). sig { params(upload_id: String, data: OpenAI::Internal::FileInput, request_options: OpenAI::RequestOptions::OrHash) .returns(OpenAI::Uploads::UploadPart) diff --git a/rbi/openai/resources/vector_stores.rbi b/rbi/openai/resources/vector_stores.rbi index eb3c953a9..3a24f348a 100644 --- a/rbi/openai/resources/vector_stores.rbi +++ b/rbi/openai/resources/vector_stores.rbi @@ -36,9 +36,9 @@ module OpenAI description: nil, # The expiration policy for a vector store. expires_after: nil, - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. file_ids: nil, # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and diff --git a/rbi/openai/resources/vector_stores/file_batches.rbi b/rbi/openai/resources/vector_stores/file_batches.rbi index 826306051..dfbc09c3f 100644 --- a/rbi/openai/resources/vector_stores/file_batches.rbi +++ b/rbi/openai/resources/vector_stores/file_batches.rbi @@ -34,12 +34,12 @@ module OpenAI # The chunking strategy used to chunk the file(s). If not set, will use the `auto` # strategy. Only applicable if `file_ids` is non-empty. chunking_strategy: nil, - # A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that - # the vector store should use. Useful for tools like `file_search` that can access - # files. If `attributes` or `chunking_strategy` are provided, they will be applied - # to all files in the batch. The maximum batch size is 2000 files. This endpoint - # is recommended for multi-file ingestion and helps reduce per-vector-store write - # request pressure. Mutually exclusive with `files`. + # A list of [File](https://developers.openai.com/api/reference/resources/files) + # IDs that the vector store should use. Useful for tools like `file_search` that + # can access files. If `attributes` or `chunking_strategy` are provided, they will + # be applied to all files in the batch. The maximum batch size is 2000 files. This + # endpoint is recommended for multi-file ingestion and helps reduce + # per-vector-store write request pressure. Mutually exclusive with `files`. file_ids: nil, # A list of objects that each include a `file_id` plus optional `attributes` or # `chunking_strategy`. Use this when you need to override metadata for specific diff --git a/rbi/openai/resources/vector_stores/files.rbi b/rbi/openai/resources/vector_stores/files.rbi index 260589af1..123d8a950 100644 --- a/rbi/openai/resources/vector_stores/files.rbi +++ b/rbi/openai/resources/vector_stores/files.rbi @@ -8,8 +8,8 @@ module OpenAI class Files # Create a vector store file by attaching a - # [File](https://platform.openai.com/docs/api-reference/files) to a - # [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + # [File](https://developers.openai.com/api/reference/resources/files) to a + # [vector store](https://developers.openai.com/api/reference/resources/vector_stores). sig { params( vector_store_id: String, @@ -26,10 +26,10 @@ module OpenAI def create( # The ID of the vector store for which to create a File. vector_store_id, - # A [File](https://platform.openai.com/docs/api-reference/files) ID that the - # vector store should use. Useful for tools like `file_search` that can access + # A [File](https://developers.openai.com/api/reference/resources/files) ID that + # the vector store should use. Useful for tools like `file_search` that can access # files. For multi-file ingestion, we recommend - # [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch) + # [`file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create) # to minimize per-vector-store write requests. file_id:, # Set of 16 key-value pairs that can be attached to an object. This can be useful @@ -157,7 +157,7 @@ module OpenAI # Delete a vector store file. This will remove the file from the vector store but # the file itself will not be deleted. To delete the file, use the - # [delete file](https://platform.openai.com/docs/api-reference/files/delete) + # [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) # endpoint. sig { params(file_id: String, vector_store_id: String, request_options: OpenAI::RequestOptions::OrHash).returns( diff --git a/sig/openai/models/admin/organization/projects/project_api_key.rbs b/sig/openai/models/admin/organization/projects/project_api_key.rbs index 7a0881d0f..5ae95e720 100644 --- a/sig/openai/models/admin/organization/projects/project_api_key.rbs +++ b/sig/openai/models/admin/organization/projects/project_api_key.rbs @@ -14,7 +14,8 @@ module OpenAI ?object: :"organization.project.api_key", owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::owner_project_access, - redacted_value: String + redacted_value: String, + ?expires_at: Integer? } class ProjectAPIKey < OpenAI::Internal::Type::BaseModel @@ -34,6 +35,8 @@ module OpenAI attr_accessor redacted_value: String + attr_accessor expires_at: Integer? + def initialize: ( id: String, created_at: Integer, @@ -42,6 +45,7 @@ module OpenAI owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::owner_project_access, redacted_value: String, + ?expires_at: Integer?, ?object: :"organization.project.api_key" ) -> void @@ -53,7 +57,8 @@ module OpenAI ?object: :"organization.project.api_key", owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Models::Admin::Organization::Projects::ProjectAPIKey::owner_project_access, - redacted_value: String + redacted_value: String, + ?expires_at: Integer? } type owner = diff --git a/sig/openai/models/admin/organization/projects/service_account_create_params.rbs b/sig/openai/models/admin/organization/projects/service_account_create_params.rbs index e47ee0486..0722f2f20 100644 --- a/sig/openai/models/admin/organization/projects/service_account_create_params.rbs +++ b/sig/openai/models/admin/organization/projects/service_account_create_params.rbs @@ -8,6 +8,7 @@ module OpenAI project_id: String, name: String, ?create_service_account_only: bool?, + ?expires_in_seconds: Integer?, ?request_options: OpenAI::request_opts } @@ -21,10 +22,13 @@ module OpenAI attr_accessor create_service_account_only: bool? + attr_accessor expires_in_seconds: Integer? + def initialize: ( project_id: String, name: String, ?create_service_account_only: bool?, + ?expires_in_seconds: Integer?, ?request_options: OpenAI::request_opts ) -> void @@ -32,6 +36,7 @@ module OpenAI project_id: String, name: String, ?create_service_account_only: bool?, + ?expires_in_seconds: Integer?, ?request_options: OpenAI::RequestOptions } end diff --git a/sig/openai/models/admin/organization/projects/service_account_create_response.rbs b/sig/openai/models/admin/organization/projects/service_account_create_response.rbs index 1cf5141aa..61adb5783 100644 --- a/sig/openai/models/admin/organization/projects/service_account_create_response.rbs +++ b/sig/openai/models/admin/organization/projects/service_account_create_response.rbs @@ -50,7 +50,8 @@ module OpenAI created_at: Integer, name: String, ?object: :"organization.project.service_account.api_key", - value: String + value: String, + ?expires_at: Integer? } class APIKey < OpenAI::Internal::Type::BaseModel @@ -64,11 +65,14 @@ module OpenAI attr_accessor value: String + attr_accessor expires_at: Integer? + def initialize: ( id: String, created_at: Integer, name: String, value: String, + ?expires_at: Integer?, ?object: :"organization.project.service_account.api_key" ) -> void @@ -77,7 +81,8 @@ module OpenAI created_at: Integer, name: String, ?object: :"organization.project.service_account.api_key", - value: String + value: String, + ?expires_at: Integer? } end diff --git a/sig/openai/resources/admin/organization/projects/service_accounts.rbs b/sig/openai/resources/admin/organization/projects/service_accounts.rbs index a6618a894..a744ab153 100644 --- a/sig/openai/resources/admin/organization/projects/service_accounts.rbs +++ b/sig/openai/resources/admin/organization/projects/service_accounts.rbs @@ -10,6 +10,7 @@ module OpenAI String project_id, name: String, ?create_service_account_only: bool?, + ?expires_in_seconds: Integer?, ?request_options: OpenAI::request_opts ) -> OpenAI::Models::Admin::Organization::Projects::ServiceAccountCreateResponse diff --git a/test/openai/resources/admin/organization/projects/api_keys_test.rb b/test/openai/resources/admin/organization/projects/api_keys_test.rb index d4ba71ea6..ea23e4b11 100644 --- a/test/openai/resources/admin/organization/projects/api_keys_test.rb +++ b/test/openai/resources/admin/organization/projects/api_keys_test.rb @@ -19,7 +19,8 @@ def test_retrieve_required_params object: Symbol, owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Admin::Organization::Projects::ProjectAPIKey::OwnerProjectAccess, - redacted_value: String + redacted_value: String, + expires_at: Integer | nil } end end @@ -47,7 +48,8 @@ def test_list object: Symbol, owner: OpenAI::Admin::Organization::Projects::ProjectAPIKey::Owner, owner_project_access: OpenAI::Admin::Organization::Projects::ProjectAPIKey::OwnerProjectAccess, - redacted_value: String + redacted_value: String, + expires_at: Integer | nil } end end